Instructions to use Shekswess/trlm-stage-1-sft-final-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Shekswess/trlm-stage-1-sft-final-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Shekswess/trlm-stage-1-sft-final-2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Shekswess/trlm-stage-1-sft-final-2") model = AutoModelForMultimodalLM.from_pretrained("Shekswess/trlm-stage-1-sft-final-2") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Shekswess/trlm-stage-1-sft-final-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Shekswess/trlm-stage-1-sft-final-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Shekswess/trlm-stage-1-sft-final-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Shekswess/trlm-stage-1-sft-final-2
- SGLang
How to use Shekswess/trlm-stage-1-sft-final-2 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 "Shekswess/trlm-stage-1-sft-final-2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Shekswess/trlm-stage-1-sft-final-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Shekswess/trlm-stage-1-sft-final-2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Shekswess/trlm-stage-1-sft-final-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Shekswess/trlm-stage-1-sft-final-2 with Docker Model Runner:
docker model run hf.co/Shekswess/trlm-stage-1-sft-final-2
π§ trlm-stage-1-sft-final-2
trlm-stage-1-sft-final-2 is the Stage 1 post-training model for the Tiny Reasoning Language Model (trlm) project.
This stage focuses on everyday conversations and general instruction following, fine-tuned on a curated dataset of 58,000 entries.
π Model Description
- Base Model: HuggingFaceTB/SmolLM2-135M-Instruct
- Type: Causal Language Model (decoder-only transformer)
- Stage: Post-training Stage 1 (SFT)
- Objective: Build a solid foundation in instruction-following and dialogue coherence before advancing to reasoning-specific training.
This stage teaches the model to follow instructions, rewrite, summarize, and hold conversations without reasoning tokens.
π― Intended Uses & Limitations
Intended Uses
- Everyday conversation assistants
- Instruction-following tasks (summarization, rewriting, simple dialogue)
- Precursor foundation for reasoning post-training (Stage 2+)
Limitations
- Not optimized for reasoning (handled in later stages)
- May struggle with multi-step logical or mathematical problems
- Trained only on English datasets
π Training Data
This model was trained on the dataset:
π Shekswess/trlm-sft-stage-1-final
Dataset summary:
- Entries: 58,000
- Sources: 7 HuggingFaceTB/smoltalk2 subsets
- Focus: Non-reasoning conversations and instruction-following
| Source Dataset | Entries | Percentage % |
|---|---|---|
| smoltalk_smollm3_smol_magpie_ultra_no_think | 33,500 | 57.8% |
| smoltalk_smollm3_smol_summarize_no_think | 7,500 | 12.9% |
| smoltalk_smollm3_smol_rewrite_no_think | 7,500 | 12.9% |
| smoltalk_smollm3_systemchats_30k_no_think | 2,500 | 4.3% |
| smoltalk_smollm3_explore_instruct_rewriting_no_think | 2,500 | 4.3% |
| tulu_3_sft_personas_instruction_following_no_think | 2,500 | 4.3% |
| smoltalk_smollm3_everyday_conversations_no_think | 2,000 | 3.4% |
βοΈ Training Procedure
Training Hyperparameters
- Learning rate: 3e-4
- Train batch size: 32
- Eval batch size: 8
- Gradient accumulation steps: 4
- Total effective batch size: 128
- Optimizer: AdamW (betas=(0.9, 0.99), eps=1e-08)
- LR Scheduler: Cosine with warmup ratio 0.1
- Epochs: 2
- Seed: 42
Framework Versions
- Transformers: 4.56.2
- PyTorch: 2.7.1+rocm7.0.0.git698b58a9
- Datasets: 4.0.0
- Tokenizers: 0.22.1
π Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "Shekswess/trlm-stage-1-sft-final-2"
# Load tokenizer & model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# Example inference
inputs = tokenizer("Write a short daily affirmation:", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
π Next Steps
- Stage 2: Supervised fine-tuning with reasoning-focused data
- Stage 3: DPO / preference optimization for reasoning stability
Part of the Tiny Reasoning Language Model (trlm) post-training pipeline.
- Downloads last month
- 29