Views
No views yet
thesreedath/slm-125m-base.⚠️ Read the limitations before using this. This is a research artifact. When it chooses to answer, it is factually correct only ~23% of the time and will state fabricated dates, figures, and case citations with full confidence. Do not use it for any real legal, financial, or factual purpose.
| Metric | This model | Base model | Meaning |
|---|---|---|---|
| Grounded refusal (swapped context) | 83% | – | Refuses when the passage does not support the question |
| Refusal recall | 79% | 0% | Refuses genuinely unanswerable questions |
| Hallucination rate | 21% | 100% | Answers something unanswerable (lower is better) |
| Answer accuracy | 23% | 0% | Of questions it attempts, judged correct |
| False-refusal rate | 14% | 0% | Refuses an answerable question (lower is better) |
| Invented-figure rate | 1% | 14% | Invents a number absent from the passage (lower is better) |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3tok = AutoTokenizer.from_pretrained("mkr79456/slm-125m-legal-sft")
4model = AutoModelForCausalLM.from_pretrained("mkr79456/slm-125m-legal-sft")
5
6context = "Main Place Funding Corporation was incorporated on June 24, 1994 in Delaware."
7question = "On what date was Main Place Funding Corporation incorporated?"
8
9messages = [
10 {"role": "system", "content": "You are a careful legal and financial assistant. "
11 "Answer only from the provided context. If the context does not contain the answer, "
12 "say exactly: Not stated in the context."},
13 {"role": "user", "content": f"<context>\n{context}\n</context>\n\nQuestion: {question}"},
14]
15prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
16enc = tok(prompt, return_tensors="pt")
17# This tokenizer emits token_type_ids, which generate() rejects -- pass only these two.
18ids = {k: enc[k] for k in ("input_ids", "attention_mask")}
19out = model.generate(**ids, max_new_tokens=80, do_sample=False)
20print(tok.decode(out[0][ids["input_ids"].shape[1]:], skip_special_tokens=True))
21# -> "Main Place Funding Corporation was incorporated on June 24, 1994."<|bos|> <|eos|> <|pad|> <|unk|> <|system|> <|user|> <|assistant|>. Greedy decoding is recommended (this is
extraction, not creative generation).gemini-3.1-flash-lite from a deduplicated, decontaminated corpus (US case law + SEC
filings + a little general web text). Teacher output was filtered by an LLM judge plus a
deterministic check that each answer's supporting quote actually occurs in the passage.gemini-3.1-flash-lite), since the
training data was synthetic.