Llama-3-Lumimaid-70B-v0.1
Collection
EXL2 quants of NeverSleep/Llama-3-Lumimaid-70B-v0.1 • 13 items • Updated
How to use Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM
tokenizer = AutoTokenizer.from_pretrained("Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw")
model = AutoModelForMultimodalLM.from_pretrained("Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw")
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 Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw
How to use Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw" \
--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": "Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw",
"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 "Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw" \
--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": "Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw with Docker Model Runner:
docker model run hf.co/Dracones/Llama-3-Lumimaid-70B-v0.1_exl2_7.0bpw
This is a 7.0bpw EXL2 quant of NeverSleep/Llama-3-Lumimaid-70B-v0.1
Details about the model can be found at the above model page.
These quants were made with exllamav2 version 0.0.18. Quants made on this version of EXL2 may not work on older versions of the exllamav2 library.
If you have problems loading these models, please update Text Generation WebUI to the latest version.
This is the script used for quantization.
#!/bin/bash
# Activate the conda environment
source ~/miniconda3/etc/profile.d/conda.sh
conda activate exllamav2
# Set the model name and bit size
MODEL_NAME="Llama-3-Lumimaid-70B-v0.1"
# Define variables
MODEL_DIR="models/$MODEL_NAME"
OUTPUT_DIR="exl2_$MODEL_NAME"
MEASUREMENT_FILE="measurements/$MODEL_NAME.json"
# Create the measurement file if needed
if [ ! -f "$MEASUREMENT_FILE" ]; then
echo "Creating $MEASUREMENT_FILE"
# Create directories
if [ -d "$OUTPUT_DIR" ]; then
rm -r "$OUTPUT_DIR"
fi
mkdir "$OUTPUT_DIR"
python convert.py -i $MODEL_DIR -o $OUTPUT_DIR -nr -om $MEASUREMENT_FILE
fi
# Choose one of the below. Either create a single quant for testing or a batch of them.
BIT_PRECISIONS=(8.0 7.0 6.0 5.5 5.0 4.5 4.0 3.5 3.25 3.0 2.75 2.5 2.25)
for BIT_PRECISION in "${BIT_PRECISIONS[@]}"
do
CONVERTED_FOLDER="models/${MODEL_NAME}_exl2_${BIT_PRECISION}bpw"
# If it doesn't already exist, make the quant
if [ ! -d "$CONVERTED_FOLDER" ]; then
echo "Creating $CONVERTED_FOLDER"
# Create directories
if [ -d "$OUTPUT_DIR" ]; then
rm -r "$OUTPUT_DIR"
fi
mkdir "$OUTPUT_DIR"
mkdir "$CONVERTED_FOLDER"
# Run conversion commands
python convert.py -i $MODEL_DIR -o $OUTPUT_DIR -nr -m $MEASUREMENT_FILE -b $BIT_PRECISION -cf $CONVERTED_FOLDER
fi
done
Base model
NeverSleep/Llama-3-Lumimaid-70B-v0.1