Skip to content

train 1119192136: #1295 #3538 #3677 (CI only) - #4048

Closed
ashhart wants to merge 33 commits into
mainfrom
lead/train-1119192136
Closed

ashhart wants to merge 33 commits into
mainfrom
lead/train-1119192136

Conversation

@ashhart

@ashhart ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

CI for a landing train: #1295 #3538 #3677 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.

ajensenwaud and others added 30 commits November 19, 2026 19:21
…g, answer and tool calls

A tokenizer with <|start|>, <|message|>, <|eom|> and <|eot|> as single tokens and a chat template that writes
to=self messages (Muse Spark Open's) replies as messages to recipients. self is reasoning_content; user, commentary
and no recipient are content; any other recipient is a tool call whose <atem:function_calls> block becomes the
<tool_call><function=...> markup tool_parse and tool_stream already read, so its arguments take the tools' schema
types. While a reply streams, an unfinished header, a call message that has not closed and a partial marker are held
back, so every split extends the last and the finished split extends them all; the finished reply feeds the call
streamer once more, so a last call ended by the end token streams too. Harmony's tokenizers have no <|eom|> or
<|eot|>, so gpt-oss replies keep their channel split; tests cover both formats whole and streamed.
…ompt's open message read, thinking off kept off

A call message max_tokens cuts stays open as far as it was written, named by its header until its invoke names the
tool, so tool_stream reads it as the reply's cut call, whole and streamed, as #1299 made a GLM call; content never
shows its markup. A stop string inside a call keeps the call's text, as the other formats keep theirs. The reply goes
on from the prompt's last unclosed <|start|> header, so a generation prompt that already opened to=self<|message|>
keeps the reasoning after it; Muse Spark Open's template ends at <|start|>assistant, with or without reasoning_effort.
Only calls to offered tools become <tool_call> markup: with no tools, or a tool not offered, a call message stays as
the model wrote it, as DSML, LFM2 and Qwen's XML calls do. Thinking off no longer turns the split's reasoning on: self
messages stay out of the reply, and the template, which has no thinking switch, hears its lowest reasoning effort
rather than its default (xhigh). Raw completion prompts keep the model's text. Tests cut a call before its invoke
names the tool, inside a value, a value's closer, a parameter's name, between parameters, after the invoke closed,
and in a call's header, at strides 1, 3, 7 and whole; and cover an opened prompt, no tools, an unoffered tool and
thinking off.
…TP=2 over fabric/tp, DFlash2, prompt cache

The family serves an EXL3 pack of Muse Spark Open's text model on the native CUDA server, one GPU or two DGX Sparks
as tensor-parallel ranks (rank 1: tf-muse follow).

- EXL3 projections and routed experts run on main's shared operators: cuda.exl3 Linear (tf_exl3_rot_in,
  tf_exl3_linear_*) and cuda.exl3_experts (group, rotate, tf_exl3_grouped_2, the fp32 SwiGLU epilogue, down).
- Family kernels: attention.cu (head dim 64, GQA 8:1 decode attention, fp16 cache), glue.cu (norms, gated
  residuals, fp32 router, top-8, expert norms and sums, softcap, argmax, RoPE tables), linear_multi.cu (q/k/v/gate
  in one launch and 32-row passes over exl3_decode.cuh, the shared linear's bits), experts2.cu (32-member tiles of
  the shared grouped GEMM for prompt windows, its bits), dflash.cu and dflash2.cu (the drafter).
- A row's bits do not depend on its window, the graph bucket or prompt chunking; the prompt cache keeps states
  through the snap_* hooks; the family declares its prompt-cache budget default (1 GiB a rank,
  --prompt-cache-gib overrides it). The memory reserve stays the operator's (TENSORFOLD_MEMORY_RESERVE_GIB).
- tf-muse m1 / prompt / dflash / drafted checks and test-muse host tests; docs/recipes/muse-spark.md.
…hes for gate 5

Glue, attention and drafter kernels against float64 (rows and dense families where the formulas match) or their stated rules; the cluster norm forms and the EXL3 launch forms as bit-preserving replacements.
…), with host tests

rounds.zig holds what verify, keep and draft do before and after their GPU calls, and native.zig's backend calls
it: a round's rows (each window's pending token, then its held drafts or the host's, at position - 1 on the
stream's slot), whether the forward may return ids (no window samples), the drafts a window verified, the kept-path
check (chains from row 0; no trees), each draft request's entry (the last follow token or the fed first token, the
depth capped by the drafter's block, held drafts cleared) and the pass output into each stream's held drafts.
Behaviour is unchanged. Host tests cover each, with the refusals: trees, unknown streams, windows past the rows,
drafts not held, empty or branching paths, no drafter, no first token.
…e the last call; a reply with no markup streams as it comes
Meta's Muse Model License for the model, AMD's export and the EXL3 pack; none stated for RadixArk's DFlash2 drafter, which is built locally rather than published; MIT for exllamav3, the quantiser and parity reference.
With main's loop-guard stop, chat.zig plus the recipient-reply hook reached 603 lines, past lean's 600. flag (Python's
bool(fields.get(key))) is a fields helper, so it moves there unchanged; chat.zig calls fields_mod.flag.
…one GPU

