RetNet-0.5B v21.1 β€” repaired headline model

Status: usable β€” headline 5-file criterion 2.4885 (v21.0: 3.5027).

Repository (code, analysis, report): https://github.com/Ayaka157/RetNet
Technical report (2026-10-29): https://github.com/Ayaka157/RetNet/blob/main/docs/latex/en/RetNet-0.5B-Technical-Report.pdf

Model

Parameters 504,179,896
Architecture RetNet (retention), 20 layers, width 1408, 22 heads, value/FFN dim 2816
Vocabulary / context 20,000 ByteLevel BPE / 2048 training context
Decay per-head learned $\gamma$; GLA branch implemented but gla_rank=0
Precision stored as fp32 safetensors (1.92 GB); load with orch_dtype=torch.bfloat16 for inference

Files

config.json, model.safetensors, modeling_retnet.py, retention_fast.py, fused_ce.py, tokenizer files. The modeling files come from the published RetNet codebase and are provided so the checkpoint can be loaded with trust_remote_code=True.

from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("Ayaka157/RetNet-0.5B-v21.1", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("Ayaka157/RetNet-0.5B-v21.1", trust_remote_code=True,
                                             torch_dtype="bfloat16")

For serving/prefill use the parallel form, training uses chunkwise, decoding uses recurrent (RETNET_FAST_CHUNKWISE=1 for batched chunkwise). The demo: https://retnet.ayaka157.icu/play/

Evidence and limitations

This is a base model after repair, not a chat model. It fixed v21.0's catastrophic forgetting (+0.655 nat) and the 41.18% declared-zero parameters; all 504,179,896 parameters are live. It has not been instruction-tuned; chat/arithmetic/code ability is at the 0.5B floor.

Links

  • Code, data tooling, evaluation scripts, and the full analysis: https://github.com/Ayaka157/RetNet
  • 2026-10-29 technical report (English / Chinese PDFs) in the headline repository.
Downloads last month
152
Safetensors
Model size
0.5B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support