RetNet-0.5B v21.1-chat β€” served chat model

Status: usable with caveats β€” chat-val 2.2573, held-out 2.5898.

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-chat", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("Ayaka157/RetNet-0.5B-v21.1-chat", 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 the model behind the play page. It is trained with only 0.328 B chat tokens (0.593 epoch), and the chat data is dominated by long continuations and unclosed <think> blocks. It needs an explicit concise system prompt; without one it often hits the generation cap. Local arithmetic is 0/4 and factual knowledge is weak; use it as a demo, not as a knowledge worker.

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
122
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