Downloads · 30 days
15
2% of all-time downloads
VigneshwarKandhaiya/legal-slm-125m-base
legal-slm-125m-base is a text generation model from VigneshwarKandhaiya. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A 125M-parameter Llama-architecture small language model pretrained from scratch on a legal/financial corpus. Base (not instruction-tuned) model.
Downloads · 30 days
15
2% of all-time downloads
All-time downloads
833
Public
Parameters
126M
1.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.onnx693 MB · 58%
From the Hugging Face model README
A 125M-parameter Llama-architecture small language model pretrained from scratch on a legal/financial corpus. Base (not instruction-tuned) model.
HFforLegal/case-law (US court opinions) — ~36%PleIAs/SEC (SEC filings) — ~40%HuggingFaceFW/fineweb-edu (educational web) — ~24%Pipeline: deterministic cleaning (OCR gate, boilerplate/repetition/language filters) → MinHash near-dup + exact-dup removal → 13-gram decontamination against CaseHOLD/LexGLUE (so eval is uncontaminated) → 16K byte-level BPE → packed 1024-token windows.
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("VigneshwarKandhaiya/legal-slm-125m-base")
model = AutoModelForCausalLM.from_pretrained("VigneshwarKandhaiya/legal-slm-125m-base")
ids = tok("The plaintiff shall bear the burden of", return_tensors="pt").input_ids
print(tok.decode(model.generate(ids, max_new_tokens=40)[0], skip_special_tokens=True))
Base model, English only, 125M params — expect fluent domain-styled text, not reliable facts or instruction-following. Not legal or financial advice.