Instructions to use Tiiny/SmallThinker-3B-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tiiny/SmallThinker-3B-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tiiny/SmallThinker-3B-Preview") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Tiiny/SmallThinker-3B-Preview") model = AutoModelForCausalLM.from_pretrained("Tiiny/SmallThinker-3B-Preview", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Tiiny/SmallThinker-3B-Preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tiiny/SmallThinker-3B-Preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tiiny/SmallThinker-3B-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Tiiny/SmallThinker-3B-Preview
- SGLang
How to use Tiiny/SmallThinker-3B-Preview 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-3B-Preview" \ --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": "Tiiny/SmallThinker-3B-Preview", "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 "Tiiny/SmallThinker-3B-Preview" \ --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": "Tiiny/SmallThinker-3B-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Tiiny/SmallThinker-3B-Preview with Docker Model Runner:
docker model run hf.co/Tiiny/SmallThinker-3B-Preview
Commit History
-
Improve language tag
Verified signatureHi! As the model is multilingual, this is a PR to add other languages than English to the language tag to improve the referencing. Note that 29 languages are announced in the README, but only 13 are explicitly listed. I was therefore only able to add these 13 languages.3b46d99
-
Update README.md
Yixin SongVerified signature2ca6a40 -
Update README.md
Yixin SongVerified signaturef9f2cdf
-
Update README.md
Yixin SongVerified signaturef335f91 -
Update README.md
Yixin SongVerified signature60c5f63 -
Update README.md
Yixin SongVerified signatureab33ae2 -
Update README.md
Yixin SongVerified signatured29e0f4
-
Update README.md (#4)
Yixin Song +1: AISafety
Verified signature- Update README.md (ffeee01210018f098e90aa5c391f32e540b3569f) Co-authored-by: AI Safety Research <AISafety@users.noreply.huggingface.co>ccbda51
-
Update README.md
Yixin SongVerified signature53ee55a -
Update README.md
Yixin SongVerified signature6e5607e
-
minor
syx94c6614 -
minor
syx1c3cc64 -
minor
syx1c81b39 -
Update README.md
Yixin SongVerified signaturea325535 -
Update README.md
Yixin SongVerified signature7b48509 -
Update README.md
Yixin SongVerified signaturef7d6bfa
-
aimc
syx0f650b4 -
Delete result/aime24_eval.json
Yixin SongVerified signature6d98efa -
Delete zero_to_fp32.py
Yixin SongVerified signatureb113ff8 -
minoe
syx289b8a2 -
minoe
syx0b68517 -
minor
syx7a5581b -
add eval result
syx2e31d80 -
Update README.md
Yixin SongVerified signature9b1b5d2 -
Update README.md
Yixin SongVerified signature434f731 -
Update README.md
Yixin SongVerified signaturea6eab6c -
Update README.md
Yixin SongVerified signatureb71f3e0 -
Update README.md
Yixin SongVerified signature011743e
-
Update README.md
Yixin SongVerified signature5514a74
-
minor
syx6662798 -
minor
syxafc7124 -
minor
syxf0ad825 -
minor
syx46c2512 -
minor
syx38ae50e -
minor
syxfb9163c -
minor
syxd4dea51 -
minor
syx67ff38a -
minor
syxbb1b8af -
minor
syx555999a
-
update weight
syx0d452c5
-
Update README.md
Yixin SongVerified signature2641c8f -
Update README.md
Yixin SongVerified signature25741de -
Update README.md
Yixin SongVerified signature2e19f5b
-
Update README.md
Yixin SongVerified signature6ff06d6 -
Update README.md
Yixin SongVerified signaturec4e402c -
Update README.md
Yixin SongVerified signature782776b -
Update README.md
Yixin SongVerified signature36f304d -
qwen2 license
syxbc8fad5 -
model weight upload
syx9dedae3 -
initial commit
Yixin SongVerified signature6ca1157