bihar-360m

A small (360M) English model that answers questions about Bihar, India, from a passage you give it. If the passage doesn't contain the answer, it says so.

It is a reader, not an encyclopedia: without a passage it will guess. Check important answers.

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "nalandabh/bihar-360m"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)

SYSTEM = ("You are a helpful assistant for questions about Bihar. Answer only from the provided context. "
          "If the context does not contain the answer, say you don't have that information.")
passage = "Paste a passage about Bihar here."
question = "Your question here?"

messages = [
    {"role": "system", "content": SYSTEM},
    {"role": "user", "content": f"Context:\n{passage}\n\nQuestion: {question}"},
]
ids = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
out = model.generate(ids, max_new_tokens=150, do_sample=False)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))

Use this exact prompt format. When the passage lacks the answer, the reply is: "I don't have that information in the provided text."

Training

Fine-tuned from SmolLM2-360M-Instruct with LoRA. Question-answer pairs were generated from Bihar text chunks with Qwen3-8B and filtered for accuracy. English only.

Text sources: English Wikipedia (CC BY-SA 4.0), Wikidata (CC0) and pages from Grokipedia (grokipedia.com). See ATTRIBUTION.md for the page list.

Limits

v0.1, an early version. English only. Not for legal, medical or official decisions.

Downloads last month
-
Safetensors
Model size
0.4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for nalandabh/bihar-360m

Finetuned
(194)
this model