Qwen3.5-0.8B-LumenGDN-Instruct

kennethgrace/Qwen3.5-0.8B-LumenGDN-Healed, instruction-tuned on ChatML conversations. That parent is kennethgrace/Qwen3.5-0.8B-LumenGDN β€” Qwen3.5 rebuilt in Lumen's shapes, its native linear-attention stack transplanted as Gated DeltaNets and its remaining attention layers folded into the same β€” trained back into coherence on flat text. The surgery is documented on the sibling and the heal on the parent; this repo is what supervised fine-tuning made of it.

24 layers β€” 18 the donor's own linear_attention blocks, transplanted exactly, and 6 folded from full_attention β€” d_model=1024, 16 states of width d_k=128 / d_v=128, 771,512,048 parameters in float32. Every layer is a Gated DeltaNet. Unlike the SmolLM2 collapse the feed-forward is kept β€” the donor's own GDN layers have one, so a folded layer keeps its own rather than being folded into the mixer.

Where it got to

Step 18,260, validation loss 0.8929 β€” perplexity 2.442 β€” on a held-out slice of the same mixture it trained on.

step in run val loss val ppl segment
0 0 1.2846 3.61 qwen35-sft-creature
1,500 1,500 1.0268 2.79 qwen35-sft-creature
3,500 3,500 0.9816 2.67 qwen35-sft-creature
5,000 5,000 0.9611 2.61 qwen35-sft-creature
6,500 6,500 0.9462 2.58 qwen35-sft-creature
8,500 8,500 0.9288 2.53 qwen35-sft-creature
10,000 10,000 0.9210 2.51 qwen35-sft-creature
12,000 12,000 0.9088 2.48 qwen35-sft-creature
13,500 13,500 0.9034 2.47 qwen35-sft-creature
15,000 15,000 0.8985 2.46 qwen35-sft-creature
17,000 17,000 0.8942 2.45 qwen35-sft-creature
18,260 18,260 0.8929 2.44 qwen35-sft-creature

The first column counts steps across the whole lineage; the second is the number the run itself used, which restarts at zero whenever a segment began as a --branch. Landmarks only β€” 38 validation points were measured, and all of them are in the record below. Weights are best.pt from qwen35-sft-creature.

Lineage and dose

segment what tokens cumulative
Qwen3.5-0.8B-LumenGDN the surgery, untrained β€” β€”
qwen35-heal-* (five segments) flat-text heal, graft only 5,510M 5,510M
qwen35-sft-creature ChatML SFT, every tensor 1,202M 6,712M

The parent is Qwen3.5-0.8B-LumenGDN-Healed at branch heal-16k-77976 (5.51B tokens, 0.920Γ— donor perplexity in-mixture). That repo's main can move; these weights were trained from that branch and nothing else.

18,260 steps Γ— 65,536 tokens. AdamW, LR 1e-5 cosine to 1e-6, warmup 200, weight decay 0.1, grad clip 1.0. Every tensor trained, with the basis (embeddings, norms, the tied head) at 0.25Γ— the LR. bf16 autocast over fp32 master weights; the weights published here are the fp32 masters. One A100-40GB, 56.8 hours over three sessions, with resume seams at steps 7,501 and 15,001 that do not show in the loss.

One conversation per row, right-padded, each read from a zero state: nothing was packed, so no state ever crossed from one conversation into the next. Loss falls on assistant content and its closing <|im_end|> only, never on a header, a system turn or a user turn. Plain ChatML, with no <think> block. English only.

The data

stream source trained tokens share passes
smoltalk SmolTalk all, minus its two math subsets (numina-cot-100k, metamathqa-50k) 806.6M 67.1% 1.0
omi2-math OpenMathInstruct-2 train_1M, MATH-style problems 230.3M 19.2% 0.5
replay flat text from longform6b that the heal never read 119.5M 9.9% 1.0
omi2-gsm8k OpenMathInstruct-2 train_1M, GSM8K-style problems 41.1M 3.4% 1.0
oasst OASST2, English trees, the best-ranked reply at each turn 4.5M 0.4% 2.0

