Repository navigation
Conversation
…ages Since NVIDIA#167, DeepSeek V4.1 declares a top-p range of [0.95, 1]. Vocabulary-parallel sampling supports only unfiltered target distributions: its softmax marks a row invalid when top-p is not 1, min-p is not 0, or top-k is active. A package exported with --vocabulary-parallel-sampling after NVIDIA#167 therefore admits top_p 0.95, every speculative round of that request fails verification, and the request ends with HTTP 500 "prepared model reported device error 6" (INVALID_SPECULATION). The same package serves top_p 0.95 with --mtp-draft-tokens 0, and packages exported before NVIDIA#167 clamp top-p to 1. SamplingDefaults.unfiltered() returns the policy without top-k, top-p, and min-p ranges and rejects defaults that enable those filters. DeepSeek V4.1's PreparationConfig packages that policy when vocabulary-parallel sampling is enabled and validates it on construction. As for any absent range, requests are clamped to the default (top-p 1), which keeps the documented requirement that these filters stay disabled for this option. Other ranges, including repetition_penalty [1, 1.1], are unchanged, and packages exported without the option keep the top-p range. The preparation and API documents describe the packaged policy. Validation: - New tests cover the unfiltered policy (non-filter ranges kept for top-k -1 and 0, enabled filter defaults rejected) and the DeepSeek export adapter with and without --vocabulary-parallel-sampling. The adapter test fails without the bootstrap change. - tests/preparation/test_frontend_metadata.py, tests/recipes/test_declarations.py, tests/cli/test_planning.py, tests/cli/test_speculative_graph_budget.py, tests/recipes/test_deepseek41_frontend.py, tests/preparation/test_native_recipe_contract.py and tests/preparation/test_runtime_package.py, with Heliopause built with the qualification feature: 296 passed, 37 skipped, 11 failed. The same 11 fail on cc696a6 without this change: five need the Kimi K3 checkpoint, two are the deepseek41 and muse_spark default-sampling expectations, two are runtime collective-ladder cases, and three are graph-budget cases. - GPU: exported a derivative of the qualified DeepSeek-V4.1-Flash-1017 revision at TP4 on four RTX PRO 6000 Blackwell GPUs (C32, MTP 7, --vocabulary-parallel-sampling, NVFP4 draft head, FP8 Markov head; NVIDIA#154 applied locally so the C32 export fits) and served it with flare run. flare inspect shows no top-p range and keeps the repetition-penalty range; a package exported from 902c88e shows top-p [0.95, 1]. Chat requests with top_p 0.95 at C1 and C8 and one streamed request all returned 200 with 3.4-3.8 accepted drafts per verification round, where the 902c88e package returned device error 6. Functional API checks passed 34/34 and decode throughput was unchanged. Limitations: on these packages a request for top_p below 1 receives top-p 1, as before NVIDIA#167, rather than a filtered distribution. Top-p support in vocabulary-parallel verification would change its sampling kernels and is not attempted here. Only single-host TP4 was exercised. Design-Signed-Off-By: Claude Opus 5.5 (agent for Josh Cartu); design-review=a38f Signed-off-by: Josh Cartu <j@mail99.me>
998842a to
38963a4
Compare
|
Merged #208 (5e356e6) addresses the unsupported DeepSeek sampling range. It removes the top-p range from the DeepSeek V4.1-1017 declaration and rejects filtered defaults/ranges during vocabulary-parallel planning. This PR's expectation that non-vocabulary-parallel exports retain the 0.95–1 range also differs from #208's model-card correction. Marked |
|
Closing as superseded by #208. On main, DeepSeek V4.1-1017 declares no top-p range and vocabulary-parallel planning rejects filtered sampling defaults and ranges, which covers the device error 6 failure this PR addressed. Packages exported before #208, including ones built with this patch applied, keep their stored ranges until re-export. |
Problem
#167 declared a DeepSeek V4.1 top-p range of [0.95, 1].
--vocabulary-parallel-samplingsupports only unfiltered target distributions (model-preparation.md: top-k, top-p, and min-p "must remain disabled"), andPreparedVocabularySoftmaxmarks a row invalid when top-p ≠ 1. Packages exported with the option after #167 accepttop_p: 0.95, and every speculative round of that request then fails verification:With
--mtp-draft-tokens 0, the same package servestop_p: 0.95. Packages exported before #167 aren't affected because they clamp top-p to 1.Change
SamplingDefaults.unfiltered()returns the policy without top-k, top-p, and min-p ranges, and rejects defaults that enable those filters.PreparationConfig.sampling_defaultspackages that policy when vocabulary-parallel sampling is enabled, and__post_init__checks it before any GPU work.repetition_penalty[1, 1.1], are unchanged. Packages exported without the option keep the top-p range.docs/model-preparation.mdanddocs/api.mddescribe the packaged policy.Validation
Unit tests:
--vocabulary-parallel-sampling. This test fails without the bootstrap change.test_frontend_metadata,test_declarations,test_planning,test_speculative_graph_budget,test_deepseek41_frontend,test_native_recipe_contract,test_runtime_package; Heliopause built withqualification): 296 passed, 37 skipped, 11 failed.cc696a6bwithout this change:deepseek41andmuse_sparkcases oftest_default_mode_uses_manually_declared_model_card_samplingruntimecollective-ladder cases intest_every_recipe_passes_collective_policy_to_preparationGPU: TP4 on four RTX PRO 6000 Blackwell GPUs.
--max-concurrency 32 --mtp-draft-tokens 7 --vocabulary-parallel-sampling --draft-head-quantization nvfp4 --markov-head-quantization fp8. Reuse retained warmup mappings across compiled warmup #154 was applied locally so the C32 export fits; it is not part of this PR. Served withflare run.flare inspect: the new package has no top-p range and keeps the repetition-penalty range. A package exported from902c88e2shows top-p [0.95, 1].top_p: 0.95: chat requests at C1 and C8 plus one streamed request all returned 200, with 3.4–3.8 accepted drafts per verification round. The902c88e2package returneddevice error 6for the same request.Limitations
Prepared with an AI agent (Claude Opus 5.5); see the
Design-Signed-Off-Bytrailer. It doesn't touch CUDA, Triton, or GPU optimization code (design-review principle 14).