Downloads · 30 days
7
14% of all-time downloads
thesreedath/slm-125m-sft
slm-125m-sft is a machine learning model from thesreedath. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as other.
A 125M legal SLM fine-tuned (SFT) from thesreedath/slm-125m-base (the 10-epoch base) on grounded (RAFT-style) question-answer data: each example provides a context passage and a question, and the model answers from th…
Downloads · 30 days
7
14% of all-time downloads
All-time downloads
49
Public
Parameters
126M
503 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors252 MB · 100%
From the Hugging Face model README
A 125M legal SLM fine-tuned (SFT) from thesreedath/slm-125m-base (the 10-epoch base) on grounded (RAFT-style) question-answer data: each example provides a context passage and a question, and the model answers from the context (or refuses when the answer is not present).
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("thesreedath/slm-125m-sft")
model = AutoModelForCausalLM.from_pretrained("thesreedath/slm-125m-sft")
prompt = ("<|bos|><|system|>\nYou are a legal and financial assistant. Answer the "
"question using ONLY the provided context.<|eos|>\n<|user|>\n<context>\n"
"{PASSAGE}\n</context>\n\nQuestion: {QUESTION}<|eos|>\n<|assistant|>\n")
Full pipeline + code: https://github.com/Vizuara-AI-Lab/slm-125m-from-scratch