Repository navigation
Add Inkling-Small NVFP4 recipe for one DGX Station - #191
YouNeedCryDear wants to merge 6 commits into
Conversation
Prepare the pinned thinkingmachines/Inkling-Small text checkpoint on eight local GPUs. Preserve canonical decoder composition, FP32 router and convolution state, learned relative attention, complete cache snapshots, and original BF16 checkpoint weights. Add native content-header reasoning, JSON tools, template parity, and request grammar integration using existing graph operation contracts. Validation: 22 focused recipe/component/sampling checks passed on SM120 with both the declared and lockfile FlashInfer revisions. Checkpoint frontend parity and native output (79), Jinja (15), grammar (20), contract (6), and request (1) checks passed. Broader Python checks: 72 passed, 13 skipped, and two unchanged sampling-expectation failures reproduced on the base commit. Full-checkpoint TP8 export/serving, long-context behavior, and SM103/SM121 remain unqualified. The available GPU has 8 GB. Reduced operator export reaches kernel serialization but the existing package hardware validator rejects its laptop PCI ID; native exported-package replay is unvalidated. Image/audio preparation and MTP are outside this text recipe. Design-Signed-Off-By: Codex (GPT-6); design-review=a38f Signed-off-by: Arthur <xuyangc@nvidia.com>
Load hf_quant_config exclusions and preserve packed NVFP4 weights, block scales, FP32 global factors and the activation-calibration boundary. Use prepared A4 routed experts while retaining the excluded BF16 layers. Reduce raw expert outputs before applying route weights. Prepare TP2 locally or across two Sparks through existing RoCE transport, update physical memory budgets and frontend assets, and reject SM103's unsupported raw-route kernel interface before checkpoint loading. Validation: 37 recipe/topology/decoder/operator/sampling checks plus three packed NVFP4 GPU checks passed on both declared FlashInfer 560fef16 and locked 776facfd. Exact packed/calibration mapping, six-route execution, state restoration, inactive rows and allocation-free replay passed. Full model reference bounds follow measured BF16 softmax reduction rounding; max relative L2 was 0.00245 for logits and 0.00141 for hidden vectors on both pins. Actual NVFP4 tokenizer/template parity passed. Staged diff reviewed. Full-checkpoint TP2 export/native serving, RoCE, long-context and SM121 qualification remain unrun; the available SM120 GPU has 8 GB and its PCI ID is rejected by the existing package validator. Keep PR NVIDIA#191 as a draft. Design-Signed-Off-By: Codex (GPT-6); design-review=a38f Signed-off-by: Arthur <xuyangc@nvidia.com>
Add TP1 planning and preparation without collectives, calibrated SM103 NVFP4 grouped GEMMs with explicit BF16 SwiGLU and raw route outputs, and shared recognition of the observed GB300 Station PCI identity. Preserve original packed weights, calibration, complete continuation state, and existing TP2 preparation. Full-checkpoint validation on a Colossus-leased GB300 Station passed: 29 graph captures, signed package export, native Flare loading/serving, all 29 endpoint acceptance cases, and clean shutdown. Twelve Station numerical checks and the reduced TP1 full-catalog test passed; the actual checkpoint expert layer matched the independent reference exactly. SM120 passed eight expert/decoder regressions and the TP1 catalog test. Focused CPU checks passed 32 cases; GB300 native checks passed nine. Full-checkpoint TP2/RoCE, SM121, and actual 262144-token request execution remain unqualified. Station tests use locked FlashInfer 776facfd; the inherited declared-revision discrepancy is unchanged. Three unrelated compressed-expert fixture failures reproduce on the unchanged parent. No package format, native policy, or graph operation family changes. Design-Signed-Off-By: Codex (GPT-6); design-review=a38f Signed-off-by: Arthur <xuyangc@nvidia.com>
|
@YouNeedCryDear GitHub reports that this PR has merge conflicts with Conflicting files:
Please update the branch against |
Resolve platform and generated-schema conflicts with main 972e28e while retaining both GB300 PCI IDs, upstream rebuild metadata, and Inkling syntax. Add 50 generation cases with a fixed 64-token budget and inputs through 262080 tokens; preserve the existing 29 endpoint checks. DGX Station validation with locked FlashInfer 1f8ed8a3: 22 CUDA checks, 29-graph full export, 79 native API checks, and three checks against the unchanged prior package passed. Both native servers drained and exited cleanly. Focused local checks passed 55 Python and 112 Rust tests. Full-checkpoint TP2/RoCE and SM120/SM121 remain unqualified. Design-Signed-Off-By: Codex (GPT-6); design-review=4d3a Signed-off-by: Arthur <xuyangc@nvidia.com>
Consolidate API checks around one frontend fixture. Remove 18 duplicate prompt examples and redundant placement, mocked-dispatch and tensor-copy checks. Preserve all 50 fixed-budget generation inputs, default-sampling smokes, numerical bounds and CUDA/state coverage. Shorten repeated prose. Validation: 25 focused CPU tests and all 61 API cases pass, including the 262080-token input on one GB300 DGX Station. Executable production behavior is unchanged. Full-checkpoint TP2/RoCE and SM120/SM121 remain unqualified. Design-Signed-Off-By: Codex (GPT-6); design-review=4d3a Signed-off-by: Arthur <xuyangc@nvidia.com>
The recipe also prepared two-GPU, two-Spark RoCE, and SM120/SM121 configurations that were never validated with the full checkpoint, and the planner selected them automatically when TP1 did not fit. Inkling-Small NVFP4 preparation now accepts only TP1 on one SM103 GPU (GB300 DGX Station), the configuration validated by full-checkpoint export and native serving: the recipe declares only TP1 rank costs, prepare() rejects other world sizes, and bootstrap rejects non-SM103 devices before loading the checkpoint. Placement, rank-group, and collective setup and their tests are removed. The SM120/SM121 b12x branch in InklingWeightLoader._nvfp4_experts is reached only by tests; docs/TODO.txt tracks its removal and multi-GPU support. Recognition of GB300 PCI ID 0x31c2 moves to NVIDIA#221, which export on such systems requires. Other changes, with no kernel or expert-packing changes: - Helios selects TML envelope control markers with one match, dispatches the TML grammar from compile_envelope, and keeps TML delimiter constants private. - Global attention layers share one PagedAttentionMetadata per decoder, as Gemma 4 and Nemotron-H do. Inactive rows now receive zero KV length and slot -1 for negative page entries; active rows are unchanged. - Shared experts are prepared as gate/up and down projections, so their unused SwiGLU activation plans are no longer declared and tuned. - Relative paged attention and residual convolution drop unused workspace arguments. - Tests use the NVFP4 reference helpers in ignition.reference.qwen38_quant, fold the BF16 expert SiLU test into tests/recipes/muse_spark/test_experts_cuda.py, derive declared cache costs from checkpoint geometry, and remove duplicate server cases. - The preparation guide states the configuration instead of a validation report. Validation on an 8 GB SM120 laptop GPU with locked FlashInfer 1f8ed8a3: relative attention and residual convolution operator tests, reduced decoder replay and inactive-row tests, the BF16 expert test, frontend template parity against the pinned checkpoint's tokenizer and template, the ignored Helios TML request test, CPU recipe and planner tests, and the Helios library suite passed. The decoder tests ran the b12x expert path, not the SM103 CuTe path. Failures that also occur on main: two sampling-default expectations, four Helios tests that need FLARE_TEST_TEMPLATE_DIR, and four CLI alias-list tests whose lists omit qwen3.8-27b-qad. The operator package test stops at export because NVML rejects the laptop GPU's PCI ID. Not run: SM103 expert tests, reduced and full-checkpoint preparation, export, and tests/server/test_inkling.py on a GB300. Design-Signed-Off-By: Claude Opus 5.5; design-review=4d3a Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Arthur <xuyangc@nvidia.com>
|
@YouNeedCryDear GitHub reports merge conflicts with
Please reconcile these files with main and rerun the checks affected by the resolution. |
|
Repository-split triage: this PR spans both repositories and remains open for its runtime changes.
The recipe portion needs a linked PR against the |
Summary
Add
inkling-small-nvfp4for Inkling-Small NVFP4 on one GB300 DGX Station (SM103, TP1). Defaults: 262144-token context, concurrency four, 4096-token prefill. Preparation rejects other GPUs and multi-GPU plans; two-GPU and SM120/SM121 support is tracked indocs/TODO.txt.Preserve checkpoint precision, complete cache state and native reasoning/tool syntax: Helios gains TML JSON tool and content-header reasoning parsers and their structured-output grammar.
Requires #221 for export on Stations that report PCI ID
0x31c2.Evidence
1f8ed8a3; 22 CUDA checks and all 61 native API cases passed; the previous package loaded and passed three compatibility checks.PagedAttentionMetadataper decoder and shared experts are prepared as plain projections, so prepared graphs differ from the Station run above. On an 8 GB SM120 GPU: operator, reduced decoder replay and inactive-row (b12x expert path), BF16 expert, frontend template parity, ignored TML request, CPU recipe/planner and Helios library tests passed.tests/server/test_inkling.pyon a GB300.Merge Danger
Door: Two-way.
Blast Radius: Shared Helios frontend syntax (new typed TML and content-header parser kinds) and the SM103 NVFP4 routed-expert component.
Draft until the Station checks above are rerun. Text only; no performance claims.
🤖 Generated with Claude Code