A full fine-tune of
ankitw497/slm-125m-base (125.8M params,
trained from scratch on legal/financial/web text) on a grounded QA dataset —
10,000 question-answer pairs synthesized with Gemini 3.1 Flash Lite from the
same pretraining corpus, validated for grounding, and deduplicated.
This is closed-book fine-tuning — the model was never given the source
passage at training or inference time, only the question. At 125.8M
parameters it does not have the capacity to reliably memorize facts from a
2.4B-token corpus, so while it has learned the domain's style well, treat
specific facts, names, and figures in its answers as unverified. A
retrieval-augmented (RAFT-style) setup, where the model is given the
relevant source text at inference time rather than relying on memorization,
would be the more reliable approach at this model size.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3tok = AutoTokenizer.from_pretrained("ankitw497/slm-125m-qa")
4model = AutoModelForCausalLM.from_pretrained("ankitw497/slm-125m-qa")
5
6prompt = "<|user|>{your question}<|assistant|>"
7ids = tok(prompt, return_tensors="pt", return_token_type_ids=False)
8out = model.generate(**ids, max_new_tokens=80, repetition_penalty=1.3, no_repeat_ngram_size=3)
9print(tok.decode(out[0], skip_special_tokens=True))