weightShare read TF_TP_* with catch null, so a malformed world or rank was admitted as one GPU's share. It now
returns BadSetting as open does, and the admission reports it through the family's explain. weightShare may return an
error union (cuda_family_memory's share, the same change as MiMo-V2's in #728). Host test: unset, six malformed
settings, and a two-rank share.
…ame otherwise

Muse Spark was gated and run only on two GB10s at TP=2. open now refuses any other GPU (MuseSparkRequiresSm121) and
an unset TF_TP_WORLD or any world but 2 (MuseSparkRequiresTwoRanks), as does tf-muse follow; the weight share and the
target's and drafter's rank views refuse one rank by the same name, so admission names it before sizing memory.
Host tests: the admit rule, rankView(1), and the weight share at one, two and four ranks.
…ates no licence

RadixArk's Muse-Spark-Open-DFlash2 states no licence, so all rights are reserved by default: the recipe no longer
names a drafter pack or a --drafter command, and serves two GB10s only, as the family now admits.
Since 1911e7b GLM's CUDA family takes fabric/tp over the engine's cuda module, and a second family over the same
runtime made its own tp module, so the engines failed with `zig/src/fabric/tp/tp.zig: error: file exists in modules
'tp' and 'tp0'`. tp.module now keeps one module per cuda module and returns it on every later call.
muse_glue is in the shared kernel list, so a release build compiles it for
sm_80 and sm_86 too, where thread-block clusters do not exist and nvcc stops
at muse_gate_norm_c, muse_expert_sum_c and cluster_sum. Below sm_90 the two
cluster kernels now trap and drop their cluster attribute, and cluster_sum
is left out, as qmm.cu and ck_lane.cu do. Muse admits sm_121 only, so the
host never launches them there; the sm_90+ source is unchanged.

Co-authored-by: ajensenwaud <5827908+ajensenwaud@users.noreply.github.com>
Main's lean check now refuses a new direct getenv of a TF_ name and a
getenv of a name that is not a literal. Muse's reads move accordingly:

- open and the weight share check TF_TP_WORLD by its literal name (unset or
  blank is one rank, refused by name as before: tp's own default is two)
  and read the settings through tp.Config.fromEnv, so a malformed one is
  still BadSetting. The weight-share test reads its fake environments
  through the same rule (tpFrom). m1 does the same.
- tf-muse's developer knobs keep their names, read with a literal getenv at
  each call.
- The draft check's TF_MUSE_DRAFTER and TF_MUSE_DRAFT_TAPS become
  MUSE_DRAFTER and MUSE_DRAFT_TAPS, beside the tool's other MUSE_ knobs (the
  recipe's check list says so); the server's drafter is --drafter.

Co-authored-by: ajensenwaud <5827908+ajensenwaud@users.noreply.github.com>
…sons

The block sum broadcasts through its own total, a shape the shared tree
lacks. The three warp sums use the shared butterfly's order and move to
tf_common::warp_sum once nvcc shows the same machine code on the
family's GB10 run.
…eply loop

Keep moduleOver and pair-keyed TP sharing from the supplied merge. Keep main explicit GLM imports once, and evaluate ordinary close parsing only on the non-recipient path.
Move the existing probe body unchanged to a sibling module and keep its call through an alias.
…ies, as main's registry test asks of every family with a host prompt cache
Answer #1295's Windows test failure. The unfiltered native CUDA host root imports context-ceiling tests that compile every registered family's open, including Muse Spark's POSIX TP session. Gate that one test edge on Windows as the other POSIX host suites are gated. Keep Muse's portable host tests and every other module registered. Linux and macOS keep the original tests; fabric and runtime source are unchanged.
…ommand's served name, words, lock and user agent
…e child of its own or a running server's --url
… its environment; --url sends TENSORFOLD_API_KEY
…refix kernels, their results in the simdgroup-matrix layout
…the shared prefix before M5; comments and a test name only
…ask 2)

The #3343 loop in Suite.collect passed each tensor-unit flag to controlEdit and at_.geometry, which now take the shared-prefix decision, so on the pre-M5 source the decode edit was never checked though the control is registered there. Call sharedPrefix as Attn.init does, so the decode control edit is checked against the pre-M5 source too.
@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner Author

Landed: #1295 #3538 #3677 as main 5d43ad5. This PR only carried their CI.

@ashhart ashhart closed this Nov 19, 2026
@ashhart
ashhart deleted the lead/train-1119192136 branch November 19, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants