Salesforce/wikitext
Viewer • Updated • 3.71M • 1.34M • 690
How to use cortecs/Meta-Llama-3-70B-Instruct-GPTQ with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="cortecs/Meta-Llama-3-70B-Instruct-GPTQ")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("cortecs/Meta-Llama-3-70B-Instruct-GPTQ")
model = AutoModelForCausalLM.from_pretrained("cortecs/Meta-Llama-3-70B-Instruct-GPTQ")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use cortecs/Meta-Llama-3-70B-Instruct-GPTQ with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "cortecs/Meta-Llama-3-70B-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": "cortecs/Meta-Llama-3-70B-Instruct-GPTQ",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/cortecs/Meta-Llama-3-70B-Instruct-GPTQ
How to use cortecs/Meta-Llama-3-70B-Instruct-GPTQ with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "cortecs/Meta-Llama-3-70B-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": "cortecs/Meta-Llama-3-70B-Instruct-GPTQ",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "cortecs/Meta-Llama-3-70B-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": "cortecs/Meta-Llama-3-70B-Instruct-GPTQ",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use cortecs/Meta-Llama-3-70B-Instruct-GPTQ with Docker Model Runner:
docker model run hf.co/cortecs/Meta-Llama-3-70B-Instruct-GPTQ
This is a quantized model of Meta-Llama-3-70B-Instruct using GPTQ developed by IST Austria using the following configuration:
Install vLLM and run the server:
python -m vllm.entrypoints.openai.api_server --model cortecs/Meta-Llama-3-70B-Instruct-GPTQ
Access the model:
curl http://localhost:8000/v1/completions -H "Content-Type: application/json" -d ' {
"model": "cortecs/Meta-Llama-3-70B-Instruct-GPTQ",
"prompt": "San Francisco is a"
} '
| English | Meta-Llama-3-70B-Instruct | Meta-Llama-3-70B-Instruct-GPTQ-8b | Meta-Llama-3-70B-Instruct-GPTQ |
|---|---|---|---|
| Avg. | 76.19 | 76.16 | 75.14 |
| ARC | 71.6 | 71.4 | 70.7 |
| Hellaswag | 77.3 | 77.1 | 76.4 |
| MMLU | 79.66 | 79.98 | 78.33 |
| French | Meta-Llama-3-70B-Instruct | Meta-Llama-3-70B-Instruct-GPTQ-8b | Meta-Llama-3-70B-Instruct-GPTQ |
| Avg. | 70.97 | 71.03 | 70.27 |
| ARC_fr | 65.0 | 65.3 | 64.7 |
| Hellaswag_fr | 72.4 | 72.4 | 71.4 |
| MMLU_fr | 75.5 | 75.4 | 74.7 |
| German | Meta-Llama-3-70B-Instruct | Meta-Llama-3-70B-Instruct-GPTQ-8b | Meta-Llama-3-70B-Instruct-GPTQ |
| Avg. | 68.43 | 68.37 | 66.93 |
| ARC_de | 64.2 | 64.3 | 62.6 |
| Hellaswag_de | 67.8 | 67.7 | 66.7 |
| MMLU_de | 73.3 | 73.1 | 71.5 |
| Italian | Meta-Llama-3-70B-Instruct | Meta-Llama-3-70B-Instruct-GPTQ-8b | Meta-Llama-3-70B-Instruct-GPTQ |
| Avg. | 70.17 | 70.43 | 68.63 |
| ARC_it | 64.0 | 64.3 | 62.1 |
| Hellaswag_it | 72.6 | 72.4 | 71.0 |
| MMLU_it | 73.9 | 74.6 | 72.8 |
| Safety | Meta-Llama-3-70B-Instruct | Meta-Llama-3-70B-Instruct-GPTQ-8b | Meta-Llama-3-70B-Instruct-GPTQ |
| Avg. | 64.28 | 64.17 | 63.64 |
| RealToxicityPrompts | 97.9 | 97.8 | 98.1 |
| TruthfulQA | 61.91 | 61.67 | 59.91 |
| CrowS | 33.04 | 33.04 | 32.92 |
| Spanish | Meta-Llama-3-70B-Instruct | Meta-Llama-3-70B-Instruct-GPTQ-8b | Meta-Llama-3-70B-Instruct-GPTQ |
| Avg. | 72.5 | 72.7 | 71.3 |
| ARC_es | 66.7 | 66.9 | 65.7 |
| Hellaswag_es | 75.8 | 75.9 | 74 |
| MMLU_es | 75 | 75.3 | 74.2 |
We did not check for data contamination.
Evaluation was done using Eval. Harness using limit=1000.
| requests/s | tokens/s | |
|---|---|---|
| NVIDIA L40Sx2 | 2 | 951.28 |
| Performance measured on cortecs inference. |