Views
No views yet
| Architecture | Llama (via transformers.LlamaForCausalLM) |
| Parameters | 125.8M (tied embeddings) |
| Vocab | 16,384 (byte-level BPE trained on this corpus) |
| Layers / hidden / heads | 12 / 768 / 12 (head dim 64, MHA) |
| Context length | 1,024 |
| Positional | RoPE (θ=10,000) |
| Norm / activation | RMSNorm (1e-5) / SwiGLU (silu) |
| Precision | bf16 training, weights saved fp32 |
| Source | Share | HF dataset |
|---|---|---|
| US case law | ~35% | HFforLegal/case-law (split us) |
| SEC filings | ~42% | PleIAs/SEC |
| Educational web | ~23% | HuggingFaceFW/fineweb-edu (sample-10BT) |
torch.compile, SDPA/flash attention)1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4tok = AutoTokenizer.from_pretrained("s2211252/slm-125m-base")
5model = AutoModelForCausalLM.from_pretrained("s2211252/slm-125m-base", torch_dtype=torch.bfloat16)
6
7prompt = "Pursuant to the terms of this Agreement, the parties"
8ids = tok(prompt, return_tensors="pt").input_ids
9out = model.generate(ids, max_new_tokens=120, do_sample=True, top_k=50, top_p=0.95, temperature=0.8)
10print(tok.decode(out[0], skip_special_tokens=True))