SmolTalk's math was removed so that every math token came from one stream. OASST2's paths follow the top-ranked reply under each prompt and keep every follow-up, and each reply bears loss once even where several paths share it. Math rows use OpenMathInstruct-2's own instruction ("Solve the following math problem. Make sure to put the answer (and only answer) inside \boxed{}.").

Licences: OASST2 is Apache-2.0; OpenMathInstruct-2 is CC-BY-4.0 (NVIDIA); SmolTalk's own subsets are Apache-2.0 and the public datasets it reuses keep their own licences. The donor, Qwen3.5-0.8B-Base, is Apache-2.0.

Validation by stream

Measured by the trainer at every validation point: 256 held-out rows per stream, loss on assistant tokens only, bf16 autocast with the fla kernel. ref-mix is the headline number above. longform is flat text (20 Γ— 8,192-token windows of longform6b-val), the heal's own validation, re-scored here to measure forgetting.

stream step 0 (= parent) step 18,260 change
smoltalk 1.3626 0.8858 βˆ’0.477
oasst 1.5807 1.4443 βˆ’0.136
omi2-gsm8k 0.7581 0.3255 βˆ’0.433
omi2-math 0.6704 0.3545 βˆ’0.316
replay 2.1113 2.1531 +0.042
ref-mix 1.2846 0.8929 βˆ’0.392
longform 2.0680 2.1415 +0.074

ref-mix was still falling at the end, by 0.003 over the last 2,260 steps.

Math

Greedy, fp32, up to 1,024 new tokens, the prompt above, the full GSM8K test set (1,319) and MATH-500. The trainer's own read reproduced bit for bit on a second machine: 1,819 of 1,819 generations identical.

GSM8K 0-shot MATH-500 0-shot GSM8K 4-shot MATH-500 4-shot
parent, heal-16k-77976 5.9% 1.0% 6.9% 2.0%
this 56.4% 28.2% 51.7% 25.6%
Qwen3.5-0.8B-Base, no SFT 58.3% 32.0% 50.5% 35.8%

The donor Base row is not a same-recipe comparison: the Base was never given this SFT. The control, the same SFT on the Base, has not been run. On GSM8K 0-shot the two solve 553 problems in common; 191 only this one solves, 216 only the Base.

What SFT did not change

  • Choosing by key. keyed_choice.py plants four passcodes in a document and asks for one. The share of samples whose top first digit belongs to the asked code is 0.666 within 1K tokens and 0.384 at 1K–8K, against 0.662 and 0.386 before SFT. Picking blind scores 0.25; the attention donor scores 1.000 and 0.995. The SFT taught chat, not recall.
  • Facts. At 0.8B, relational world knowledge was measured at chance in this model, its parent and the donor Base alike, once phrasing and answer priors were cancelled. Of 30 sampled "fun facts", 26 were false. It states falsehoods fluently and confidently. SFT did not cause that; scale did.
  • Safety. This is SFT only. No preference tuning, no refusal training beyond whatever the data carries.

What SFT cost

Flat text got 0.074 nats worse. That splits into two parts:

  • Fresh-state cost, +0.041 nats, level at every position out to 8,192: a register cost, with no long-context loss at any checkpoint.
  • After a document boundary, +0.116 nats. The SFT corpus contains no <|endoftext|>, so its embedding row drifted more than any other in the vocabulary, and the token no longer triggers the reset the heal learned. In the parent the six folded layers keep 4–24% of their state across an <|endoftext|>; here they keep 96–99.6%, about what an ordinary token keeps. The reset mechanism itself is intact: restoring that one embedding row brings the gate back to 5–23%. That repaired variant is not what is published here, because its cost on chat and math has not been measured.

In practice: give every conversation or document its own zero state. Concatenated text with <|endoftext|> between documents will leak from one into the next. The example below starts a fresh forward call for every prompt, which is a fresh state.

Branches

main is this upload. It is also frozen as sft-creature-18260; pull that branch for a state that will not move.

