Instructions to use nvidia/Hymba-1.5B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/Hymba-1.5B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nvidia/Hymba-1.5B-Base", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("nvidia/Hymba-1.5B-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nvidia/Hymba-1.5B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nvidia/Hymba-1.5B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nvidia/Hymba-1.5B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nvidia/Hymba-1.5B-Base
- SGLang
How to use nvidia/Hymba-1.5B-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/Hymba-1.5B-Base" \ --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": "nvidia/Hymba-1.5B-Base", "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 "nvidia/Hymba-1.5B-Base" \ --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": "nvidia/Hymba-1.5B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nvidia/Hymba-1.5B-Base with Docker Model Runner:
docker model run hf.co/nvidia/Hymba-1.5B-Base
Commit History
-
Update README.md
Verified signaturec085c63 -
Update README.md
Verified signature97a94d7
-
Update README.md
Verified signature4257965 -
Upload HymbaForCausalLM
Verified signature5a4f554
-
Update LMFlow support (#6)
Verified signature- Update LMFlow support (88cd2a92ef203e8eee99b981498f9593fa99f97f) Co-authored-by: Shizhe <shizhediao2@users.noreply.huggingface.co>a7335b0
-
Update README.md
Verified signaturee1b7ee9
-
update setup
Xin Donga98fb88
-
Update README.md
Verified signature3d41055 -
Update README.md
Verified signatureefb1459 -
Update README.md
Verified signatureaf44f45 -
Update README.md
Verified signaturec40d210 -
Update README.md
Verified signatureeb62194 -
Merge branch 'main' of hf.co:nvidia/Hymba-1.5B-Base into main
Xin Dongc6d21ce -
update links
Xin Dong0ba64e0
-
fix int/str for conv_dim indexing (#5)
Verified signature- fix int/str for conv_dim indexing (de0cb6571e9c2fcc93a6d5b44b40398488683b59) Co-authored-by: wing lian <winglian@users.noreply.huggingface.co>85e5b83 -
add eval
Xin Dong5c73b29
-
Upload HymbaForCausalLM
Verified signature6abbf5e
-
Update README.md
Verified signature44c3921 -
Update README.md
Verified signaturef8f6a65 -
Update README.md
Verified signatureac59e23 -
Update README.md
Verified signature936bb7f -
Upload HymbaForCausalLM
Verified signature2e0e6a3 -
Update README.md
Verified signatured2764e2 -
Update README.md
Verified signaturebe0c291
-
Update README.md
Verified signature7115e65
-
Initial commit
6015b31