Views
No views yet
src/model.py (Retriever500M):retriever500m-data):sft_latest.pt) is the final SFT weights
(model_state_dict + config, step 500). Vocab size = 32009 (includes 9 special
agent tokens: system, user, assistant, search, result, evidence, reasoning,
finish, end).1import torch, sys
2sys.path.insert(0, "src")
3from model import ModelConfig, Retriever500M
4
5ckpt = torch.load("sft_latest.pt", map_location="cuda", weights_only=False)
6config = ModelConfig(**ckpt["config"])
7model = Retriever500M(config).to("cuda")
8model.load_state_dict(ckpt["model_state_dict"])
9model.eval()tokenizer/tokenizer_agent.json (HuggingFace tokenizers library).