Views
No views yet
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3repo = "AnkitAI/Parable-SmolLM3-3B-Claude-Fable-5"
4tok = AutoTokenizer.from_pretrained(repo)
5model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="auto", device_map="auto")
6
7msgs = [{"role": "user", "content": "Write a python function that reverses a string."}]
8ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
9out = model.generate(ids, max_new_tokens=400, temperature=0.6)
10print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))<think>...</think> reasoning block, then the answer.
Parse and strip the think block before showing text to end users. The chat
template identifies the model as "Parable, a coding assistant that reasons
before it answers."| Held-out trace test loss | |
|---|---|
| SmolLM3-3B base | 1.889 |
| This model | 1.115 |
1@misc{aglawe2026parable,
2 author = {Aglawe, Ankit},
3 title = {Agent-Trace Fine-Tuning of Small Language Models under Constrained Compute},
4 year = {2026},
5 doi = {10.5281/zenodo.21676407},
6 url = {https://doi.org/10.5281/zenodo.21676407}
7}