Instructions to use Ace-2504/slm-125m-extended with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ace-2504/slm-125m-extended with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ace-2504/slm-125m-extended")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ace-2504/slm-125m-extended") model = AutoModelForCausalLM.from_pretrained("Ace-2504/slm-125m-extended", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ace-2504/slm-125m-extended 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-extended" # 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-extended", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Ace-2504/slm-125m-extended
- SGLang
How to use Ace-2504/slm-125m-extended 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-extended" \ --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-extended", "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-extended" \ --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-extended", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Ace-2504/slm-125m-extended with Docker Model Runner:
docker model run hf.co/Ace-2504/slm-125m-extended
SLM-125M-extended โ continued pretraining of slm-125m-base
Ace-2504/slm-125m-base continued for one epoch on ~515M additional tokens
(389M FineWeb-Edu + 131M US case law) that the base model had never seen.
Constant learning rate 1e-4, optimizer state reset, 982 steps on one A100-40GB.
This model exists to answer a research question: does continued pretraining on new data improve a small model overall, or does it cause catastrophic forgetting?
Measured against the base model on its own held-out data, forgetting tracked each domain's share of the new data almost exactly:
| Domain | share of new data | loss change |
|---|---|---|
| SEC filings | 0% | +8.1% (worst) |
| US case law | 25% | +1.0% |
| FineWeb-Edu | 75% | -1.7% (improved) |
Use Ace-2504/slm-125m-base if you want the original. Neither model is
instruction-tuned; both are base models.
- Downloads last month
- 31