Saltar al contenido
ModelPublicadoExterno
Descargar

Slm 125m Base

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).

TipoText modelVersiónmodelDcalidad

Fuente del modelo

Tipo
Text model
Tamaño del archivo
240 MB
Versión
vmodel
Actualizado
19 oct 2026
Descargas
275
Fuente
Hugging Face

Descripción de la fuente

slm-125m-base

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).

  • Pretraining: 10 epochs, 8xH100. Held-out validation perplexity: 8.36.
  • This is a base COMPLETER, not a chat model. Prompt it with the start of a sentence and it continues in the legal register. It speaks the register fluently but does not know facts (knowledge is capped at ~2 bits/param at this size).
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

Fuentes

1 fuente
Hugging FacePrincipalVersión 15e0afe1d7b78224f79287372c4868baab29df15
huggingface.co/thesreedath/slm-125m-base/tree/15e0afe1d7b78224f79287372c4868baab29df15

Verificado 8 ago

Artefactos del modelo

1 artefacto

model.safetensors

safetensors · 240 MB · SHA-256 cc31f3bff9c4…9359 · Hugging Face

Descargar

Extractos de fuentes

3 extractos

--- license: other language: en tags: [legal, from-scratch, llama, small-language-model] --- # slm-125m-base 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). - **Pretraining:** 10 epochs, 8xH100. **Held-out validation perplexity: 8.36**. - **This is a base COMPLETER, not a chat model.** Prompt it with the start of a sentence and it continues in the legal register. It speaks the register fluently but does not know facts (knowledge is capped at ~2 bits/param at this size). ```python 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

Source context: 275 downloads · 1 likes · Repo thesreedath/slm-125m-base

Source context: 145 downloads · 1 likes · Repo thesreedath/slm-125m-base