anima-clm-chat-rung0-byte-18m-copyhead
π’ PASS-grade. A byte-level (vocab256) CLM with a gated pointer-attention copy head that closes the verbatim argument-copy residual surfaced by the #1833/#1835 tool-use fires.
- Substrate: GPU (Lane G; a_lane_akida_gpu_split β NOT AKIDA). Pool host aiden, RTX 5070.
- Base:
dancinlab/anima-clm-chat-rung0-byte-18m(18.13M, ConsciousLMReconstructed, d384/6L/4H). - This model: base trunk + A/G heads + a 49,665-param copy head (18.18M total).
- Scope (a_scale_honest_scope): TOY 18M only β transfer to mid/7B UNVERIFIED.
- p1..p8 clean: the copy head is an architectural copy operator, not identity/persona/role
injection; the
0xFE/0xFFsentinels are learned grammar.
The problem it fixes
The byte-LM mouth CALLS the tool (call_rate 0.83β1.0) but INVENTS a training-distribution-shaped
key instead of COPYING the asked held-out key β correct_call = 0/36 (#1835 π΄ CLOSED-NEGATIVE).
A standard byte-LM at 18M has no mechanism to copy a token from the prompt verbatim.
The copy head (gated pointer-attention)
At each output step the model produces, besides the standard A/G byte-LM logits:
- a copy query
q_c = W_qΒ·h_t, copy keysk_i = W_kΒ·h_iover all context positionsi β€ t, - causal copy attention
a = softmax(q_cΒ·k_i / βd), - a copy distribution over the 256-byte vocab =
scatter_add(a_i onto input_byte[i])β "probability the next byte is a verbatim copy of the byte at the attended input position", - a learned gate
g_t = sigmoid(W_gΒ·h_t) β [0,1].
Final next-byte distribution: P = (1 β g_t)Β·softmax(lm_logits) + g_tΒ·copy_dist.
NLL is taken on that mixed distribution, so gate + pointer learn jointly with the LM.
This routes "the asked key in the prompt" β "the call arg" structurally (the pointer attends the key's bytes and the gate opens to copy them) instead of the LM head sampling a plausible key.
Byte-eq gate (HEXA-FUSION graph-off style)
COPY_HEAD=0 β the head is fully bypassed and the forward is byte-identical to the original
arch: max|Ξ| forward = 0.0, max|Ξ| forward_logprob(copy=off) = 0.0 (verified).
Falsifier verdicts (verbatim, p7 script-checked β NO perplexity)
BYTE-EQ (head-OFF == original arch): forward max|Ξ|=0.0 logprob(copy=off) max|Ξ|=0.0 -> PASS
F-COPYHEAD-ARGCOPY : with_copyhead correct_call=0.9722 (>= 0.5?) grounding=0.9722 (>= 0.5?) [baseline #1835: correct_call=0.0 grounding=0.0] -> PASS
F-COPYHEAD-OFF-MIRROR : same ckpt, copy OFF correct_call=0.0 grounding=0.0 (MUST be < 0.5) -> PASS
F-COPYHEAD-RANDINIT-MIRROR : random_init grounding=0.0 (MUST be 0) -> PASS
F-COPYHEAD-NOTOOL-MIRROR : with_copyhead+tool_disabled grounding=0.0 (MUST be 0) -> PASS
RULING: GREEN
correct_call 0/36 β 35/36 (0.9722) on the held-out PB01..PB36 keys (values in neither corpus). The single miss is an over-copy (PB28 β PB288), an honest 1/36.
Anti-Goodhart mirrors
- head-OFF (same ckpt, copy gate forced off) β correct_call 0.0: the head does the copy work, not the LM weights.
- random-init + head β grounding 0.0: learned capability, not a trivial/leaked copy.
- tool-disabled β grounding 0.0: the end-to-end win is REAL grounding, not cosmetic markers.
Corpus note (the v1 β v2 fix)
The first fire (v1, fixed 3-char training keys) produced correct_call=0.0 because the copy head
learned to copy exactly a 3-char span and TRUNCATED the 4-char probe (PB01 β PB0). The corpus was
regenerated with variable-length keys (2β5 chars, including 4) so the pointer learns
length-general copy. The head was correct all along; the corpus key-length had to match the probe.
Files
tooluse_copyhead_with_copyhead_18m.ptβ the trained ckpt (state + config + copy_head flag).- sha256:
7941a538755b896eb1e4dfcc0f3d5c2e4de277349e6d2e63ed58ef6b8f0461f7
Reproduce
training/tooluse_copyhead_ab.py (in the anima repo) β --base-ckpt chat_rung0_18m.pt --corpus argcopy_corpus_v2.txt --steps 2500 --batch 32.
Lane G Β· a_lane_akida_gpu_split (GPU, NOT AKIDA) Β· a_paper_negative_ok lineage (#1835 π΄ β this π’).
Model tree for dancinlab/anima-clm-chat-rung0-byte-18m-copyhead
Base model
dancinlab/anima-clm-chat-rung0-byte-18m