Instructions to use Open4bits/llama-3.2-1b-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Open4bits/llama-3.2-1b-onnx with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Open4bits/llama-3.2-1b-onnx")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Open4bits/llama-3.2-1b-onnx") model = AutoModelForCausalLM.from_pretrained("Open4bits/llama-3.2-1b-onnx") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Open4bits/llama-3.2-1b-onnx with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Open4bits/llama-3.2-1b-onnx" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Open4bits/llama-3.2-1b-onnx", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Open4bits/llama-3.2-1b-onnx
- SGLang
How to use Open4bits/llama-3.2-1b-onnx 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 "Open4bits/llama-3.2-1b-onnx" \ --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": "Open4bits/llama-3.2-1b-onnx", "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 "Open4bits/llama-3.2-1b-onnx" \ --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": "Open4bits/llama-3.2-1b-onnx", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Open4bits/llama-3.2-1b-onnx with Docker Model Runner:
docker model run hf.co/Open4bits/llama-3.2-1b-onnx
- Xet hash:
- 25a7c2ad4d818ae9e1e287bbdc297e495f728b9e444fc6315af56c154cef6203
- Size of remote file:
- 3.13 GB
- SHA256:
- 4f2940973c6486baf50c29bd945a805bd9862d58c98dfa5fadaff36d0ee23bb4
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.