Instructions to use Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning") model = AutoModelForCausalLM.from_pretrained("Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning") 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 Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning
- SGLang
How to use Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning 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 "Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning" \ --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": "Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning", "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 "Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning" \ --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": "Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning with Docker Model Runner:
docker model run hf.co/Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning
SmolLM2-135M-Instruct-Reasoning
A reasoning-focused fine-tune of SmolLM2-135M-Instruct trained using Unsloth on the combined-reasoning dataset.
Model Overview
This model was created by fine-tuning SmolLM2-135M-Instruct on a reasoning-oriented dataset containing step-by-step solutions and structured problem-solving examples.
The model is intended to:
- Produce detailed reasoning traces
- Explain intermediate steps
- Perform multi-step logical reasoning
- Improve instruction following
- Generate transparent solutions instead of only final answers
Base Model
HuggingFaceTB/SmolLM2-135M-Instruct
Dataset
Avtrkrb/combined-reasoning
Training Method
- Framework: Unsloth
- Fine-tuning type: LoRA
- Task: Supervised Fine-Tuning (SFT)
Prompt Format
This model uses the standard SmolLM2 chat template.
<|im_start|>system You are a helpful AI assistant named SmolLM, trained by Hugging Face <|im_end|>
<|im_start|>user What is 17 × 23? <|im_end|>
<|im_start|>assistant
Example Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "Avtrkrb/SmolLM2-135M-Instruct-bnb-4bit-reasoning"
tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained(model_id)
Intended Use
- Reasoning tasks
- Educational explanations
- Problem solving
- Step-by-step analysis
Limitations
- Small 135M parameter model
- Reasoning quality is limited compared to larger models
- May hallucinate facts
- Should not be used for high-stakes decisions
License
Apache 2.0 (inherits base model licensing)
- Downloads last month
- -