Skip to content

deepseek_v41: opt-in per-layer hash files for TP repeat divergence (split from #2030) - #3297

Open
ashhart wants to merge 1 commit into
mainfrom
lead/dsv41-layer-hash
Open

ashhart wants to merge 1 commit into
mainfrom
lead/dsv41-layer-hash

Conversation

@ashhart

@ashhart ashhart commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Split from #2030: only the per-layer hash half, which has no overlap with main.

TF_DSV41_LAYER_HASH=PREFIX (DeepSeek-V4.1 on CUDA, experimental, unset by default) writes each rank's per-layer trace hashes to PREFIX.rankN.jsonl. When two TP=2 runs part on a repeat, they can then be compared layer by layer. Traced programs run eagerly while it is set; unset, nothing changes.

Lean 341 with nothing new, no file over 600 lines, fmt clean. One CHANGELOG line under Unreleased.

…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
ashhart force-pushed the lead/dsv41-layer-hash branch from 941ad52 to cdba2e7 Compare November 26, 2026 22:12

This branch has not been deployed

No deployments
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