Instructions to use Tiiny/SmallThinker-21BA3B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tiiny/SmallThinker-21BA3B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tiiny/SmallThinker-21BA3B-Instruct")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Tiiny/SmallThinker-21BA3B-Instruct", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Tiiny/SmallThinker-21BA3B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tiiny/SmallThinker-21BA3B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tiiny/SmallThinker-21BA3B-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Tiiny/SmallThinker-21BA3B-Instruct
- SGLang
How to use Tiiny/SmallThinker-21BA3B-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 "Tiiny/SmallThinker-21BA3B-Instruct" \ --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": "Tiiny/SmallThinker-21BA3B-Instruct", "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 "Tiiny/SmallThinker-21BA3B-Instruct" \ --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": "Tiiny/SmallThinker-21BA3B-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Tiiny/SmallThinker-21BA3B-Instruct with Docker Model Runner:
docker model run hf.co/Tiiny/SmallThinker-21BA3B-Instruct
Commit History
-
Improve model card: Add library, paper, GitHub links, and MoE tag
Verified signatureThis PR improves the model card for **SmallThinker-21BA3B-Instruct** by: - Adding `library_name: transformers` to the metadata, which enables the "Use in Transformers" widget on the model page. - Adding the `moe` tag to the metadata for better discoverability, as this model is a Mixture-of-Experts. - Including a direct link to the official Hugging Face paper page: [SmallThinker: A Family of Efficient Large Language Models Natively Trained for Local Deployment](https://huggingface.co/papers/2507.20984). - Adding a direct link to the main GitHub repository: [https://github.com/SJTU-IPADS/SmallThinker](https://github.com/SJTU-IPADS/SmallThinker). These updates make the model more accessible and easier to understand for the community.359ea43 -
Update README.md
Yixin SongVerified signatureb5bd753 -
Update README.md
Yixin SongVerified signature8c5b3a3
-
Update README.md
Yixin SongVerified signature7883805
-
Update README.md
Verified signatureeddd5e2 -
Update README.md
Verified signature45e4585 -
Update README.md
Verified signaturefe1da60 -
Update README.md
Yixin SongVerified signature109a2c4 -
Update README.md
Yixin SongVerified signatureeb58b5c -
Update README.md
Yixin SongVerified signature9b05bde -
Update README.md
Yixin SongVerified signatureb95a223 -
Update README.md
Verified signatureeeda259 -
Update README.md
Verified signature0c1dea5 -
Update README.md
Verified signature3abcff8 -
Update README.md
Verified signatured2557f8 -
Update README.md
Verified signaturee726dc8 -
Update README.md
Yixin SongVerified signaturebcd1a1f -
Update README.md
Yixin SongVerified signature4859198 -
Update README.md
Verified signatureb87c829 -
Update README.md
Yixin SongVerified signature5f20f2f -
Update README.md
Yixin SongVerified signature003b904 -
Upload model_lm_head.pt with huggingface_hub
Yixin SongVerified signature92c4144 -
Upload model-00003-of-00009.safetensors with huggingface_hub
Verified signatured7ef047 -
Upload model-00004-of-00009.safetensors with huggingface_hub
Verified signature9096ac6 -
Upload model-00005-of-00009.safetensors with huggingface_hub
Verified signatureaa89d6f -
Upload model-00006-of-00009.safetensors with huggingface_hub
Verified signature787be73 -
Upload model-00007-of-00009.safetensors with huggingface_hub
Verified signature1d1e6d6 -
Upload model-00008-of-00009.safetensors with huggingface_hub
Verified signatureef0fb1c -
Upload model-00009-of-00009.safetensors with huggingface_hub
Verified signature41e16d0 -
upload weight
yixinsongc801fda -
upload weight
yixinsongf547afd -
minor
yixinsongbfd2371 -
upload
yixinsonge36ff24
-
minor
yixinsongac8cfe2 -
upload config
yixinsong1040800 -
initial commit
Yixin SongVerified signature3bfc484