Image-Text-to-Text
Transformers
Safetensors
qwen3_5
Generated from Trainer
trl
unsloth
sft
conversational
Instructions to use Ba2han/augment-multi-qwen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ba2han/augment-multi-qwen with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Ba2han/augment-multi-qwen") 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("Ba2han/augment-multi-qwen") model = AutoModelForMultimodalLM.from_pretrained("Ba2han/augment-multi-qwen", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ba2han/augment-multi-qwen with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ba2han/augment-multi-qwen" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ba2han/augment-multi-qwen", "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" } } ] } ] }'Use Docker
docker model run hf.co/Ba2han/augment-multi-qwen
- SGLang
How to use Ba2han/augment-multi-qwen 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 "Ba2han/augment-multi-qwen" \ --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": "Ba2han/augment-multi-qwen", "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" } } ] } ] }'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 "Ba2han/augment-multi-qwen" \ --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": "Ba2han/augment-multi-qwen", "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" } } ] } ] }' - Unsloth Studio
How to use Ba2han/augment-multi-qwen with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Ba2han/augment-multi-qwen to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Ba2han/augment-multi-qwen to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Ba2han/augment-multi-qwen to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Ba2han/augment-multi-qwen", max_seq_length=2048, ) - Docker Model Runner
How to use Ba2han/augment-multi-qwen with Docker Model Runner:
docker model run hf.co/Ba2han/augment-multi-qwen
Training in progress, step 500
Browse files- README.md +4 -4
- chat_template.jinja +3 -3
- config.json +8 -16
- model.safetensors +2 -2
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: unsloth/Qwen3.5-
|
| 3 |
library_name: transformers
|
| 4 |
model_name: augment-multi-qwen
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- unsloth
|
| 8 |
- sft
|
| 9 |
-
- trl
|
| 10 |
licence: license
|
| 11 |
---
|
| 12 |
|
| 13 |
# Model Card for augment-multi-qwen
|
| 14 |
|
| 15 |
-
This model is a fine-tuned version of [unsloth/Qwen3.5-
|
| 16 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 17 |
|
| 18 |
## Quick start
|
|
@@ -28,7 +28,7 @@ print(output["generated_text"])
|
|
| 28 |
|
| 29 |
## Training procedure
|
| 30 |
|
| 31 |
-
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/batuhan409/huggingface/runs/
|
| 32 |
|
| 33 |
|
| 34 |
This model was trained with SFT.
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: unsloth/Qwen3.5-2B-Base
|
| 3 |
library_name: transformers
|
| 4 |
model_name: augment-multi-qwen
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
+
- trl
|
| 8 |
- unsloth
|
| 9 |
- sft
|
|
|
|
| 10 |
licence: license
|
| 11 |
---
|
| 12 |
|
| 13 |
# Model Card for augment-multi-qwen
|
| 14 |
|
| 15 |
+
This model is a fine-tuned version of [unsloth/Qwen3.5-2B-Base](https://huggingface.co/unsloth/Qwen3.5-2B-Base).
|
| 16 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 17 |
|
| 18 |
## Quick start
|
|
|
|
| 28 |
|
| 29 |
## Training procedure
|
| 30 |
|
| 31 |
+
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/batuhan409/huggingface/runs/61dp66cf)
|
| 32 |
|
| 33 |
|
| 34 |
This model was trained with SFT.
|
chat_template.jinja
CHANGED
|
@@ -149,10 +149,10 @@
|
|
| 149 |
{%- endfor %}
|
| 150 |
{%- if add_generation_prompt %}
|
| 151 |
{{- '<|im_start|>assistant\n' }}
|
| 152 |
-
{%- if enable_thinking is defined and enable_thinking is
|
| 153 |
-
{{- '<think>\n\n</think>\n\n' }}
|
| 154 |
-
{%- else %}
|
| 155 |
{{- '<think>\n' }}
|
|
|
|
|
|
|
| 156 |
{%- endif %}
|
| 157 |
{%- endif %}
|
| 158 |
{#- Unsloth fixes - developer role, tool calling #}
|
|
|
|
| 149 |
{%- endfor %}
|
| 150 |
{%- if add_generation_prompt %}
|
| 151 |
{{- '<|im_start|>assistant\n' }}
|
| 152 |
+
{%- if enable_thinking is defined and enable_thinking is true %}
|
|
|
|
|
|
|
| 153 |
{{- '<think>\n' }}
|
| 154 |
+
{%- else %}
|
| 155 |
+
{{- '<think>\n\n</think>\n\n' }}
|
| 156 |
{%- endif %}
|
| 157 |
{%- endif %}
|
| 158 |
{#- Unsloth fixes - developer role, tool calling #}
|
config.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"dtype": "bfloat16",
|
| 6 |
"eos_token_id": 248044,
|
| 7 |
"image_token_id": 248056,
|
| 8 |
-
"model_name": "unsloth/Qwen3.5-
|
| 9 |
"model_type": "qwen3_5",
|
| 10 |
"pad_token_id": 248055,
|
| 11 |
"text_config": {
|
|
@@ -18,9 +18,9 @@
|
|
| 18 |
"full_attention_interval": 4,
|
| 19 |
"head_dim": 256,
|
| 20 |
"hidden_act": "silu",
|
| 21 |
-
"hidden_size":
|
| 22 |
"initializer_range": 0.02,
|
| 23 |
-
"intermediate_size":
|
| 24 |
"layer_types": [
|
| 25 |
"linear_attention",
|
| 26 |
"linear_attention",
|
|
@@ -45,20 +45,12 @@
|
|
| 45 |
"linear_attention",
|
| 46 |
"linear_attention",
|
| 47 |
"linear_attention",
|
| 48 |
-
"full_attention",
|
| 49 |
-
"linear_attention",
|
| 50 |
-
"linear_attention",
|
| 51 |
-
"linear_attention",
|
| 52 |
-
"full_attention",
|
| 53 |
-
"linear_attention",
|
| 54 |
-
"linear_attention",
|
| 55 |
-
"linear_attention",
|
| 56 |
"full_attention"
|
| 57 |
],
|
| 58 |
"linear_conv_kernel_dim": 4,
|
| 59 |
"linear_key_head_dim": 128,
|
| 60 |
"linear_num_key_heads": 16,
|
| 61 |
-
"linear_num_value_heads":
|
| 62 |
"linear_value_head_dim": 128,
|
| 63 |
"mamba_ssm_dtype": "float32",
|
| 64 |
"max_position_embeddings": 262144,
|
|
@@ -66,9 +58,9 @@
|
|
| 66 |
"model_type": "qwen3_5_text",
|
| 67 |
"mtp_num_hidden_layers": 1,
|
| 68 |
"mtp_use_dedicated_embeddings": false,
|
| 69 |
-
"num_attention_heads":
|
| 70 |
-
"num_hidden_layers":
|
| 71 |
-
"num_key_value_heads":
|
| 72 |
"pad_token_id": null,
|
| 73 |
"partial_rotary_factor": 0.25,
|
| 74 |
"rms_norm_eps": 1e-06,
|
|
@@ -105,7 +97,7 @@
|
|
| 105 |
"model_type": "qwen3_5",
|
| 106 |
"num_heads": 16,
|
| 107 |
"num_position_embeddings": 2304,
|
| 108 |
-
"out_hidden_size":
|
| 109 |
"patch_size": 16,
|
| 110 |
"spatial_merge_size": 2,
|
| 111 |
"temporal_patch_size": 2
|
|
|
|
| 5 |
"dtype": "bfloat16",
|
| 6 |
"eos_token_id": 248044,
|
| 7 |
"image_token_id": 248056,
|
| 8 |
+
"model_name": "unsloth/Qwen3.5-2B-Base",
|
| 9 |
"model_type": "qwen3_5",
|
| 10 |
"pad_token_id": 248055,
|
| 11 |
"text_config": {
|
|
|
|
| 18 |
"full_attention_interval": 4,
|
| 19 |
"head_dim": 256,
|
| 20 |
"hidden_act": "silu",
|
| 21 |
+
"hidden_size": 2048,
|
| 22 |
"initializer_range": 0.02,
|
| 23 |
+
"intermediate_size": 6144,
|
| 24 |
"layer_types": [
|
| 25 |
"linear_attention",
|
| 26 |
"linear_attention",
|
|
|
|
| 45 |
"linear_attention",
|
| 46 |
"linear_attention",
|
| 47 |
"linear_attention",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
"full_attention"
|
| 49 |
],
|
| 50 |
"linear_conv_kernel_dim": 4,
|
| 51 |
"linear_key_head_dim": 128,
|
| 52 |
"linear_num_key_heads": 16,
|
| 53 |
+
"linear_num_value_heads": 16,
|
| 54 |
"linear_value_head_dim": 128,
|
| 55 |
"mamba_ssm_dtype": "float32",
|
| 56 |
"max_position_embeddings": 262144,
|
|
|
|
| 58 |
"model_type": "qwen3_5_text",
|
| 59 |
"mtp_num_hidden_layers": 1,
|
| 60 |
"mtp_use_dedicated_embeddings": false,
|
| 61 |
+
"num_attention_heads": 8,
|
| 62 |
+
"num_hidden_layers": 24,
|
| 63 |
+
"num_key_value_heads": 2,
|
| 64 |
"pad_token_id": null,
|
| 65 |
"partial_rotary_factor": 0.25,
|
| 66 |
"rms_norm_eps": 1e-06,
|
|
|
|
| 97 |
"model_type": "qwen3_5",
|
| 98 |
"num_heads": 16,
|
| 99 |
"num_position_embeddings": 2304,
|
| 100 |
+
"out_hidden_size": 2048,
|
| 101 |
"patch_size": 16,
|
| 102 |
"spatial_merge_size": 2,
|
| 103 |
"temporal_patch_size": 2
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f9d7dc46d599cf286ba68d2e794f8c3e5ffd29ddd33efbe976203e0401d7ac4b
|
| 3 |
+
size 4426983440
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5713
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:203650bea988f3f34ce73d678d87d9717e4df8feef71208ad0d37a3fcb6ae426
|
| 3 |
size 5713
|