Tuned
Collection
Soft-prompted models • 4 items • Updated
How to use PracticalWork/Qwen3-1.7B-tuned with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-1.7B")
model = PeftModel.from_pretrained(base_model, "PracticalWork/Qwen3-1.7B-tuned")How to use PracticalWork/Qwen3-1.7B-tuned with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="PracticalWork/Qwen3-1.7B-tuned")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("PracticalWork/Qwen3-1.7B-tuned", dtype="auto")How to use PracticalWork/Qwen3-1.7B-tuned with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "PracticalWork/Qwen3-1.7B-tuned"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "PracticalWork/Qwen3-1.7B-tuned",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/PracticalWork/Qwen3-1.7B-tuned
How to use PracticalWork/Qwen3-1.7B-tuned with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "PracticalWork/Qwen3-1.7B-tuned" \
--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": "PracticalWork/Qwen3-1.7B-tuned",
"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 "PracticalWork/Qwen3-1.7B-tuned" \
--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": "PracticalWork/Qwen3-1.7B-tuned",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use PracticalWork/Qwen3-1.7B-tuned with Docker Model Runner:
docker model run hf.co/PracticalWork/Qwen3-1.7B-tuned
This model is a fine-tuned version of Qwen/Qwen3-1.7B on an unknown dataset. It achieves the following results on the evaluation set:
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Perplexity |
|---|---|---|---|---|
| No log | 0 | 0 | 6.3047 | 547.1235 |
| No log | 0.6011 | 333 | 1.8454 | 6.3306 |
| 1.9738 | 1.2022 | 666 | 1.7511 | 5.7610 |
| 1.9738 | 1.8032 | 999 | 1.6936 | 5.4388 |
| 1.7084 | 2.4043 | 1332 | 1.6532 | 5.2239 |
| 1.7084 | 3 | 1664 | 1.6231 | 5.0689 |