Instructions to use Ace-2504/slm-125m-e4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ace-2504/slm-125m-e4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ace-2504/slm-125m-e4")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ace-2504/slm-125m-e4") model = AutoModelForCausalLM.from_pretrained("Ace-2504/slm-125m-e4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ace-2504/slm-125m-e4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ace-2504/slm-125m-e4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ace-2504/slm-125m-e4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Ace-2504/slm-125m-e4
- SGLang
How to use Ace-2504/slm-125m-e4 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 "Ace-2504/slm-125m-e4" \ --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": "Ace-2504/slm-125m-e4", "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 "Ace-2504/slm-125m-e4" \ --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": "Ace-2504/slm-125m-e4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Ace-2504/slm-125m-e4 with Docker Model Runner:
docker model run hf.co/Ace-2504/slm-125m-e4
SLM-125M-e4 β 4 epochs on the rebuilt 2.5B-token corpus
A 125M-parameter LLaMA-style model for US legal/financial text, and the fourth epoch-milestone in a continued-pretraining series:
slm-125m-base (v1) β extended β e2 (2 epochs on the rebuilt 2.5B corpus)
β e4 (this model β 2 further epochs on the same corpus, 4 epochs total).
This run continued Ace-2504/slm-125m-e2 for 2 more epochs (9,440 steps, ~4.95B
tokens; ~2.47B per epoch) on the same rebuilt 2.5B-token corpus (stricter OCR
gate, exhausted case-law source). Fresh cosine schedule, peak LR 3e-4 β floor 3e-5,
one A100-40GB. It exists to answer a research question: once continued
pretraining has already recovered, do further epochs on the same in-distribution
data keep improving a small model, or start to overfit and forget?
Result: further epochs improved every domain β no forgetting
Validation perplexity fell from e2's 9.86 to 9.44. Measured against e2's exact endpoint on the held-out forgetting probe, all three domains improved rather than regressing β the transient rise while the fresh cosine LR peaked was fully recovered and surpassed:
| Domain | loss at e2 start | loss at e4 end | change |
|---|---|---|---|
| SEC filings | 1.7470 | 1.6977 | β2.82% |
| US case law | 2.2828 | 2.2324 | β2.21% |
| FineWeb-Edu | 3.1580 | 3.0987 | β1.88% |
So on this in-distribution corpus, a second round of continued pretraining behaves
as pure improvement, not catastrophic forgetting β the opposite of what the
single-epoch out-of-distribution extended run showed on SEC text.
Architecture
12 layers, 768 hidden, 12 heads, 1024 context, RoPE (ΞΈ=10000), RMSNorm, SwiGLU,
tied embeddings, vocab 16,384 (125.8M params). Same tokenizer and embedding matrix
as slm-125m-base, so token ids mean exactly what they did in v1 training.
Not instruction-tuned β this is a base model. Use Ace-2504/slm-125m-base for the
original, or Ace-2504/slm-125m-e2 for the 2-epoch checkpoint.
- Downloads last month
- 49