RetNet-0.5B, epoch 2
Intermediate checkpoint of the three-leg run. Validation loss 1.9865. The final model is RetNet-0.5B at 1.9459.
Same architecture and configuration: 504,179,896 parameters, 20 layers, d_model 1408, 22 heads,
vocab 20000, context 2048, chunk size 128.
Training
Second leg over chat_pack_v13 (552,330,489 token slots). RTX PRO 6000 96 GB, batch 16 × accum 1,
16,848 steps, 2.790 h wall clock, 54,970 tokens/s. Full cosine 1.1e-4 → 1.1e-5, warmup 500,
AdamW 8-bit, seed 1234.
Its first evaluation lands 0.0764 above epoch 1's best (2.1035) before recovering to 1.9865.
Usage
Identical to the final model — trust_remote_code=True, standard AutoTokenizer:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "Ayaka157/RetNet-0.5B-ep2"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, dtype=torch.float32).eval()
ids = tok("<bos>用户:你好。\n助手:")["input_ids"]
out = model.generate(torch.tensor([ids]), max_new_tokens=64, temperature=0.7)
print(tok.decode(out[0].tolist()[len(ids):]))
As in the other checkpoints, mode in config.json is parallel for inference; the training
run used chunkwise.
Evaluation numbers and the failure notes are on the final model card and in the technical report.
License
MIT.