Instructions to use schroneko/qwen3-4b-sft-v5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use schroneko/qwen3-4b-sft-v5 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Instruct-2507") model = PeftModel.from_pretrained(base_model, "schroneko/qwen3-4b-sft-v5") - Transformers
How to use schroneko/qwen3-4b-sft-v5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="schroneko/qwen3-4b-sft-v5") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("schroneko/qwen3-4b-sft-v5", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use schroneko/qwen3-4b-sft-v5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "schroneko/qwen3-4b-sft-v5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "schroneko/qwen3-4b-sft-v5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/schroneko/qwen3-4b-sft-v5
- SGLang
How to use schroneko/qwen3-4b-sft-v5 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 "schroneko/qwen3-4b-sft-v5" \ --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": "schroneko/qwen3-4b-sft-v5", "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 "schroneko/qwen3-4b-sft-v5" \ --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": "schroneko/qwen3-4b-sft-v5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use schroneko/qwen3-4b-sft-v5 with Docker Model Runner:
docker model run hf.co/schroneko/qwen3-4b-sft-v5
qwen3-4b-sft-v5
LoRA adapter for Qwen/Qwen3-4B-Instruct-2507, fine-tuned on structured output tasks (JSON, CSV, XML, YAML, TOML).
Training Details
- Base model: Qwen/Qwen3-4B-Instruct-2507
- Dataset: u-10bei/structured_data_with_cot_dataset_512_v5
- LoRA rank: 64, alpha: 128, dropout: 0.0
- Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
- Epochs: 3
- Learning rate: 2e-5 (cosine scheduler, warmup 10%)
- Batch size: 4, gradient accumulation: 4 (effective batch size: 16)
- Max sequence length: 2048
- Training precision: bf16
- Loss masking: assistant-only with CoT masking (Output: marker)
Training Results
- Total steps: 810
- Final training loss: 0.37 (from 2.49)
- Training time: ~113 minutes on NVIDIA GB10 (DGX Spark)
Hardware
- NVIDIA DGX Spark (ARM64)
- GPU: NVIDIA GB10 (sm_121, Blackwell)
- VRAM: 119.7 GB unified memory
- PyTorch nightly (2.11.0.dev20260105+cu130)
Framework Versions
- PEFT 0.18.1
- Transformers (latest)
- Accelerate (latest)
- Downloads last month
- 1
Model tree for schroneko/qwen3-4b-sft-v5
Base model
Qwen/Qwen3-4B-Instruct-2507