Repository navigation
Conversation
Preserve request and generation-config factors in greedy and sampled native GLM target draws. Keep request-owned membership and bounded TP processor metadata, with synthetic API, state and kernel regressions. Refs ashhart#3020
|
/atc depends 3019 |
|
Verification update for the pinned public source
Full-model TP3 qualification reached an inherited startup admission limit in public parent The updated model release evidence and runtime source record state those scopes explicitly. Raw private requests, responses, logs, endpoints and infrastructure identifiers are excluded. Metal, HIP, other CUDA device executions and broader full-model capability qualification remain outside these receipts. |
There was a problem hiding this comment.
🟡 Changes recommended
Prefix extensions unnecessarily recopy the entire saved prefix, while unsupported backends reject repetition penalties that round to the float32 identity value.
2 open issues
What changed in this PR
This PR adds full-prefix repetition penalties to TensorFold’s GLM CUDA target selection, addressing #3020 while preserving the identity-factor sampling path. It is stacked on #3019; paged-FP8 compatibility remains separate.
Changes:
- Propagates checkpoint defaults and request overrides through API validation and capability reporting.
- Applies sign-aware FP32 processing with request-isolated histories for greedy, sampled, speculative and grammar-constrained selection.
- Adds host tests, CUDA contracts, reference fixtures and source-specific qualification documentation.
| File | Description |
|---|---|
zig/tests/server/golden/status/get-x-models.json |
Updates capability and response-length expectations. |
zig/tests/server/golden/status/get-v1-models%3Fx=1.json |
Updates query-route model metadata expectations. |
zig/tests/server/golden/status/get-v1-models.json |
Updates model-list capability expectations. |
zig/tests/server/golden/status/get-models.json |
Updates alias-route model metadata expectations. |
zig/tests/server/golden/scopes/read-models.json |
Updates scoped model-list expectations. |
zig/tests/server/golden/keys/rotated-new.json |
Updates model metadata after key rotation. |
zig/tests/server/golden/keys/pooled-identity.json |
Updates pooled-connection metadata expectations. |
zig/tests/server/golden/keys/models-file.json |
Updates file-configured key response expectations. |
zig/tests/server/golden/keys/models-env.json |
Updates environment-configured key response expectations. |
zig/tests/server/golden/keys/models-cli.json |
Updates CLI-configured key response expectations. |
zig/tests/server/golden/keys/models-bare.json |
Updates bare-key model-list expectations. |
zig/tests/server/golden/keys/full-then-none.json |
Updates authenticated model-list expectations. |
zig/tests/server/golden/framing/pipelined.json |
Updates pipelined response metadata and length. |
zig/tests/server/golden/framing/keepalive-three.json |
Updates keepalive response metadata and length. |
zig/tests/server/golden/framing/extensions-trailers.json |
Updates trailer-framing response expectations. |
zig/tests/server/golden/framing/connection-close.json |
Updates connection-close response expectations. |
zig/tests/server/golden/framing/chunked-bytes.json |
Updates chunked-request response expectations. |
zig/tests/cuda/sample_repetition_main.zig |
Adds an isolated GPU contract entry point. |
zig/tests/cuda/sample_repetition_contract.zig |
Runs repetition gates and resource checks. |
zig/tests/cuda/repetition_standalone.cu |
Adds standalone numerical and identity checks. |
zig/tests/cuda/repetition_hf_fixture.h |
Supplies synthetic reference vectors. |
zig/tests/cuda/main.zig |
Exposes the repetition contract command. |
zig/tests/cuda/contract_tests.zig |
Adds finite-filter checks to complete contracts. |
zig/tests/cuda/contract_sample_repetition.zig |
Defines sampling gates and planted failures. |
zig/tests/cuda/contract_repetition_set.zig |
Manages repetition contract resources. |
zig/tests/cuda/contract_family_sets.zig |
Registers repetition in family contracts. |
zig/src/server/stream_preflight_test.zig |
Tests factor propagation across API routes. |
zig/src/server/server.zig |
Resolves factors and checks backend support. |
zig/src/server/responses_translate.zig |
Forwards the Responses repetition field. |
zig/src/server/repetition_test.zig |
Tests defaults, overrides and refusal behavior. |
zig/src/server/openai.zig |
Preserves repetition in request planning. |
zig/src/server/fields.zig |
Validates positive finite float32 factors. |
zig/src/server/family_sampling.zig |
Retains checkpoint repetition defaults. |
zig/src/native/cuda.zig |
Advertises GLM CUDA repetition support. |
zig/src/families/glm/cuda.zig |
Includes repetition host tests. |
zig/src/families/glm/cuda_structured.zig |
Applies processing to constrained draws. |
zig/src/families/glm/cuda_sampler.zig |
Adds processed selection and buffer preparation. |
zig/src/families/glm/cuda_repetition.zig |
Defines histories, row masks and validation. |
zig/src/families/glm/cuda_repetition_tests.zig |
Tests prefix isolation and lifecycle behavior. |
zig/src/families/glm/cuda_repetition_device.zig |
Manages lazy device-side processor buffers. |
zig/src/families/glm/cuda_processor_wire.zig |
Coordinates metadata validation and rank readiness. |
zig/src/families/glm/cuda_lanes.zig |
Integrates request histories into lane lifecycles. |
zig/src/families/glm/cuda_lane_verify.zig |
Stages repetition rows for verification windows. |
zig/src/families/glm/cuda_follow.zig |
Transports processor state between ranks. |
zig/src/families/glm/cuda_engine.zig |
Routes target draws through repetition processing. |
zig/src/core/lanes/sampling.zig |
Adds the repetition factor to penalties. |
zig/src/core/engine_capabilities.zig |
Adds a distinct repetition capability. |
zig/src/core/engine_api.zig |
Exposes repetition support in engine information. |
zig/src/core/contract/repetition_sampling_records.zig |
Defines launch records and receipt tests. |
zig/src/core/contract/registry.zig |
Exposes repetition contract records. |
zig/src/core/contract/registry_sets_test.zig |
Receives the unmeasured-record regression test. |
zig/src/core/contract/registry_joins.zig |
Includes repetition launches in the registry. |
zig/src/core/contract/pending_132.zig |
Selects repetition compiler measurements. |
zig/src/core/contract/measurements/repetition_sampling_133.zig |
Records CUDA launch resource measurements. |
zig/prefill_widths_glm_host.zig |
Adds identity-processor fixture hooks. |
zig/kernels/cuda/sample.cu |
Applies sign-aware processing during logit reads. |
zig/kernels/cuda/sample_repetition.cuh |
Adds greedy and sampled repetition kernels. |
zig/build/kernel_contract.zig |
Adds isolated repetition contract build targets. |
zig/build/glm_family_host.zig |
Adds focused GLM repetition host tests. |
zig/build/cuda_server_host.zig |
Adds focused repetition API tests. |
tools/zig/repetition_hf_fixture.py |
Regenerates pinned CPU reference vectors. |
tools/zig/fixtures/README.md |
Documents reference provenance and regeneration. |
docs/recipes/glm-repetition-qualification.md |
Records source-specific results and qualification limits. |
docs/recipes/glm-repetition-penalty.md |
Documents behavior and reproduction commands. |
Review effort: Balanced
|
Thanks @gilp456. The processor's rule is right. Dividing a positive logit and multiplying a negative one, once per distinct id in the prompt and the accepted reply, in FP32, before temperature and the cuts, is the rule main already documents in the HIP draw ( Three things block it, though.
Smaller asks:
It stays stacked on #3019 until that lands, and CI runs once it targets main. With the three points above done and your numbers in, we'll repeat the no-penalty run on two GB10s before landing.
|
|
This PR is superseded by the maintainer-requested three-PR draft stack:
Each PR targets The review fixes make the field request-only with identity default Please continue review on the split stack. Closing #3027 as superseded leaves its discussion and earlier receipts available for history. The remote branch is retained. |

