yotisstudios/Warrior-SFT
Viewer • Updated • 6.01k • 9
How to use yotisstudios/Warrior-Qwen3.5-4B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-text-to-text", model="yotisstudios/Warrior-Qwen3.5-4B")
messages = [
{
"role": "user",
"content": [
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
{"type": "text", "text": "What animal is on the candy?"}
]
},
]
pipe(text=messages) # Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM
processor = AutoProcessor.from_pretrained("yotisstudios/Warrior-Qwen3.5-4B")
model = AutoModelForMultimodalLM.from_pretrained("yotisstudios/Warrior-Qwen3.5-4B", device_map="auto")
messages = [
{
"role": "user",
"content": [
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
{"type": "text", "text": "What animal is on the candy?"}
]
},
]
inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use yotisstudios/Warrior-Qwen3.5-4B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "yotisstudios/Warrior-Qwen3.5-4B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "yotisstudios/Warrior-Qwen3.5-4B",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
}
}
]
}
]
}'docker model run hf.co/yotisstudios/Warrior-Qwen3.5-4B
How to use yotisstudios/Warrior-Qwen3.5-4B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "yotisstudios/Warrior-Qwen3.5-4B" \
--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": "yotisstudios/Warrior-Qwen3.5-4B",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
}
}
]
}
]
}'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 "yotisstudios/Warrior-Qwen3.5-4B" \
--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": "yotisstudios/Warrior-Qwen3.5-4B",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
}
}
]
}
]
}'How to use yotisstudios/Warrior-Qwen3.5-4B with Docker Model Runner:
docker model run hf.co/yotisstudios/Warrior-Qwen3.5-4B
| Parameter | Value |
|---|---|
| Training Mode | SFT |
| Base Model | Lazarus-Ai/ReAligned-Qwen3.5-4B |
| Learning Rate | 0.0002 |
| Epochs | 2 |
| Batch Size | 1 |
| Gradient Accumulation | 16 |
| Effective Batch Size | 16 |
| Max Sequence Length | 8192 |
| Optimizer | paged_adamw_8bit |
| LR Scheduler | cosine |
| Warmup Ratio | 0.05 |
| Weight Decay | 0.01 |
| Max Grad Norm | 0.3 |
| Seed | 42 |
| LoRA Rank (r) | 64 |
| LoRA Alpha | 128 |
| LoRA Dropout | 0.05 |
| Target Modules | up_proj, down_proj, gate_proj, k_proj, q_proj, v_proj, o_proj |
| Quantization | 4-bit (NF4) |
| GPU | NVIDIA GB10 |
This model was trained with Merlina. Credentials are not included — Merlina will use your own HF_TOKEN and WANDB_API_KEY from .env or the form.
Paste this code into Merlina's Load Configuration → From Code to rebuild the exact training setup:
merlina-config-v1:H4sIACtMgGoC_61VTY_jNgz9K4HOScbxZgczuU0L9NKZw3a36KEoBMambTWSpdVHstnF_PeSspVk0C-g6I2maOrx8ZH6JqTBCC1EELtvYgSDYid-Ae-V9asPJxzfrd-vtt-JpWgxNF65qOxIIZ88qFGN_aKxY6f65IEPFmEAj-2i89YsYPGCXqsRVpGDyW1si3pNuSL0Qex-_W0pQjOgobuFmWLv4px4NSUWJUQe0Yd892ZZgq8-Ua_rdSVel2IPAWW-iLzP8BV8CqsndfcTPmnVE4q3VdkUXYrynwpPlFBbTyCjT7gUbEsvdvfb2QbtBjrd1A-zo_XWUWKxq9bVe67W9xgZVNLIdYvkpPP2d2bVnsZi9xCx2IdifC7GsRh2Moi8OaOMVgY44sRoRhAhHGQ8Oy7q-6efPz49y-cX-lcjeGZXUr8w46uqeinGZCQ62wyErmYOYzPIoL5iZrv30Coco4SmSSbp3GoZIjoK39wTDvgiNY59HMTuYfNYTx5CaVy8HGyqepshoy7IIEXLaphbnttG7tBF8u6RNVmtCYCGPf0UjLVxoLiMm-kyJkcQxSzggJE1HGzyDV6tctmQ-p5-7oAOl8JTuVK15D_bqEKIqVU23BUBfPzhEyvPaUU5J4D8HT2CyQg60AFvPPINZ8RqRVqEtlXMFRD4jGUWPR4vnv8VJ6X9Dyg76w1k6iarAIn2gCNFesqJI-w1QST6D7eZuYOyxYhNvDnkOXktvZ5H699HkQae5pnmBEOAnmRdgE1j12KbqM4mC3e-PvuQpMhy7s90zSy6ZrABuWURQ5zrJdGQlsKZhGuKOGfFdUprieQ4_40cqZqASG3YzuLmmZAjAeS875biBN7QVOc1WOZ-avM0JtW6njbJdq8uJfH3CcZ2fynIpTDwOA_p6qNl108bSO6ROEFJPFhoS5ah43CqSB1vuSE3Ux8cC-mtfLihX5wlrvs-dZc_-EN-TjBOEsib6sNW_ihfeNkcEF2Ol53b3F-1NaSuI2lcJnACdULVD5Gk0cC5UK-95F3OO8sXkTU20NMgbpYMRTQHZ9UYL1ripZaH4rJ0aAvSS2RYnSWTI820kp4yc5IPTDLPHxjJe2TDEB5vHHV2PBYXJVU6vy24qh6yk-YvWi898ro7Yr75KvvLeWiAinfgiepIo_LniFkZJKn4F6eZoHkbr6r1m7sbrRxNlccwWE3t3vDWgxhHqYzTaIgtmJ_jeZPmp0r1jGPijdLQvDekdaWv0sjCzCsc_BUUbfaoZO_S7TzlxK9_AKT0_tMnCAAA
Save this to data/configs/<name>.json, or import it via the Load Configuration dialog.
{
"_metadata": {
"name": "Warrior-Qwen3.5-4B",
"description": "Training configuration shared from a Merlina-trained model.",
"tags": [],
"schema": "merlina/training-config",
"schema_version": 1,
"merlina_version": "2.2.0"
},
"base_model": "Lazarus-Ai/ReAligned-Qwen3.5-4B",
"output_name": "Warrior-Qwen3.5-4B",
"use_lora": true,
"lora_r": 64,
"lora_alpha": 128,
"lora_dropout": 0.05,
"target_modules": [
"up_proj",
"down_proj",
"gate_proj",
"k_proj",
"q_proj",
"v_proj",
"o_proj"
],
"modules_to_save": [],
"lora_task_type": "CAUSAL_LM",
"learning_rate": 0.0002,
"num_epochs": 2,
"batch_size": 1,
"gradient_accumulation_steps": 16,
"max_length": 8192,
"max_prompt_length": 1024,
"model_type": "auto",
"training_mode": "sft",
"beta": 0.1,
"label_smoothing": 0.0,
"gamma": 0.5,
"dataset": {
"source": {
"source_type": "huggingface",
"repo_id": "yotisstudios/Warrior-SFT",
"split": "train",
"streaming": false,
"streaming_batch_size": 10000
},
"additional_sources": [],
"eval_source": {
"source_type": "huggingface",
"repo_id": "yotisstudios/Warrior-SFT",
"split": "val",
"streaming": false,
"streaming_batch_size": 10000
},
"format": {
"format_type": "tokenizer",
"enable_thinking": false,
"auto_detect_thinking": true
},
"model_name": "Lazarus-Ai/ReAligned-Qwen3.5-4B",
"convert_messages_format": true,
"deduplicate": false,
"dedupe_strategy": "prompt_chosen",
"test_size": 0.01,
"system_prompt_mode": "fill_empty",
"training_mode": "sft"
},
"seed": 42,
"max_grad_norm": 0.3,
"warmup_ratio": 0.05,
"eval_steps": 0.2,
"use_4bit": true,
"use_wandb": false,
"push_to_hub": false,
"merge_lora_before_upload": true,
"hf_hub_private": false,
"hf_namespace": "yotisstudios",
"export_gguf": false,
"gguf_quant_types": [
"Q4_K_M"
],
"keep_gguf_fp16": false,
"shuffle_dataset": true,
"weight_decay": 0.01,
"lr_scheduler_type": "cosine",
"gradient_checkpointing": true,
"logging_steps": 1,
"optimizer_type": "paged_adamw_8bit",
"adam_beta1": 0.9,
"adam_beta2": 0.999,
"adam_epsilon": 1e-08,
"adafactor_relative_step": false,
"adafactor_scale_parameter": false,
"adafactor_warmup_init": false,
"adafactor_decay_rate": -0.8,
"adafactor_clip_threshold": 1.0,
"attn_implementation": "auto",
"use_liger": true,
"torch_compile": false,
"eval_on_start": false,
"multi_gpu_strategy": "auto"
}