Skip to content

DeepSeek-V4.1 TP=2: every-rank receipts and opt-in per-layer hash files for repeat divergence (#1395) - #2030

Closed
ashhart wants to merge 3 commits into
mainfrom
lead/1395-lw
Closed

ashhart wants to merge 3 commits into
mainfrom
lead/1395-lw

Conversation

@ashhart

@ashhart ashhart commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Record DeepSeek serving arms and optional per-layer hashes

Repeated TP=2 replies can differ without enough evidence to identify the first changed layer or a mismatched rank setting. Log each rank's effective serving arm and optionally write exclusive per-rank JSONL layer hashes with shared request identities and real window metadata.

With TF_DSV41_LAYER_HASH unset or empty, no writer, trace launch, request metadata frame, readback or synchronization is added. Existing trace-map behavior remains. Hashing reads the existing post-only BF16 stream and writes no model data; it deliberately runs eagerly and changes timing.

Independent review cleared the off path, actual trace glue, malformed/exclusive file handling, per-slot windows and serving-arm coverage. The recipe explicitly separates eager hash comparisons from graph-replay comparisons.

Validation: focused host checks pass, formatting passes and lean adds zero findings to the pinned 424. A clean git am reproduces the entire exported tree.

On two GB10s, compare off against main at the reporter's prompt, compare hashes on/off with TF_DSV41_GRAPHS=0 in both arms, retain a graphs-on hash-free arm, then run the twenty-repeat panel with both ranks' IDs and files. Record hashing cost. This is diagnostics, not a proven divergence fix.

Persist rank-specific trace receipts with shared request identities and per-slot window metadata. Preserve the disabled trace path and expose the effective serving settings at startup.

Refs #1395.
Keep the existing 81 settings in their original groups and count the
optional layer-hash path separately. Exercise path parsing and redacted
refusals without sending it through numeric readers.

Use a control character for the loader path refusal: ordinary words are
valid path text. Startup scope validation already precedes the experimental
family check and resource allocation. No production ordering changes.
@ashhart

ashhart commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

Rebased onto today's main (now 9e7bf66, three commits): the serving-arm line and per-layer hash files, a split between eager hash comparisons and graph-replay diagnostics in the recipe, and the strict environment tests updated for the new diagnostic settings. The tree matches the reviewed export exactly, and it merges cleanly.

With TF_DSV41_LAYER_HASH unset, no writer or extra launch is attached. Before it lands we'll run the two-GB10 TP=2 pair to confirm the off path gives the same tokens as main, then hashes on and off with graphs off in both arms. Those boxes are on release reads tonight, so that run comes after tomorrow's 1.2.7 cut.

  • Synthena (Ash's Agent)

@ashhart

ashhart commented Nov 14, 2026

Copy link
Copy Markdown
Owner Author

Closing in favour of #3297, which carries the per-layer hash half on its own (it has no overlap with main). The start-up receipt here is left out because main's serve_line.zig (#1395) already covers start-up.

  • Synthena (Ash's Agent)

@ashhart ashhart closed this Nov 14, 2026
ashhart added a commit that referenced this pull request Nov 17, 2026
…plit from #2030)

TF_DSV41_LAYER_HASH=PREFIX attaches a writer on every rank that records the
existing per-layer BF16 trace outputs as JSONL version 1 in a fresh
PREFIX.rankN.jsonl: a header, request records (sequence, slot, SHA-256 of
the prompt's token ids, shared by rank zero over the plan link) and layer
records (window, phase, rows, layer, window-token and stream SHA-256).
Traced programs run eagerly, so the hash path cannot reproduce a failure
confined to graph replay; compare hashes on and off with TF_DSV41_GRAPHS=0.
Unset or empty attaches no writer and adds no trace launches, device copies
or synchronizations, which the host tests check with a failing allocator.

This is the layer-hash half of #2030. The serving-arm start-up receipt is
left out: main's serve_line.zig already logs each rank's settings (#1395).
ashhart added a commit that referenced this pull request Nov 18, 2026
…plit from #2030)

TF_DSV41_LAYER_HASH=PREFIX attaches a writer on every rank that records the
existing per-layer BF16 trace outputs as JSONL version 1 in a fresh
PREFIX.rankN.jsonl: a header, request records (sequence, slot, SHA-256 of
the prompt's token ids, shared by rank zero over the plan link) and layer
records (window, phase, rows, layer, window-token and stream SHA-256).
Traced programs run eagerly, so the hash path cannot reproduce a failure
confined to graph replay; compare hashes on and off with TF_DSV41_GRAPHS=0.
Unset or empty attaches no writer and adds no trace launches, device copies
or synchronizations, which the host tests check with a failing allocator.

This is the layer-hash half of #2030. The serving-arm start-up receipt is
left out: main's serve_line.zig already logs each rank's settings (#1395).
ashhart added a commit that referenced this pull request Nov 22, 2026
…plit from #2030)

TF_DSV41_LAYER_HASH=PREFIX attaches a writer on every rank that records the
existing per-layer BF16 trace outputs as JSONL version 1 in a fresh
PREFIX.rankN.jsonl: a header, request records (sequence, slot, SHA-256 of
the prompt's token ids, shared by rank zero over the plan link) and layer
records (window, phase, rows, layer, window-token and stream SHA-256).
Traced programs run eagerly, so the hash path cannot reproduce a failure
confined to graph replay; compare hashes on and off with TF_DSV41_GRAPHS=0.
Unset or empty attaches no writer and adds no trace launches, device copies
or synchronizations, which the host tests check with a failing allocator.

This is the layer-hash half of #2030. The serving-arm start-up receipt is
left out: main's serve_line.zig already logs each rank's settings (#1395).
ashhart added a commit that referenced this pull request Nov 26, 2026
…plit from #2030)

TF_DSV41_LAYER_HASH=PREFIX attaches a writer on every rank that records the
existing per-layer BF16 trace outputs as JSONL version 1 in a fresh
PREFIX.rankN.jsonl: a header, request records (sequence, slot, SHA-256 of
the prompt's token ids, shared by rank zero over the plan link) and layer
records (window, phase, rows, layer, window-token and stream SHA-256).
Traced programs run eagerly, so the hash path cannot reproduce a failure
confined to graph replay; compare hashes on and off with TF_DSV41_GRAPHS=0.
Unset or empty attaches no writer and adds no trace launches, device copies
or synchronizations, which the host tests check with a failing allocator.

This is the layer-hash half of #2030. The serving-arm start-up receipt is
left out: main's serve_line.zig already logs each rank's settings (#1395).
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.

1 participant