Instructions to use OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ") model = AutoModelForCausalLM.from_pretrained("OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ
- SGLang
How to use OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ 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 "OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ" \ --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": "OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ", "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 "OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ" \ --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": "OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ with Docker Model Runner:
docker model run hf.co/OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ
OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ
Built with Meta Llama 3
Meta Llama 3 is licensed under the Meta Llama 3 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.
Model Description
This is a 4-bit GPTQ quantized version of meta-llama/Meta-Llama-3-8B-Instruct.
This model was quantized using the following quantization config:
quantize_config = BaseQuantizeConfig(
bits=4,
group_size=128,
desc_act=False,
damp_percent=0.1,
)
To use this model, you need to install AutoGPTQ. For detailed installation instructions, please refer to the AutoGPTQ GitHub repository.
Example Usage
from auto_gptq import AutoGPTQForCausalLM
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3-8B-Instruct")
model = AutoGPTQForCausalLM.from_quantized("OxxoCodes/Meta-Llama-3-8B-Instruct-GPTQ")
output = model.generate(**tokenizer("The capitol of France is", return_tensors="pt").to(model.device))[0]
print(tokenizer.decode(output))
- Downloads last month
- 2