Instructions to use fmlini251/Llama-3.1-8B-GPTQ-4bit-128g with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- vLLM
How to use fmlini251/Llama-3.1-8B-GPTQ-4bit-128g with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fmlini251/Llama-3.1-8B-GPTQ-4bit-128g" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fmlini251/Llama-3.1-8B-GPTQ-4bit-128g", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/fmlini251/Llama-3.1-8B-GPTQ-4bit-128g
- SGLang
How to use fmlini251/Llama-3.1-8B-GPTQ-4bit-128g 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 "fmlini251/Llama-3.1-8B-GPTQ-4bit-128g" \ --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": "fmlini251/Llama-3.1-8B-GPTQ-4bit-128g", "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 "fmlini251/Llama-3.1-8B-GPTQ-4bit-128g" \ --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": "fmlini251/Llama-3.1-8B-GPTQ-4bit-128g", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use fmlini251/Llama-3.1-8B-GPTQ-4bit-128g with Docker Model Runner:
docker model run hf.co/fmlini251/Llama-3.1-8B-GPTQ-4bit-128g
Llama-3.1-8B GPTQ 4-bit (group size 128)
Built with Llama.
GPTQ-quantized meta-llama/Llama-3.1-8B, produced with AutoGPTQ 0.7.1.
Quantization settings
| bits | 4 |
| group_size | 128 |
| damp_percent | 0.01 |
| desc_act | false |
| sym | true |
| true_sequential | true |
| static_groups | false |
| format | safetensors, fp16 |
Calibration
- Dataset:
wikitext/wikitext-2-raw-v1, train split - 128 samples, sequence length 2048, seed 0
- Sampling follows
examples/quantization/basic_usage_wikitext2.pyfrom AutoGPTQ
Usage
from auto_gptq import AutoGPTQForCausalLM
from transformers import AutoTokenizer
repo = "fmlini251/Llama-3.1-8B-GPTQ-4bit-128g"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoGPTQForCausalLM.from_quantized(repo, device="cuda:0", use_triton=False)
License
Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright (c) Meta Platforms, Inc. All Rights Reserved.
See LICENSE and USE_POLICY.md in this repository.
- Downloads last month
- 34
Model tree for fmlini251/Llama-3.1-8B-GPTQ-4bit-128g
Base model
meta-llama/Llama-3.1-8B