timarni/reasoning_SFT
Viewer • Updated • 10k • 11
How to use timarni/qwen3_reasoning_sft with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="timarni/qwen3_reasoning_sft")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("timarni/qwen3_reasoning_sft")
model = AutoModelForCausalLM.from_pretrained("timarni/qwen3_reasoning_sft")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use timarni/qwen3_reasoning_sft with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "timarni/qwen3_reasoning_sft"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "timarni/qwen3_reasoning_sft",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/timarni/qwen3_reasoning_sft
How to use timarni/qwen3_reasoning_sft with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "timarni/qwen3_reasoning_sft" \
--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": "timarni/qwen3_reasoning_sft",
"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 "timarni/qwen3_reasoning_sft" \
--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": "timarni/qwen3_reasoning_sft",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use timarni/qwen3_reasoning_sft with Docker Model Runner:
docker model run hf.co/timarni/qwen3_reasoning_sft
axolotl version: 0.9.2
base_model: Qwen/Qwen3-0.6B-Base
# Automatically upload checkpoint and final model to HF
# hub_model_id: username/custom_model_name
plugins:
- axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
strict: false
chat_template: qwen3
datasets:
- path: timarni/reasoning_SFT
type: chat_template
split: train
field_messages: conversations
# message_property_mappings:
# role: from
# content: value
val_set_size: 0.1
output_dir: ./outputs/qwen3_reasoning_sft
dataset_prepared_path: last_run_prepared
# To be sure that no LORA is done
adapter: null
lora: false
merge_lora: false
sequence_len: 4096 #2048
sample_packing: true
eval_sample_packing: true
pad_to_sequence_len: true
wandb_project: mnlp_project
wandb_entity: tim-arni
wandb_watch:
wandb_name: qwen3_reasoning_sft
wandb_log_model:
gradient_accumulation_steps: 2 # 16 following https://unsloth.ai/blog/qwen3
micro_batch_size: 1 # 2
num_epochs: 6
optimizer: adamw_torch
lr_scheduler: cosine
learning_rate: 0.00005 # 0.0002
cosine_min_lr_ratio: 0.1
bf16: auto
tf32: true
gradient_checkpointing: offload
logging_steps: 1
gradient_clipping: 1.0
flash_attention: true
warmup_ratio: 0.03
evals_per_epoch: 4
saves_per_epoch: 2
save_total_limit: 25
weight_decay: 1e-4
special_tokens:
This model is a fine-tuned version of Qwen/Qwen3-0.6B-Base on the timarni/reasoning_SFT dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 0.965 | 0.0037 | 1 | 0.8999 |
| 0.8101 | 0.2505 | 67 | 0.7453 |
| 0.6077 | 0.5009 | 134 | 0.7342 |
| 0.5874 | 0.7514 | 201 | 0.7270 |
| 0.4362 | 1.0 | 268 | 0.7260 |
| 0.6779 | 1.2505 | 335 | 0.7269 |
| 0.505 | 1.5009 | 402 | 0.7310 |
| 0.4969 | 1.7514 | 469 | 0.7274 |
| 0.309 | 2.0 | 536 | 0.7332 |
| 0.5954 | 2.2505 | 603 | 0.7428 |
| 0.4302 | 2.5009 | 670 | 0.7514 |
| 0.4301 | 2.7514 | 737 | 0.7491 |
| 0.23 | 3.0 | 804 | 0.7559 |
| 0.5296 | 3.2505 | 871 | 0.7683 |
| 0.3761 | 3.5009 | 938 | 0.7857 |
| 0.3916 | 3.7514 | 1005 | 0.7818 |
| 0.1842 | 4.0 | 1072 | 0.7863 |
| 0.4926 | 4.2505 | 1139 | 0.7980 |
| 0.3469 | 4.5009 | 1206 | 0.8004 |
| 0.3697 | 4.7514 | 1273 | 0.7908 |
| 0.1665 | 5.0 | 1340 | 0.7925 |
| 0.4773 | 5.2505 | 1407 | 0.8187 |
| 0.3364 | 5.5009 | 1474 | 0.8071 |
| 0.3622 | 5.7514 | 1541 | 0.8020 |
Base model
Qwen/Qwen3-0.6B-Base