Instructions to use tiennn/day22-qwen25-3b-sft-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use tiennn/day22-qwen25-3b-sft-mini with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/Qwen2.5-3B-Instruct-bnb-4bit") model = PeftModel.from_pretrained(base_model, "tiennn/day22-qwen25-3b-sft-mini") - Transformers
How to use tiennn/day22-qwen25-3b-sft-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tiennn/day22-qwen25-3b-sft-mini") 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("tiennn/day22-qwen25-3b-sft-mini", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tiennn/day22-qwen25-3b-sft-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tiennn/day22-qwen25-3b-sft-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiennn/day22-qwen25-3b-sft-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tiennn/day22-qwen25-3b-sft-mini
- SGLang
How to use tiennn/day22-qwen25-3b-sft-mini with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "tiennn/day22-qwen25-3b-sft-mini" \ --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": "tiennn/day22-qwen25-3b-sft-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
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 "tiennn/day22-qwen25-3b-sft-mini" \ --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": "tiennn/day22-qwen25-3b-sft-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tiennn/day22-qwen25-3b-sft-mini with Docker Model Runner:
docker model run hf.co/tiennn/day22-qwen25-3b-sft-mini
Day 22 Qwen2.5-3B Vietnamese SFT-mini LoRA
This is the SFT stage of a local-GPU preference-alignment lab. It adapts
unsloth/Qwen2.5-3B-Instruct-bnb-4bit on a deterministic 1,000-example slice of
bkai-foundation-models/vi-alpaca before a distinct DPO adapter is trained.
Training
| Setting | Value |
|---|---|
| LoRA rank / alpha | 16 / 32 |
| Epochs | 1 |
| Max sequence length | 512 |
| Learning rate | 2e-4 |
| Effective batch size | 8 |
| Train loss | 0.9616 |
| Runtime | 433.5 s |
| Peak allocated VRAM | 3.099 GB |
The run used BF16 compute on an NVIDIA RTX 5060 Ti 16 GB. Full reproducibility metadata, loss history, tokenizer files, and a Vietnamese generation smoke test are included in this folder.
Use and limitations
Load the base model in 4-bit and attach this adapter with PEFT. This is an educational checkpoint, not a production safety model. The small training slice does not establish broad factuality, robustness, fairness, or medical/legal reliability. Review generated content before downstream use.
Source code and evaluation evidence: https://github.com/Tienlee41/K3-Track3-Day22-2A202601145_LeAnhTien
- Downloads last month
- 5
Model tree for tiennn/day22-qwen25-3b-sft-mini
Base model
Qwen/Qwen2.5-3B