Repository navigation
Conversation
…ecode between chunks For #3021. Gemma 4's Metal backend now declares prefill_step, cancel_prefill and reports_fill, so the lane host fills a new prompt a chunk a round instead of running the whole pass before the next decode round. The chunk cuts are the old loop's, moved into prefill_steps.zig unchanged (512 rows, planned starts, kept marks, never inside an image), and the whole pass runs the same step in a loop. Gemma still declares no chunk_invariant, so the host never caps a chunk. A drafting stream's chunk rows stay in the prompt scratch as the cache's chunk_tap until the next prompt chunk, and featuresFn serves them, so the drafted wrapper absorbs every chunk's rows after its step. A mark at a chunk's end is kept at the next call, after that absorb, so the kept state carries the drafter's context as before. A cancel between chunks keeps the last landed chunk's state. Host tests on a recording fake: one chunk a call at the old loop's cuts, another stream's decode between two chunks, and a drafter absorbing every chunk before a mark is kept. test-gemma4-metal-steps-host joins the Linux nightly host list. Rebased onto current main: the vtable host step is registered beside main's test-uocr step, and the file stays under 600 lines.
# Conflicts: # CHANGELOG.md
GLM read its own TF_GLM_RANK and TF_GLM_WORLD in two places and could not take --tp. The native CUDA layer now resolves the flags and those aliases once, before admission and open; GLM takes --tp, --rank and --master, keeps refusing an unplaced launch where it always did, and the solo wire rule reads the resolved world.
…ter main's cdbdc5a Main's cdbdc5a added the Muse Spark CUDA family with a five-argument weightShare. The previous commit passes every family's weightShare the resolved rank and tp, as #2919 does for MiniMax and Nemotron, so Muse Spark's takes the two and ignores them, as theirs do. Nothing else changes.
MiniMax read TF_MINIMAX_RANK and TF_MINIMAX_WORLD itself and refused --tp. It now takes its place from the launch the native layer resolves, shares GLM's --master rendezvous through the CUDA module, and each family's vision bytes filter by its tower's rank, so the last MiniMax rank still counts the tower; its dump tool keeps the variables as its input.
Nemotron routed expert ranks by the text of TF_NEMOTRON_RANK and read its place again in the engine, the worker and Omni's admission. The server path now hands the resolved place to all of them and shares the --master rendezvous; the tools keep TF_NEMOTRON_* as their input through the unchanged latent.place.
GLM, MiniMax and Nemotron now take --tp, --rank, --master and --master-port, so their recipes launch with those flags and say that the per-family rank variables are aliases until 1.4.0, which refuses them naming the flag. The examples keep their ports, so NCCL's root and the liveness line stay where they were; receipts stay as run.
MiniMax's refusals still told users to set TF_MINIMAX_RANK and TF_MINIMAX_WORLD, which become a refusal of their own from 1.4.0. They now name --tp 2 and --rank, as GLM's and Nemotron's do.
The resolver's refusals printed the request's defaults beside the values a launch gave, so a lone --rank against an alias pair read "--tp 1 --rank 1 differ". They now name the flag given and the alias value it meets, compare worlds as numbers, name --tp's default when it decides, and a --master too long for NCCL's root is its own error.
The rank aliases retire one release after the flags first ship, a release set at landing, so the recipes stop naming 1.4.0 and say the start-up warning names the release that refuses them.
Main's new dense engine declared visionBytes(a, io, dir), while this change has the vision offer call every family's visionBytes with the resolved rank and world, so the CUDA host tests no longer compiled after the rebase. The dense engine now takes rank and world and counts its tower on rank 0, the rule Flash Next and Qwen3.5 already follow.
Merged with today's main, native/cuda.zig reached 602 lines, past the 600-line source bound. The family's place check (a rank inside its world, a world the family serves) now runs in cuda_launch.resolve right after the flags and aliases resolve, so openWith keeps one call and the order stays resolve, place, family refusals, admission.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI for a landing train: #4496 #3025 #2919 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.