slm-125m-base

A 125.8M-parameter LLaMA-architecture decoder-only language model pretrained from scratch on a legal/financial-heavy corpus (~2.0B tokens: ~40% US case-law, ~40% SEC filings, ~20% educational web text).

  • Architecture: LLaMA (12 layers, 768 hidden, 12 heads, MHA, RoPE, SwiGLU, RMSNorm)
  • Context length: 1024
  • Vocab: 16,384 (custom byte-level BPE trained on the corpus)
  • Tokenizer: included in this repo
  • Training data: decontaminated against CaseHOLD / LexGLUE (held-out eval)

This is a base model (no instruction tuning). Intended for research and further fine-tuning. Built via the SLM125M replication pipeline (Phases 0-6, all on Modal).

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("sverma8873/slm-125m-base")
model = AutoModelForCausalLM.from_pretrained("sverma8873/slm-125m-base")
ids = tok("The plaintiff shall bear the burden of", return_tensors="pt")
print(tok.decode(model.generate(**ids, max_new_tokens=40)[0]))
Downloads last month
38
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support