recall-dpo-17 is this model after 17 steps of DPO on keyed recall in long chats. A code said once in a conversation is recalled out to 16K tokens, where this revision loses it within about 512, and the skill carries to natural facts it never trained on. GSM8K reads 55.5% against 56.4% here, not a significant difference. Its replies are about half as long, and it has not yet been judged against main on ordinary chat, which is why it is a branch and not main. Its own card has the numbers; load it with revision="recall-dpo-17".

What is not here

The optimizer state, by policy. This repository holds states a run begins from, never states a run passes through. Adam's moments exist to serve --resume, which is a mid-run concept β€” so they are never uploaded. That is not a size tradeoff made once; a checkpoint's moments are simply not part of what makes it a starting point.

A pull is therefore always a --branch: fresh moments, step 0, fresh warmup and cosine. Correct for a new corpus, a new sequence length or a new schedule, and deliberately incapable of continuing the epoch that produced these weights.

The record

The training curve and validation trace ship with the weights:

  • record/qwen35-sft-creature/

log.jsonl is per-step loss, learning rate, gradient norm and throughput; validation.jsonl carries loss plus a fixed sample set at every validation point, so what the model said at each step is recoverable, not just what it scored. run.json is the full argument set and corpus composition.

Use

pip install torch safetensors huggingface_hub tokenizers
pip install git+https://github.com/latticedynamics/lumen.git@v0.8.1
import sys, torch
from huggingface_hub import snapshot_download
from tokenizers import Tokenizer

path = snapshot_download("kennethgrace/Qwen3.5-0.8B-LumenGDN-Instruct")   # revision="<branch>" for a state that will not move
sys.path.insert(0, path)
from modeling_qwen35_lumen import load_creature

device = "cuda" if torch.cuda.is_available() else "cpu"
model, manifest = load_creature(path, device=device)
model.eval()
tok = Tokenizer.from_file(f"{path}/tokenizer.json")
tok.encode_special_tokens = True   # a typed "<|im_end|>" stays text, as in training
IM_START, IM_END = tok.token_to_id("<|im_start|>"), tok.token_to_id("<|im_end|>")
STOP = {IM_END, IM_START, tok.token_to_id("<|endoftext|>")}

def text(s):
    return tok.encode(s, add_special_tokens=False).ids

def chat(messages):
    """ChatML as training rendered it, then an open assistant turn."""
    ids = []
    for m in messages:
        ids += [IM_START, *text(m["role"] + "\n"), *text(m["content"]), IM_END, *text("\n")]
    return ids + [IM_START, *text("assistant\n")]

ids = chat([{"role": "user", "content": "What is the capital of Australia?"}])
reply = []
with torch.no_grad():
    for _ in range(256):
        logits = model(torch.tensor([ids + reply], device=device))   # (B, T) -> (B, T, vocab)
        token = logits[0, -1].argmax().item()
        if token in STOP:
            break
        reply.append(token)
print(tok.decode(reply))

tokenizer_config.json carries the same ChatML as a chat_template, with <|im_end|> as its eos_token, for tools that build prompts with apply_chat_template. It renders one string that is then tokenised whole, so it matches training token for token except where a message's content begins with a newline, or contains a special token such as <|im_end|> typed as text; chat() above is the exact form.

If the repository is private, run hf auth login first. The loop is greedy and re-reads the whole sequence for every new token: a demonstration, fine for a few dozen tokens and slow for long outputs.

@v0.8.1 pins the Lumen release this loader was verified against. An unpinned install follows Lumen's main branch, and if Lumen's API changes the loader breaks with nothing at install time to say why.

This is not a transformers architecture and will not load with AutoModelForCausalLM. modeling_qwen35_lumen.py is standalone and depends only on torch, safetensors and lumen; tokenizers is only for the prompt.

Downloads last month

-

Downloads are not tracked for this model. How to track
Safetensors
Model size
0.8B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for kennethgrace/Qwen3.5-0.8B-LumenGDN-Instruct