Instructions to use Shrijanagain/TINY-THINKER-INSTRUCT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Shrijanagain/TINY-THINKER-INSTRUCT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Shrijanagain/TINY-THINKER-INSTRUCT") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Shrijanagain/TINY-THINKER-INSTRUCT") model = AutoModelForCausalLM.from_pretrained("Shrijanagain/TINY-THINKER-INSTRUCT") 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]:])) - llama-cpp-python
How to use Shrijanagain/TINY-THINKER-INSTRUCT with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Shrijanagain/TINY-THINKER-INSTRUCT", filename="skt-thinker-instruct-q4_k_m.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Shrijanagain/TINY-THINKER-INSTRUCT with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M # Run inference directly in the terminal: llama cli -hf Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M # Run inference directly in the terminal: llama cli -hf Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M
Use Docker
docker model run hf.co/Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Shrijanagain/TINY-THINKER-INSTRUCT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Shrijanagain/TINY-THINKER-INSTRUCT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Shrijanagain/TINY-THINKER-INSTRUCT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M
- SGLang
How to use Shrijanagain/TINY-THINKER-INSTRUCT 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 "Shrijanagain/TINY-THINKER-INSTRUCT" \ --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": "Shrijanagain/TINY-THINKER-INSTRUCT", "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 "Shrijanagain/TINY-THINKER-INSTRUCT" \ --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": "Shrijanagain/TINY-THINKER-INSTRUCT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Shrijanagain/TINY-THINKER-INSTRUCT with Ollama:
ollama run hf.co/Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M
- Unsloth Studio
How to use Shrijanagain/TINY-THINKER-INSTRUCT with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Shrijanagain/TINY-THINKER-INSTRUCT to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Shrijanagain/TINY-THINKER-INSTRUCT to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Shrijanagain/TINY-THINKER-INSTRUCT to start chatting
- Pi
How to use Shrijanagain/TINY-THINKER-INSTRUCT with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Shrijanagain/TINY-THINKER-INSTRUCT with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use Shrijanagain/TINY-THINKER-INSTRUCT with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use Shrijanagain/TINY-THINKER-INSTRUCT with Docker Model Runner:
docker model run hf.co/Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M
- Lemonade
How to use Shrijanagain/TINY-THINKER-INSTRUCT with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Shrijanagain/TINY-THINKER-INSTRUCT:Q4_K_M
Run and chat with the model
lemonade run user.TINY-THINKER-INSTRUCT-Q4_K_M
List all available models
lemonade list
- What Makes Tiny-Thinker Special?
- Why Choose Tiny-Thinker?
- Performance At A Glance
- Quick Start (30 Seconds)
- Code
- Deploy Anywhere
- 1. Transformers (Full Power)
- 2. Quantized (GGUF Format) - Recommended for Laptops
- 3. Llama.cpp (CPU Magic)**
- 4. Ollama (Docker Ready)
- 5. vLLM (Production Scale)
- Optimal Inference Settings
- Parameter Tuning Guide
- Training Data (Table Format)
- Model Card (Table Format)
- Performance Tweaks (Table Format)
- For Math Problems
- Citation