What this changes
GLM CUDA drops the checkpoint's repetition factor from defaults and target selection. This contribution applies full-prefix, sign-aware FP32 repetition processing before greedy or sampled selection, including speculative verification and request-owned histories.
The source-specific qualification update supersedes historical unrun-check statements in the original implementation recipe.
0029d0e822f73363cc9e0f774a3e52837bb7a4de. The implementation commit isc9d06d2b1ffdc1d4323bc62232df9a3afd2cf0e6; the final revision adds documentation only. Retarget after the parent lands.atc overlap --json: Selected checks on the final head against glm cuda: under --mtp-confidence a greedy stream drafts its rates' depth, not fifteen a round #2864, server: a thinking-off request renders the effort it names; --reasoning-effort can't change a thinking-off prompt (#1911) #3017, environment: Metal Qwen paging, slot resume and slide checks refused by name (#2370) #3018, server: /v1/models lists each model's input_types; a video it can't take is a 400, not a 500 (#3004) #3019, train 1112171357: #3010 #3011 #2695 #2865 #2726 #2838 #2854 #2864 #2852 #2877 (CI only) #3056 and train 1112172818: #2851 #2765 #2883 #2889 #2891 #2892 #2878 (CI only) #3059 are complete and merge cleanly. The separate immutable release-integration worktree retains 17 pre-existing conflicts, with identical conflict paths before/after this documentation revision and zero new conflicts. The cache worktree merges cleanly. Other PRs remain outside this selected merge scope. A complete separately paginated ATC issue check confirmed ownership through this PR; selected overlap coverage is stated without a repository-wide conflict-clearance claim.The factor applies once per distinct token in the full prompt and accepted generated prefix. Each speculative verification row additionally includes its pending token and earlier drafts; future/rejected drafts stay outside committed membership. Identity preserves the original sampler/RNG path. The separate paged-FP8 compatibility change is tracked in #3062.
Checks on this head
bb22b4525fd26f9924894e7d8234c22a0f09ef6b. Its only change after measured implementationc9d06d2bisdocs/recipes/glm-repetition-qualification.md.zig build test test-kernel-contract test-golden fuzz-cortheon, 724/724 steps, 9,425 passed, 69 skipped, zero failures. Strict goldens: 322/335 equal plus 13 inherited known differences; security 55/55; zero unexpected differences.zig build test-glm-repetition-host test-repetition-api-host compile-glm-native-open test-cuda-prefill-widths-host, 58/58 tests and 14/14 steps. Original-base greedy-default regression failed before the repair and passed afterward. Defaultzig buildpassed 33/33 steps on that original-base port.git diff --check; only the expected recipe changed; source/link/claim and complete publication privacy review passed. The exact qualified 1.2.7 snapshot is public and the model fork's new metadata/tests pass 23 offline tests.action_required, awaiting maintainer workflow approval. No upstream CI pass is claimed.Receipt
Fp8OnPagesadmission rule before inference. Zero parent/candidate/shared model requests ran in that attempt. Cache compatibility is a separate contribution.repetition_penalty, positive finite float32; checkpoint default when omitted, explicit request override, identity 1 preserves baseline. Unsupported engines refuse an active factor.c9d06d2bon parent0029d0e8, Linux x86_64 CPU host tests, Zig 0.17.0, CUDA repetition contracts nvcc 13.3.73 on sm120/sm121. The separate qualified model integration is TensorFold 1.2.7 atcd3cf2eaa300fdea74736ebc310f6c9b21e0f275, with three GB10 GPUs and the exact target/drafter revisions recorded in its linked instructions.Kernel contract
Reproducible 1.2.7 integration and final model results
The exact qualified 1.2.7 source combines this repair with the separate cache fix. The model fork's instructions and sanitized results pin the complete sources/profile and preserve the evidence boundary.
That source passed ten semantic acceptance cases, four natural reasoning tasks and 18 automatic-tool comparisons. The longest replay used 335,469 prompt tokens and completed 1,267 tokens with a valid structured call and no repetition stop. Configured 1M capacity passed admission; actual full-window inference was unrun. Omitted/explicit 1.1 settings matched 256-token prefixes; this does not establish completed-answer quality or traced effective-factor identity. Generated tools stayed inert. Private requests, responses, token arrays, hashes and infrastructure details are excluded.
Checklist