Views
No views yet
<tool_call>expr</tool_call> for arithmetic while retaining chat ability.| Parameters | 480.9M |
| Layers | 24 |
| Model dim | 1024 |
| Heads | 16 (GQA, kv_group=4 → 4 KV heads) |
| Context | 2048 |
| Vocab | 50304 (GPT-2 BPE, padded from 50257) |
15 * tanh(logits/15)).| Data | FineWeb-Edu sample-10BT (82%) + codeparrot-clean Python (18%) |
| Tokens | ~10.0B (19,073 steps x 524,288 tokens) |
| Schedule | WSD — 3% warmup, stable to step 15,259, linear decay to 0 |
| LR | Muon 0.02, AdamW 1.2e-3 |
| Precision | bf16 autocast |
| Hardware | 1x H100 80GB, ~132k tok/s, ~21h |
Q: What is 47 * 89?
A: I'll compute 47 * 89.
<tool_call>47*89</tool_call>
<tool_result>4183</tool_result> <- calculator output, injected
The answer is 4183.<|im_end|>toolcall.generate_with_tools(model, enc, prompt, device).<tool_call>23+17</tool_call> instead of 23*17. That is a reasoning limit of a 481M
model, not a formatting failure. safe_calc only evaluates arithmetic (+ - * / ** % //)
and rejects anything else, so this is a calculator, never code execution.transformers model. You need model.py
from xerneas3318/modern-lm.1import torch
2from model import GPT, GPT2Config, build_enc
3
4ckpt = torch.load("model.pt", map_location="cpu", weights_only=False)
5model = GPT(GPT2Config(**ckpt["config"]))
6model.load_state_dict(ckpt["model"])
7model.eval()
8
9enc = build_enc() # GPT-2 BPE + reserved chat/tool special tokens<|im_start|>, <|im_end|>, <pad>, <think>, </think>, <tool_call>,
</tool_call>, <tool_result>, </tool_result>. These are untrained during
pretraining (they never occur in the corpus) and are learned at SFT.