Repository navigation
Conversation
…d the core Proposers hook Port of our glm-cuda family's cuda/glm_copy.zig (fork main 55d5636d, from v1.8's copy_drafts.py): when the context's last `match` tokens occurred before, the tokens that followed the latest earlier occurrence (or the earliest) are verified in place of the DFlash2 head's drafts, with the reply's longer `reply_match` for occurrences inside the reply. Upstream already carries a family-proposer hook (LaneHost.proposers, as deepseek_v41's priced lookup uses) and copy plumbing in the lanes core, so the rules land as a priced Proposer in families/glm/copy.zig; engine_api re-exports the Proposers type and native/cuda.zig's Host.serve takes the factory from the family (a new optional trailing argument built from @hasDecl(F, copyProposers)); other families are unchanged. The graph pad is off by default (upstream runs no CUDA graphs); TF_GLM_COPY_PAD restores it. glm: break the copy-proposer engine_api cycle via a family-local Factory mirror
Their CI reported 28 new findings against the base: 25 multi-line comment lines and 3 past 120 columns. The prose moved into one line per comment, keeping the fact and dropping the detail that belongs in a doc. My local lean_check.py showed the baseline total, so the regression was invisible here until the base-versus-head comparison ran.
|
Thanks @BadAd84. Using the core's
With those in, we'll check tokens against main with it on and off, drafted and plain, and run those speed cells on device. |
Review 1: Settings.on now starts false, and fromEnv sets it true only for 1 - an unset variable no longer switches drafting on, so the shipped path is unchanged unless asked. Review 5: TF_GLM_COPY_PAD and its padding branch are gone; it padded for CUDA graphs this family does not run.
|
Thanks - working through these. Done and pushed on top:
Still to do, and I would rather say so than imply more than is done: |
…hid behind them Review 2 was right and it was worse than a missing reference: the tests were reachable through nothing, and once wired they failed. The wiring: the GLM contract-host test target imported only cuda and core, while copy.zig imports lanes, so referencing the file failed to compile. glm_contract_host.host now takes the lanes module, cuda_family_host passes mods.lanes, and the test block references src/families/glm/copy.zig. What that exposed, both fixed here: - a test still expected COPY_PAD's padding, which this branch removes, so it described behaviour that no longer exists; - the remaining tests constructed Settings without `on`, which now defaults to false, so they were asserting on a proposer that was switched off - they only passed before because the default was true. After the fixes: test-cuda-host reports 26 failures, the same 26 as upstream in this environment (Windows file permission checks in auth and request_log), and no copy test among them.
|
Thanks @BadAd84, and thanks for tracking down the two tests that only passed because the default was on. On the head:
Still open:
Small: the comments still carry the fork's history ( With those in, we'll check tokens against main with it on and off, drafted and plain, and run the long-repeat and long-context speed cells on device. |
Settings.on starts false and fromEnv sets it only for 1, so a plain serve does not draft copies. TF_GLM_COPY_PAD is gone. A host test asserts proposers() is null with no TF_GLM_COPY_* set: it fails on the head where on started true, which is the defect it exists for. The knob comments describe the knob instead of another stack's defaults.
|
Measured, and it does not earn its keep. One run, adjacent boots, one fresh boot per arm, copies on against copies off, decode aggregate tok/s:
The digests are identical on both arms ( That is the answer you asked for: it does not beat the core proposer anywhere I can measure, so I am closing this rather than asking for it to be carried. The rule test and the unset-means-off default stay in our tree if anyone wants to revisit copy drafting later - it is a clean change, it is just not faster. One thing I could not give you: the counters would have been the sharper evidence (accepted per round), and |
Adds the GLM family's own prompt-lookup copy drafts behind the core Proposers hook, plus the
family-local Factory mirror that keeps
engine_apifree of a cycle.What it is
A copy drafter proposes continuations drawn from the prompt: when a span of the reply matches a span
earlier in the prompt, the tokens that followed that earlier span are candidates for the next verify
round. The proposal goes through the same verify path as any other draft, so a copy is only ever kept
when the engine agrees with it token for token -
"draft": falseand drafted replies stay identical.The family owns the index and the matching; the core owns the hook, so no other family grows its own
scheduler (CONTRIBUTING: "Keep shared lane verification, caches and per-stream state in the core; add
model operators and weight handling in the family").
Switches are
TF_GLM_COPY_DRAFTS,TF_GLM_COPY_MAXandTF_GLM_COPY_REPLY_MATCH; default off.The cycle
glmneeds the proposer contract andengine_apiowns that contract, while the contract's factorywanted the family's types back - a real import cycle. The fix is a family-local mirror of the factory
type that the core converts at the boundary, so the dependency only ever points one way.
Measured
Three GB10s, TP=3, one stream, prose:
Copy drafts add nothing on this workload - identical acceptance, identical throughput, and replies
digit-identical to the MTP-only arm. On prompts with long verbatim repeats it should propose usable
spans, which is the case it exists for; on ordinary prose it does not. Default off reflects that.
lean_check.py428 problems, the branch baseline;check-native-cuda-hostclean.