mlabonne/guanaco-llama2-1k
Viewer β’ Updated β’ 1k β’ 893 β’ 167
How to use s1nan/llama-3.2-3b-qlora-myproject with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="s1nan/llama-3.2-3b-qlora-myproject")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("s1nan/llama-3.2-3b-qlora-myproject", device_map="auto")How to use s1nan/llama-3.2-3b-qlora-myproject with PEFT:
Task type is invalid.
How to use s1nan/llama-3.2-3b-qlora-myproject with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "s1nan/llama-3.2-3b-qlora-myproject"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "s1nan/llama-3.2-3b-qlora-myproject",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/s1nan/llama-3.2-3b-qlora-myproject
How to use s1nan/llama-3.2-3b-qlora-myproject with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "s1nan/llama-3.2-3b-qlora-myproject" \
--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": "s1nan/llama-3.2-3b-qlora-myproject",
"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 "s1nan/llama-3.2-3b-qlora-myproject" \
--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": "s1nan/llama-3.2-3b-qlora-myproject",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use s1nan/llama-3.2-3b-qlora-myproject with Docker Model Runner:
docker model run hf.co/s1nan/llama-3.2-3b-qlora-myproject
Parameter-efficient instruction fine-tuning of
unsloth/Llama-3.2-3B-Instructusing QLoRA.
SFTTrainerThis model is a QLoRA fine-tuned adapter based on:
unsloth/Llama-3.2-3B-Instruct
The base model remains frozen while lightweight LoRA adapters are trained on the instruction dataset.
Pretrained Llama 3.2 3B
β
βΌ
4-bit Quantization
β
βΌ
Frozen Base Model
β
βΌ
LoRA
β
βΌ
Supervised Fine-Tuning
β
βΌ
Fine-Tuned Adapter
Base model
meta-llama/Llama-3.2-3B-Instruct