RetNet-0.5B-8k-gla-s — GLA-S long-document research artifact
Status: long-document adaptation PASS, effective-8k test FAIL. This is an experimental artifact, not the recommended model — v21.3-chat remains the served chat model.
The run adds input-dependent scalar decay gates (GLA-S, rank 8, G=1, +229,240 parameters, 20/20 layers) on top of a γ-calibrated 8k base, then trains 12,000 steps at 8,192 tokens (8k/mix8k: 70 % within-doc long / 20 % pretrain / 10 % chat) plus a 1,000-step @2,048 repair pass. 0.852 B tokens total, 2×RTX PRO 6000.
| Parameters | 504,179,896 + 229,240 GLA gates |
| Layers / width / heads | 20 / 1408 / 22 |
| Vocab / training context | 20,000 ByteLevel BPE / 8,192 (+ 2,048 repair) |
| Decay | GLA-S g = min(W2(W1x)+b, 0), b = log γ, rank 8, one group |
| Storage | bfloat16 (model.safetensors, 0.94 GiB) |
| SHA256 (model.safetensors) | 90b655b2c063d1bb314d9598d22b192582ede8cb41fca3c43c871ef89f086236 |
Measured results (val_pack, 5 files / 4,454,400 tokens, skypile excluded)
| Gate | Seed (v21.3-chat) | This artifact | Delta | Verdict |
|---|---|---|---|---|
| 2k criterion | 2.591362 | 2.559693 | −0.031669 | PASS (T1/T2) |
| 8k within-doc long-tail | 3.243222 | 2.964826 | −0.278396 | PASS (T1/T2) |
8k two-arm Δ_marginal_long | +0.049144 | +0.045053 | −0.004091 | FAIL (needs ≥ +0.02 / +0.04) |
| needle@8k | 0.1161 | 0.1117 | −0.004 | not improved |
Combined verdict: T1/T2 FAIL, both blocked on the two-arm metric. The long-tail loss drop is real, but it does not translate into better use of the 8k context; the gate point estimate is negative (CI not available under the registered test).
A short chat gate passed after the 1k repair (concise cap-hit 0 %, unclosed 0 %, median 56 tokens), but the held-out criterion is the reason this checkpoint exists.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "Ayaka157/RetNet-0.5B-8k-gla-s"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, torch_dtype="bfloat16").eval()
The repo ships the GLA-capable code (modeling_retnet.py, gla_kernel.py, objective_loss.py);
trust_remote_code=True is required. For long sequences use the chunkwise path with
RETNET_FAST_CHUNKWISE=1.
Limitations
- Effective 8k did not pass: do not use as an 8k long-context or retrieval model.
- The chat gate passing does not make this a better chat model than v21.3-chat.
- 0.5B knowledge/arithmetic limits apply as in every checkpoint of this family.
All checkpoints
Part of the RetNet-0.5B collection: https://huggingface.co/collections/Ayaka157/retnet-05b-from-scratch-training-line-6afc5fe4007c9acacd1cb52f
Files
model.safetensors, config.json, modeling_retnet.py, gla_kernel.py, objective_loss.py,
retention_fast.py, fused_ce.py, bpe_tokenizer.json, tokenizer files.
Full training log and figures: https://github.com/Ayaka157/RetNet