Instructions to use asinha08/slm-125m-sft-pilot-2k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use asinha08/slm-125m-sft-pilot-2k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="asinha08/slm-125m-sft-pilot-2k")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("asinha08/slm-125m-sft-pilot-2k") model = AutoModelForCausalLM.from_pretrained("asinha08/slm-125m-sft-pilot-2k") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use asinha08/slm-125m-sft-pilot-2k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "asinha08/slm-125m-sft-pilot-2k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "asinha08/slm-125m-sft-pilot-2k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/asinha08/slm-125m-sft-pilot-2k
- SGLang
How to use asinha08/slm-125m-sft-pilot-2k 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 "asinha08/slm-125m-sft-pilot-2k" \ --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": "asinha08/slm-125m-sft-pilot-2k", "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 "asinha08/slm-125m-sft-pilot-2k" \ --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": "asinha08/slm-125m-sft-pilot-2k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use asinha08/slm-125m-sft-pilot-2k with Docker Model Runner:
docker model run hf.co/asinha08/slm-125m-sft-pilot-2k
SLM 125M SFT Pilot 2K
This is a supervised fine-tuned 125M-parameter causal language model based on
thesreedath/slm-125m-base.
Training Summary
| Field | Value |
|---|---|
| SFT dataset run | pilot-2k-v2 |
| Train examples | 1800 |
| Validation examples | 100 |
| Epochs | 3 |
| Optimizer steps | 339 |
| Train tokens per epoch | 1262981 |
| Assistant-label tokens per epoch | 62190 |
| Total train-token exposures | 3788943 |
| Total assistant-label token exposures | 186570 |
| Initial validation loss | 3.6077 |
| Initial validation perplexity | 36.88 |
| Final validation loss | 1.5028 |
| Final validation perplexity | 4.49 |
| Training elapsed seconds | 160.1 |
| Estimated GPU-only training cost | $0.0355 |
Dataset
The SFT dataset contains 2,000 generated and judged instruction examples:
| Split | Examples |
|---|---|
| Train | 1,800 |
| Validation | 100 |
| Test | 100 |
Source mix:
| Source | Examples |
|---|---|
| Case law | 703 |
| SEC filings | 890 |
| FineWeb-Edu | 407 |
Task types include grounded question answering, unanswerable/refusal cases, multi-step QA, JSON extraction, summarization, plain-English rewrites, and comparative QA.
Intended Use
This is a small research/experimentation model for legal and financial instruction-following behavior. It is not a substitute for professional legal, financial, or compliance advice.
Prompt Format
The model was trained with the tokenizer/chat markers from the base model:
<|system|>
You are a careful legal and financial assistant...
<|user|>
Context:
...
Question:
...
<|assistant|>
...
<|eos|>
Limitations
- The SFT dataset is small, so behavior should be evaluated carefully.
- Answers should be grounded in supplied context.
- The model may hallucinate if used without retrieval/context.
- Perplexity is measured on the generated validation split, not a broad external benchmark.
- Downloads last month
- 345
Model tree for asinha08/slm-125m-sft-pilot-2k
Base model
thesreedath/slm-125m-base