Text Generation
Transformers
Safetensors
llama
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use typeof/Llama-3-8B-bnb-4bit-exploded with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use typeof/Llama-3-8B-bnb-4bit-exploded with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="typeof/Llama-3-8B-bnb-4bit-exploded")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("typeof/Llama-3-8B-bnb-4bit-exploded") model = AutoModelForCausalLM.from_pretrained("typeof/Llama-3-8B-bnb-4bit-exploded") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use typeof/Llama-3-8B-bnb-4bit-exploded with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "typeof/Llama-3-8B-bnb-4bit-exploded" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "typeof/Llama-3-8B-bnb-4bit-exploded", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/typeof/Llama-3-8B-bnb-4bit-exploded
- SGLang
How to use typeof/Llama-3-8B-bnb-4bit-exploded 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 "typeof/Llama-3-8B-bnb-4bit-exploded" \ --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": "typeof/Llama-3-8B-bnb-4bit-exploded", "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 "typeof/Llama-3-8B-bnb-4bit-exploded" \ --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": "typeof/Llama-3-8B-bnb-4bit-exploded", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use typeof/Llama-3-8B-bnb-4bit-exploded with Docker Model Runner:
docker model run hf.co/typeof/Llama-3-8B-bnb-4bit-exploded
Ctrl+K
- 1.52 kB
- 1.18 kB
- 172 Bytes
- 1.05 GB xet
- 1.05 GB xet
- 8.33 kB xet
- 58.7 MB xet
- 1.84 MB xet
- 7.32 kB xet
- 664 Bytes xet
- 176 Bytes xet
- 514 Bytes xet
- 58.7 MB xet
- 1.84 MB xet
- 7.32 kB xet
- 664 Bytes xet
- 176 Bytes xet
- 516 Bytes xet
- 58.7 MB xet
- 1.84 MB xet
- 7.32 kB xet
- 664 Bytes xet
- 176 Bytes xet
- 508 Bytes xet
- 8.34 kB xet
- 4.19 MB xet
- 131 kB xet
- 664 Bytes xet
- 664 Bytes xet
- 176 Bytes xet
- 512 Bytes xet
- 16.8 MB xet
- 524 kB xet
- 2.2 kB xet
- 664 Bytes xet
- 176 Bytes xet
- 514 Bytes xet
- 16.8 MB xet
- 524 kB xet
- 2.2 kB xet
- 664 Bytes xet
- 176 Bytes xet
- 512 Bytes xet
- 4.19 MB xet
- 131 kB xet
- 664 Bytes xet
- 664 Bytes xet
- 176 Bytes xet
- 514 Bytes xet
- 8.33 kB xet