Downloads · 30 days
16
5% of all-time downloads
thesreedath/slm-125m-base
slm-125m-base 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-parameter Llama-style base language model, pretrained from scratch on a legal/financial corpus (US case law + SEC filings + a web slice, ~2.19B tokens).
Downloads · 30 days
16
5% of all-time downloads
All-time downloads
332
Public
Parameters
126M
503 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors252 MB · 100%
From the Hugging Face model README
A 125M-parameter Llama-style base language model, pretrained from scratch on a legal/financial corpus (US case law + SEC filings + a web slice, ~2.19B tokens).
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("thesreedath/slm-125m-base")
model = AutoModelForCausalLM.from_pretrained("thesreedath/slm-125m-base")
ids = tok("The plaintiff alleges that the defendant", return_tensors="pt").input_ids
print(tok.decode(model.generate(ids, max_new_tokens=60, do_sample=True,
temperature=0.8, min_new_tokens=40)[0]))
Full pipeline + fine-tuning code: https://github.com/Vizuara-AI-Lab/slm-125m-from-scratch