|
|
|
|
|
|
Tiny-Thinker-Instruct 3B
A 3-Billion Parameter Reasoning Beast
Distilled from elite Chain-of-Thought traces for maximum reasoning power
What Makes Tiny-Thinker Special?
| Feature | Description |
|---|---|
|
|
Uses <thought> tags for transparent step-by-step reasoning |
|
|
Trained on AIME, HMMT, and Putnam-level mathematics |
|
|
Runs on laptops: Q4_K_M = 1.9GB, 2.5GB VRAM |
|
|
91.4% on AIME 2025 (+46.4% vs Qwen2.5-3B) |
Why Choose Tiny-Thinker?
|
|
Transparent step-by-step solving |
|
|
AIME, HMMT, Putnam focus |
|
|
Q4_K_M = 1.9GB RAM |
|
|
2x better than baseline! |
|
|
Commercial use allowed |
Performance At A Glance
| Benchmark | Metric | Qwen2.5-3B | Tiny-Thinker | Improvement |
|---|---|---|---|---|
| AIME 2025 | Pass@1 | 45.0% | ||
| AIME 2026 | Pass@1 | 48.0% | ||
| HMMT 2025 | Accuracy | 42.0% | ||
| LiveCodeBench v6 | Pass@1 | 55.0% | ||
| GPQA Diamond | Accuracy | 45.0% | ||
| IFEval | Strict Acc | 85.0% |
Systematically distilled to achieve multi-turn verification loops that outperform massive baseline variants by a wide margin.
Quick Start (30 Seconds)
Installation
pip install -U transformers torch accelerate safetensors flash-attn
Code
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Shrijanagain/TINY-THINKER-INSTRUCT"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
attn_implementation="flash_attention_2"
)
messages = [
{"role": "system", "content": "You are Tiny-Thinker. Solve step-by-step inside <thought> tags."},
{"role": "user", "content": "Find all primes p where 2^p + p^2 is also prime."}
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=2048, temperature=0.2, top_p=0.95)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Deploy Anywhere
1. Transformers (Full Power)
Best for: GPUs, cloud, development servers VRAM: 6-8GB | Speed: ⚡⚡⚡
pip install transformers torch flash-attn
2. Quantized (GGUF Format) - Recommended for Laptops
| Format | Size | VRAM | Use Case |
|---|---|---|---|
| Q8_0 | 3.2 GB | 4.0 GB | Production servers |
| Q6_K | 2.5 GB | 3.0 GB | High-end machines |
| Q5_K_M | 2.2 GB | 2.8 GB | Balanced setups |
| Q4_K_M | 1.9 GB | 2.5 GB | Your laptop |
| Q3_K_L | 1.6 GB | 2.0 GB | Ultra budget |
| Q2_K | 1.3 GB | 1.5 GB | Edge devices |
3. Llama.cpp (CPU Magic)**
git clone https://github.com/ggerganov/llama.cpp && cd llama.cpp && make
./build/bin/llama-cli -m tiny-thinker-Q4_K_M.gguf \
-c 4096 -ngl 99 --temp 0.2 --repeat-penalty 1.05 \
-p "Solve: integral of x^2 * sin(x) dx"
4. Ollama (Docker Ready)
FROM ./tiny-thinker-Q4_K_M.gguf
SYSTEM """You are Tiny-Thinker. Reason inside <thought> tags."""
PARAMETER temperature 0.2
PARAMETER repeat_penalty 1.05
ollama create tiny-thinker -f Modelfile && ollama run tiny-thinker
5. vLLM (Production Scale)
pip install vllm
python -m vllm.entrypoints.openai.api_server \
--model Shrijanagain/TINY-THINKER-INSTRUCT \
--gpu-memory-utilization 0.9 \
--dtype bfloat16
Optimal Inference Settings
generation_config = {
"temperature": 0.2,
"top_p": 0.95,
"repetition_penalty": 1.05,
"max_new_tokens": 2048,
"do_sample": True
}
Parameter Tuning Guide
| Parameter | Value | Purpose |
|---|---|---|
| Temperature | 0.1 - 0.3 | Enforces logical accuracy |
| Top-P | 0.9 - 0.95 | Balances diversity |
| Repetition Penalty | 1.05 | Prevents loops |
| Max Tokens | 1024 - 2048 | Allow deep reasoning |
Training Data (Table Format)
| Training Component | Description |
|---|---|
|
|
Step-by-step reasoning patterns for mathematical problem solving |
|
|
Learn from mistakes through iterative verification loops |
|
|
AIME, HMMT, and Putnam-level competition problems |
|
|
Multi-step validation to ensure answer correctness |
Model Card (Table Format)
| Specification | Details |
|---|---|
|
|
Transformer (Decoder-only) |
|
|
3 Billion (3B) |
|
|
4,096 tokens |
|
|
Flash Attention 2 |
|
|
Mathematical Reasoning |
|
|
bfloat16 / int8 / int4 (quantized) |
|
|
Elite CoT + Competition Mathematics |
|
|
Apache 2.0 |
Performance Tweaks (Table Format)
| Optimization | Benefit |
|---|---|
|
|
Best quality-to-size ratio (1.9GB) |
|
|
3-5x speedup with CUDA acceleration |
|
|
Use vLLM for high-throughput multiple queries |
Pro Tips for Best Results
For Math Problems
system_prompt = """You are Tiny-Thinker, an elite reasoning engine.
For math problems, always:
1. Analyze the problem carefully in <thought> tags
2. Show all work step-by-step
3. Double-check your answer
"""
temperature = 0.1
Citation
@model{tiny_thinker_2025,
title={Tiny-Thinker-Instruct: A 3B Parameter Reasoning Model},
author={Shrijanagain},
year={2025},
publisher={Hugging Face},
url={https://huggingface.co/Shrijanagain/TINY-THINKER-INSTRUCT}
}
- Downloads last month
- 410