Instructions to use srinivasch87/slm125live-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use srinivasch87/slm125live-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="srinivasch87/slm125live-base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("srinivasch87/slm125live-base") model = AutoModelForCausalLM.from_pretrained("srinivasch87/slm125live-base") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use srinivasch87/slm125live-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "srinivasch87/slm125live-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "srinivasch87/slm125live-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/srinivasch87/slm125live-base
- SGLang
How to use srinivasch87/slm125live-base with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "srinivasch87/slm125live-base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "srinivasch87/slm125live-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "srinivasch87/slm125live-base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "srinivasch87/slm125live-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use srinivasch87/slm125live-base with Docker Model Runner:
docker model run hf.co/srinivasch87/slm125live-base
SLM125 β a 125M-parameter legal/financial base language model, trained from scratch
SLM125 is a small (~125.8M parameter), decoder-only transformer pretrained from scratch on a legal- and finance-heavy corpus. It is a base model β it completes text, it is not instruction-tuned or chat-tuned. Give it a sentence to continue ("The plaintiff argued that ..."), not a question.
π Try it live: SLM125 Playground
Model Details
- Architecture: Llama-style decoder-only transformer (RoPE, RMSNorm, SwiGLU MLP, tied embeddings)
- Parameters: ~125.8M
- Hidden size: 768
- Layers: 12
- Attention heads: 12 (head dim 64, standard multi-head attention β no GQA)
- Intermediate (MLP) size: 3,072
- Context length: 1,024 tokens
- Vocabulary: 16,384 tokens (custom-trained tokenizer)
- RoPE theta: 10,000
- Precision: trained and served in fp32/bf16 on Modal
Training Data
Pretrained on a cleaned, deduplicated, decontaminated corpus of ~2.19B tokens, mixed "legal-first" from three public, streamed HuggingFace datasets:
| Source | Dataset | Share | What it is |
|---|---|---|---|
| case-law | HFforLegal/case-law (us config) |
US court opinions (scanned; some OCR noise) | |
| sec | PleIAs/SEC |
SEC filings (10-K, etc.), born-digital | |
| fineweb-edu | HuggingFaceFW/fineweb-edu (sample-10BT) |
General educational web text, added as fluency filler |
The two legal sources were taken in full (they cap out around 2B tokens combined); a smaller web slice was added on top, landing at roughly a 40/40/20 split β about 78% legal/financial text overall, not the originally-planned 70/20/10.
How to Get Started
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "srinivasch87/slm125live-base"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
prompt = "The plaintiff argued that"
inputs = tokenizer(prompt, return_tensors="pt")
output = model.generate(
**inputs,
max_new_tokens=128,
do_sample=True,
temperature=0.8,
top_p=0.95,
top_k=50,
)
print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Intended Use & Limitations
- This is a base completion model, not an instruction-following assistant. It will not reliably answer questions, follow chat-style instructions, or refuse unsafe requests β prompt it with the start of a sentence or document.
- At 125M parameters and ~2.2B training tokens, factual accuracy, coherence over long spans, and reasoning are limited. Treat all output as unverified autocomplete, not legal, financial, or professional advice.
- Training data skews heavily toward US case law and SEC filings, so the model's style and any biases reflect that domain (and the OCR noise present in the scanned case-law source).
- License is not specified for this model; the underlying training datasets each carry their own terms β check the dataset cards linked above before redistributing outputs.
Training & Serving Infrastructure
Built end-to-end on Modal: data cleaning, deduplication, tokenizer training, and pretraining all ran as fanned-out CPU/GPU Modal functions against a shared Modal Volume. Inference is served from a Modal web endpoint with token-streaming generation, behind a Next.js frontend deployed on Vercel (link above).
- Downloads last month
- 358