Tuned
Collection
Soft-prompted models • 4 items • Updated
How to use PracticalWork/Falcon3-1B-Instruct-tuned with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("tiiuae/Falcon3-1B-Instruct")
model = PeftModel.from_pretrained(base_model, "PracticalWork/Falcon3-1B-Instruct-tuned")How to use PracticalWork/Falcon3-1B-Instruct-tuned with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="PracticalWork/Falcon3-1B-Instruct-tuned")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("PracticalWork/Falcon3-1B-Instruct-tuned", dtype="auto")How to use PracticalWork/Falcon3-1B-Instruct-tuned with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "PracticalWork/Falcon3-1B-Instruct-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/Falcon3-1B-Instruct-tuned",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/PracticalWork/Falcon3-1B-Instruct-tuned
How to use PracticalWork/Falcon3-1B-Instruct-tuned with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "PracticalWork/Falcon3-1B-Instruct-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/Falcon3-1B-Instruct-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/Falcon3-1B-Instruct-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/Falcon3-1B-Instruct-tuned",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use PracticalWork/Falcon3-1B-Instruct-tuned with Docker Model Runner:
docker model run hf.co/PracticalWork/Falcon3-1B-Instruct-tuned
This model is a fine-tuned version of tiiuae/Falcon3-1B-Instruct 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 | 3.5178 | 33.7116 |
| No log | 0.6011 | 333 | 1.8889 | 6.6122 |
| 1.9189 | 1.2022 | 666 | 1.8092 | 6.1057 |
| 1.9189 | 1.8032 | 999 | 1.7672 | 5.8541 |
| 1.7617 | 2.4043 | 1332 | 1.7440 | 5.7203 |
| 1.7617 | 3 | 1664 | 1.7228 | 5.6001 |
docker model run hf.co/PracticalWork/Falcon3-1B-Instruct-tuned