Instructions to use nvidia/Minitron-4B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/Minitron-4B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nvidia/Minitron-4B-Base")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nvidia/Minitron-4B-Base", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nvidia/Minitron-4B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nvidia/Minitron-4B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nvidia/Minitron-4B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nvidia/Minitron-4B-Base
- SGLang
How to use nvidia/Minitron-4B-Base 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 "nvidia/Minitron-4B-Base" \ --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": "nvidia/Minitron-4B-Base", "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 "nvidia/Minitron-4B-Base" \ --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": "nvidia/Minitron-4B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nvidia/Minitron-4B-Base with Docker Model Runner:
docker model run hf.co/nvidia/Minitron-4B-Base
One of the few small models that does logical inference.
#10
by BingoBird - opened
My private testing method reveals minitron 4B to still be in the top tier of this size models, one year later Feb 2026.
It can make inferences that apply common knowledge not stated in the question context. Some of the winner models are:
2.4G SMART/Qwen3-4B-Hivemind-Inst-Hrtic-Ablit-Uncensored-Q4_K_M-imat.gguf
2.4G SMART/Qwen3-4B-Instruct-2507-Q4_K_M.gguf
2.7G SMART/Qwen3-4B-Thinking-2507-Q5_K_M.gguf
2.9G SMART/Minitron-4B-Base.i1-Q5_K_M.gguf
3.0G SMART/Gemmasutra-4B-v3a-Q6_K.gguf
3.4G SMART/Entropy-Qwen3-4B-Base.i1-Q6_K.gguf
4.0G SMART/Qwen3-4B-Claude-Sonnet-4-RS-DS-ST.Q8_0.gguf
4.0G SMART/Qwen3-4B-Hivemind-Inst-Hrtic-Ablit-Uncensored-Q8_0-imat.gguf
4.0G SMART/Qwen3-Instruct-4B-Kepler-186f.Q8_0.gguf
4.5G SMART/LFM2-8B-A1B-Q4_K_S.gguf
4.7G SMART/Mamba-Codestral-7B-v0.1-Q5_0.gguf
5.8G SMART/Apriel-1.6-15b-Thinker.i1-IQ3_XS.gguf
6.2G SMART/gemma-3-12b-it-norm-preserved-biprojected-abliterated.i1-IQ4_XS.gguf
Most models, including newly released ones under 10GB, fail my logical inference test.
Thank you and congratulations.