Image-Text-to-Text
Transformers
Safetensors
GGUF
English
Chinese
qwen3_5
llama.cpp
vision
multimodal
conversational
qwopus3_8
vllm
fine-tuned
coding
code-generation
reasoning
tool-use
agent
efficient-inference
8-bit precision
Instructions to use mlx-community/Qwopus3.8-27B-Coder-Flash-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mlx-community/Qwopus3.8-27B-Coder-Flash-8bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="mlx-community/Qwopus3.8-27B-Coder-Flash-8bit") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("mlx-community/Qwopus3.8-27B-Coder-Flash-8bit") model = AutoModelForMultimodalLM.from_pretrained("mlx-community/Qwopus3.8-27B-Coder-Flash-8bit", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mlx-community/Qwopus3.8-27B-Coder-Flash-8bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mlx-community/Qwopus3.8-27B-Coder-Flash-8bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/Qwopus3.8-27B-Coder-Flash-8bit", "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/mlx-community/Qwopus3.8-27B-Coder-Flash-8bit
- SGLang
How to use mlx-community/Qwopus3.8-27B-Coder-Flash-8bit 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 "mlx-community/Qwopus3.8-27B-Coder-Flash-8bit" \ --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": "mlx-community/Qwopus3.8-27B-Coder-Flash-8bit", "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 "mlx-community/Qwopus3.8-27B-Coder-Flash-8bit" \ --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": "mlx-community/Qwopus3.8-27B-Coder-Flash-8bit", "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 Runner
How to use mlx-community/Qwopus3.8-27B-Coder-Flash-8bit with Docker Model Runner:
docker model run hf.co/mlx-community/Qwopus3.8-27B-Coder-Flash-8bit
Add files using upload-large-folder tool
Browse files- .gitattributes +1 -0
- README.md +274 -0
- chat_template.jinja +184 -0
- config.json +157 -0
- configuration.json +1 -0
- generation_config.json +13 -0
- model-00001-of-00006.safetensors +3 -0
- model-00002-of-00006.safetensors +3 -0
- model-00003-of-00006.safetensors +3 -0
- model-00004-of-00006.safetensors +3 -0
- model-00005-of-00006.safetensors +3 -0
- model-00006-of-00006.safetensors +3 -0
- model.safetensors.index.json +0 -0
- preprocessor_config.json +21 -0
- processor_config.json +60 -0
- tokenizer.json +3 -0
- tokenizer_config.json +300 -0
- video_preprocessor_config.json +21 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: unsloth/Qwen3.8-27B
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
- zh
|
| 6 |
+
library_name: transformers
|
| 7 |
+
license: apache-2.0
|
| 8 |
+
model_name: Qwopus3.8-27B-Coder-Flash
|
| 9 |
+
pipeline_tag: image-text-to-text
|
| 10 |
+
tags:
|
| 11 |
+
- gguf
|
| 12 |
+
- llama.cpp
|
| 13 |
+
- image-text-to-text
|
| 14 |
+
- vision
|
| 15 |
+
- multimodal
|
| 16 |
+
- conversational
|
| 17 |
+
- qwen3_5
|
| 18 |
+
- qwopus3_8
|
| 19 |
+
- transformers
|
| 20 |
+
- vllm
|
| 21 |
+
- fine-tuned
|
| 22 |
+
- coding
|
| 23 |
+
- code-generation
|
| 24 |
+
- reasoning
|
| 25 |
+
- tool-use
|
| 26 |
+
- agent
|
| 27 |
+
- efficient-inference
|
| 28 |
+
base_model_relation: quantized
|
| 29 |
+
---
|
| 30 |
+
|
| 31 |
+
# ⚡ Qwopus3.8-27B-Coder-Flash
|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
|
| 35 |
+
## A coding-oriented Flash model for practical software work
|
| 36 |
+
|
| 37 |
+
**Qwopus3.8-27B-Coder-Flash** is positioned for coding, agentic reasoning, tool use, and efficient execution. It extends the Qwopus Flash philosophy to a 27B model focused on useful software-engineering work: understand the request, make a concrete change, inspect tool feedback, test the result, recover from errors, and deliver the artifact.
|
| 38 |
+
|
| 39 |
+
## 🎨 Visual Coding Showcase
|
| 40 |
+
|
| 41 |
+
### 3D Seaside Town Modeling Test
|
| 42 |
+
|
| 43 |
+
A recorded walkthrough of the 3D seaside town modeling test.
|
| 44 |
+
|
| 45 |
+
<video src="https://huggingface.co/Jackrong/Qwopus3.8-27B-Coder-Flash-GGUF/resolve/main/assets/showcase/seaside_town_3d_modeling_test.mp4" poster="https://huggingface.co/Jackrong/Qwopus3.8-27B-Coder-Flash-GGUF/resolve/main/assets/showcase/seaside_town_3d_modeling_poster.jpg" controls autoplay loop muted playsinline preload="metadata" width="100%" style="width: 100%; border-radius: 12px;"></video>
|
| 46 |
+
|
| 47 |
+
[Open or download the video](https://huggingface.co/Jackrong/Qwopus3.8-27B-Coder-Flash-GGUF/resolve/main/assets/showcase/seaside_town_3d_modeling_test.mp4)
|
| 48 |
+
|
| 49 |
+
### Five-Story Pagoda Test
|
| 50 |
+
|
| 51 |
+

|
| 52 |
+
|
| 53 |
+
These examples illustrate visual coding outputs; they complement the quantitative evaluations below.
|
| 54 |
+
|
| 55 |
+
## 💡 1. The Flash Philosophy — Make Each Token Count
|
| 56 |
+
|
| 57 |
+
Flash puts useful work first. For a coding model, quality means more than producing a plausible answer: it means implementing the requested change, handling relevant edge cases, and helping an agent reach a tested result.
|
| 58 |
+
|
| 59 |
+
The practical workflow is:
|
| 60 |
+
|
| 61 |
+
**Read → Reason → Call Tools → Edit → Test → Recover → Deliver**
|
| 62 |
+
|
| 63 |
+
Compact, purposeful reasoning is a design goal for this model. The evaluations in this card do not measure reasoning-token reduction, so this goal should not be read as a demonstrated reduction in reasoning length or a general speedup. The focus is to spend each turn on a useful next action while preserving code quality and task completion.
|
| 64 |
+
|
| 65 |
+
> [!TIP]
|
| 66 |
+
> **Efficiency includes correctness.** A short response is useful when it solves the task. The results below therefore report task outcomes and decoding throughput separately.
|
| 67 |
+
|
| 68 |
+
## 🧪 2. Model Preparation and Collaboration
|
| 69 |
+
|
| 70 |
+
**Qwopus3.8-27B-Coder-Flash** is a coding-oriented fine-tune of [unsloth/Qwen3.8-27B](https://huggingface.co/unsloth/Qwen3.8-27B), based on [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B). It focuses on code generation, complex reasoning, and the repeated tool-use decisions involved in practical software work. The model uses the **Apache-2.0** license.
|
| 71 |
+
|
| 72 |
+
**Community support.** We thank [Kyle Hessling · @KyleHessling1 on X](https://x.com/KyleHessling1) for his collaboration and support across the Qwopus project, and [Unsloth](https://unsloth.ai/) for its open-source fine-tuning tools and contributions to the model-training community.
|
| 73 |
+
|
| 74 |
+
## 📚 3. Dataset and Distillation Recipe
|
| 75 |
+
|
| 76 |
+
The model was fine-tuned on approximately **200,000 (~200K) code and complex-reasoning examples**, combining agent interactions, algorithm and code-generation tasks, and logical reasoning.
|
| 77 |
+
|
| 78 |
+
| Data component | Approximate scope and sources | Training focus |
|
| 79 |
+
| :--- | :--- | :--- |
|
| 80 |
+
| Agent interaction and tool use | ~20K examples, primarily distilled from **Qwen3.8-Flash-Max** | Multi-turn tool calling, tool selection and execution, environment-state tracking, error recovery, self-correction, context-aware planning, boundary awareness, and final delivery |
|
| 81 |
+
| Algorithm and code generation | Teacher sources: **Qwen3.8-Flash-Max**, **Qwen3.8-Max**, and **DeepSeek-V4-Flash** | Algorithm implementation, complex code generation, syntax correctness, edge cases, refactoring, debugging, structured reasoning, and instruction following |
|
| 82 |
+
| Logical reasoning and instruction tuning | High-quality reasoning and instruction data from the **NVIDIA Nemotron** series | Multi-step reasoning, logical consistency, complex instructions, structured responses, and alignment between reasoning and coding |
|
| 83 |
+
|
| 84 |
+
The agent-interaction examples are intended to help the model work through the repeated decisions in a software-engineering agent: choosing a tool, interpreting its output, updating the plan, correcting an invocation, and returning a finished artifact. Code-generation and reasoning examples complement these trajectories with algorithmic problem solving, instruction execution, and planning.
|
| 85 |
+
|
| 86 |
+
## 📊 4. Benchmark Results — MMLU-Pro and Coding Quality
|
| 87 |
+
|
| 88 |
+
The visual summary below presents local evaluation results. **Coder-Flash** denotes **Qwopus3.8-27B-Coder-Flash**.
|
| 89 |
+
|
| 90 |
+

|
| 91 |
+
|
| 92 |
+
### MMLU-Pro evaluation details
|
| 93 |
+
|
| 94 |
+
> [!NOTE]
|
| 95 |
+
> The reported local score is **93.87% (1,408 / 1,500)** on a balanced subset of **500 mathematics, 500 physics, and 500 chemistry questions**. The run used **zero-shot chain-of-thought (CoT)**; this is a local subset result, distinct from the official five-shot MMLU-Pro protocol.
|
| 96 |
+
|
| 97 |
+
### Throughput and output-length notes
|
| 98 |
+
|
| 99 |
+
The recorded decoder-only throughput is calculated from the number of generated tokens divided by the sum of the requests' decoding times. It is **not** the wall-clock throughput of the entire concurrent evaluation. Results collected under different runtime conditions should not be treated as strict end-to-end comparisons.
|
| 100 |
+
|
| 101 |
+
The aggregate `raw_output` character counts are **9,576,855** for this model, **7,949,546** for Qwopus3.8-27B-Flash, and **8,824,213** for Qwen3.8 Base. Character count is not token count and does not, by itself, establish inference efficiency.
|
| 102 |
+
|
| 103 |
+
## ⚡ 5. Efficiency — Purposeful Reasoning and Practical Inference
|
| 104 |
+
|
| 105 |
+
The Flash design goal is to keep reasoning directed toward the next useful action in a coding or tool-use workflow. This evaluation records a decoder-only throughput of **8.973 tok/s** for Qwopus3.8-27B-Coder-Flash. The corresponding reference figures are **9.347 tok/s** for Qwopus3.8-27B-Flash and **8.284 tok/s** for Qwen3.8 Base.
|
| 106 |
+
|
| 107 |
+
No end-to-end acceleration, memory footprint, energy use, token savings, or reduction in reasoning length is reported here. Those measurements require their own documented test conditions.
|
| 108 |
+
|
| 109 |
+
## 🍎 6. Practical Agent Evaluation
|
| 110 |
+
|
| 111 |
+
Two local evaluations provide separate views of coding-agent behavior.
|
| 112 |
+
|
| 113 |
+
### Agentic software engineering — 9 / 9
|
| 114 |
+
|
| 115 |
+
The coding-agent test covers three concrete changes:
|
| 116 |
+
|
| 117 |
+
1. Repair a function that merges overlapping intervals.
|
| 118 |
+
2. Add a case-sensitivity parameter to a record-search function.
|
| 119 |
+
3. Add a `drop_remainder` parameter to a chunking function.
|
| 120 |
+
|
| 121 |
+
Each task was run with three different seeds and checked with task-specific tests. The model passed **9 / 9 runs (100%)** in this set. This is a small, targeted local evaluation, not a general software-engineering benchmark or a repository-scale success estimate.
|
| 122 |
+
|
| 123 |
+
### Agent error recovery — 144 episodes
|
| 124 |
+
|
| 125 |
+
A separate controlled command-line task asked an agent to turn four rows of telemetry into a JSON summary file. Episodes varied prior-context fixtures, error placement, temperature, and random seed. Scenarios included missing arguments, an invalid output format, an incorrect input path, inspecting tool feedback and help/configuration, checking the filesystem, correcting a tool invocation, and delivering the final artifact.
|
| 126 |
+
|
| 127 |
+

|
| 128 |
+
|
| 129 |
+
## ⚙️ 7. Inference Examples
|
| 130 |
+
|
| 131 |
+
### Checkpoint and runtime
|
| 132 |
+
|
| 133 |
+
Use **Transformers 5.8.0 or newer** for the Qwen3.8 processor, together with a compatible PyTorch installation. The full checkpoint uses the `Qwen3_5ForConditionalGeneration` architecture. BF16 weights alone need approximately **56 GB** of memory, plus additional space for the runtime, activations, and cache. The vLLM example targets a Linux machine with a supported NVIDIA GPU and sufficient VRAM; adjust tensor parallelism for your hardware. See the [Transformers architecture documentation](https://huggingface.co/docs/transformers/model_doc/qwen3_5) and the [official vLLM Qwen3.8 recipe](https://recipes.vllm.ai/Qwen/Qwen3.8-27B) for runtime details.
|
| 134 |
+
|
| 135 |
+
Both examples keep thinking enabled and explicitly use `reasoning_effort="xhigh"`. The supported effort values are `low`, `medium`, and `xhigh`. The output limits below are starting points for a short coding prompt; increase them when a task requires longer reasoning or code.
|
| 136 |
+
|
| 137 |
+
### Transformers — local Python inference
|
| 138 |
+
|
| 139 |
+
Install the dependencies in a dedicated Python environment:
|
| 140 |
+
|
| 141 |
+
```bash
|
| 142 |
+
python -m pip install -U "transformers>=5.8.0" accelerate torch torchvision
|
| 143 |
+
export MODEL_PATH="/path/to/Qwopus3.8-27B-Coder-Flash"
|
| 144 |
+
```
|
| 145 |
+
|
| 146 |
+
```python
|
| 147 |
+
import os
|
| 148 |
+
|
| 149 |
+
import torch
|
| 150 |
+
from transformers import AutoProcessor, Qwen3_5ForConditionalGeneration
|
| 151 |
+
|
| 152 |
+
model_path = os.environ["MODEL_PATH"]
|
| 153 |
+
processor = AutoProcessor.from_pretrained(model_path)
|
| 154 |
+
model = Qwen3_5ForConditionalGeneration.from_pretrained(
|
| 155 |
+
model_path,
|
| 156 |
+
dtype=torch.bfloat16,
|
| 157 |
+
device_map="auto",
|
| 158 |
+
).eval()
|
| 159 |
+
|
| 160 |
+
messages = [
|
| 161 |
+
{
|
| 162 |
+
"role": "user",
|
| 163 |
+
"content": [
|
| 164 |
+
{
|
| 165 |
+
"type": "text",
|
| 166 |
+
"text": "Write a Python function that merges overlapping intervals. Include tests.",
|
| 167 |
+
}
|
| 168 |
+
],
|
| 169 |
+
}
|
| 170 |
+
]
|
| 171 |
+
inputs = processor.apply_chat_template(
|
| 172 |
+
messages,
|
| 173 |
+
tokenize=True,
|
| 174 |
+
add_generation_prompt=True,
|
| 175 |
+
return_dict=True,
|
| 176 |
+
return_tensors="pt",
|
| 177 |
+
enable_thinking=True,
|
| 178 |
+
reasoning_effort="xhigh",
|
| 179 |
+
).to(model.device)
|
| 180 |
+
|
| 181 |
+
with torch.inference_mode():
|
| 182 |
+
output_ids = model.generate(
|
| 183 |
+
**inputs,
|
| 184 |
+
max_new_tokens=8192,
|
| 185 |
+
do_sample=True,
|
| 186 |
+
temperature=1.0,
|
| 187 |
+
top_p=0.95,
|
| 188 |
+
top_k=20,
|
| 189 |
+
)
|
| 190 |
+
|
| 191 |
+
generated_ids = output_ids[:, inputs["input_ids"].shape[1]:]
|
| 192 |
+
print(processor.batch_decode(generated_ids, skip_special_tokens=True)[0])
|
| 193 |
+
```
|
| 194 |
+
|
| 195 |
+
### vLLM — OpenAI-compatible server
|
| 196 |
+
|
| 197 |
+
Use a separate environment for vLLM so that it can install its compatible PyTorch dependencies:
|
| 198 |
+
|
| 199 |
+
```bash
|
| 200 |
+
python -m pip install -U "vllm>=0.17.0" "transformers>=5.8.0" openai
|
| 201 |
+
export MODEL_PATH="/path/to/Qwopus3.8-27B-Coder-Flash"
|
| 202 |
+
|
| 203 |
+
vllm serve "$MODEL_PATH" \
|
| 204 |
+
--served-model-name qwopus-coder-flash \
|
| 205 |
+
--host 127.0.0.1 \
|
| 206 |
+
--port 8000 \
|
| 207 |
+
--dtype bfloat16 \
|
| 208 |
+
--tensor-parallel-size 1 \
|
| 209 |
+
--max-model-len 16384 \
|
| 210 |
+
--reasoning-parser qwen3
|
| 211 |
+
```
|
| 212 |
+
|
| 213 |
+
After the server is ready, run this client in another terminal:
|
| 214 |
+
|
| 215 |
+
```python
|
| 216 |
+
from openai import OpenAI
|
| 217 |
+
|
| 218 |
+
client = OpenAI(
|
| 219 |
+
base_url="http://127.0.0.1:8000/v1",
|
| 220 |
+
api_key="EMPTY",
|
| 221 |
+
timeout=3600,
|
| 222 |
+
)
|
| 223 |
+
response = client.chat.completions.create(
|
| 224 |
+
model="qwopus-coder-flash",
|
| 225 |
+
messages=[
|
| 226 |
+
{
|
| 227 |
+
"role": "user",
|
| 228 |
+
"content": "Write a Python function that merges overlapping intervals. Include tests.",
|
| 229 |
+
}
|
| 230 |
+
],
|
| 231 |
+
temperature=1.0,
|
| 232 |
+
top_p=0.95,
|
| 233 |
+
max_tokens=8192,
|
| 234 |
+
extra_body={
|
| 235 |
+
"top_k": 20,
|
| 236 |
+
"chat_template_kwargs": {
|
| 237 |
+
"enable_thinking": True,
|
| 238 |
+
"reasoning_effort": "xhigh",
|
| 239 |
+
},
|
| 240 |
+
},
|
| 241 |
+
)
|
| 242 |
+
print(response.choices[0].message.content)
|
| 243 |
+
```
|
| 244 |
+
|
| 245 |
+
For automatic tool calling, add `--enable-auto-tool-choice --tool-call-parser qwen3_coder` to the server command and supply tool schemas in the client request. The application is responsible for executing tool calls and returning their results to the model.
|
| 246 |
+
|
| 247 |
+
## 🧭 8. Intended Use and Limitations
|
| 248 |
+
|
| 249 |
+
Potential uses include:
|
| 250 |
+
|
| 251 |
+
- Coding assistance, including implementation, debugging, and refactoring.
|
| 252 |
+
- Software-engineering workflows where an agent reads files, uses tools, edits code, tests changes, and recovers from tool errors.
|
| 253 |
+
- Complex instruction-following and reasoning tasks.
|
| 254 |
+
- Local experimentation with compatible inference runtimes.
|
| 255 |
+
|
| 256 |
+
The reported evidence is limited to the specified local MMLU-Pro run, three seeded coding tasks, one controlled command-line error-recovery scenario, and the stated decoder-only throughput measurements. Performance on other benchmarks is not reported here. Benchmark protocol, task selection, runtime, and orchestration all affect interpretation.
|
| 257 |
+
|
| 258 |
+
Generated code and tool actions can still be incorrect, incomplete, or poorly adapted to a user's environment. Results from the small agent tests do not guarantee success on larger repositories, novel tools, longer work sessions, or different harnesses. Review generated code and tool actions before using them in consequential workflows.
|
| 259 |
+
|
| 260 |
+
## 🙏 9. Acknowledgements and Citation
|
| 261 |
+
|
| 262 |
+
We thank the Qwen and NVIDIA Nemotron communities for their model and data contributions. We also recognize [Kyle Hessling (@KyleHessling1)](https://x.com/KyleHessling1) for collaboration and support across the Qwopus project, and [Unsloth](https://unsloth.ai/) for its open-source fine-tuning tools and community contributions.
|
| 263 |
+
|
| 264 |
+
If you use this model in your work, please cite:
|
| 265 |
+
|
| 266 |
+
```bibtex
|
| 267 |
+
@misc{jackrong2026qwopus3827bcoderflash,
|
| 268 |
+
author = {Jackrong},
|
| 269 |
+
title = {Qwopus3.8-27B-Coder-Flash},
|
| 270 |
+
year = {2026},
|
| 271 |
+
howpublished = {Hugging Face},
|
| 272 |
+
url = {https://huggingface.co/Jackrong/Qwopus3.8-27B-Coder-Flash-GGUF}
|
| 273 |
+
}
|
| 274 |
+
```
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
| 1 |
+
{%- set image_count = namespace(value=0) %}
|
| 2 |
+
{%- set video_count = namespace(value=0) %}
|
| 3 |
+
{%- macro render_content(content, do_vision_count, is_system_content=false) %}
|
| 4 |
+
{%- if content is string %}
|
| 5 |
+
{{- content }}
|
| 6 |
+
{%- elif content is iterable and content is not mapping %}
|
| 7 |
+
{%- for item in content %}
|
| 8 |
+
{%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
|
| 9 |
+
{%- if is_system_content %}
|
| 10 |
+
{{- raise_exception('System message cannot contain images.') }}
|
| 11 |
+
{%- endif %}
|
| 12 |
+
{%- if do_vision_count %}
|
| 13 |
+
{%- set image_count.value = image_count.value + 1 %}
|
| 14 |
+
{%- endif %}
|
| 15 |
+
{%- if add_vision_id %}
|
| 16 |
+
{{- 'Picture ' ~ image_count.value ~ ': ' }}
|
| 17 |
+
{%- endif %}
|
| 18 |
+
{{- '<|vision_start|><|image_pad|><|vision_end|>' }}
|
| 19 |
+
{%- elif 'video' in item or item.type == 'video' %}
|
| 20 |
+
{%- if is_system_content %}
|
| 21 |
+
{{- raise_exception('System message cannot contain videos.') }}
|
| 22 |
+
{%- endif %}
|
| 23 |
+
{%- if do_vision_count %}
|
| 24 |
+
{%- set video_count.value = video_count.value + 1 %}
|
| 25 |
+
{%- endif %}
|
| 26 |
+
{%- if add_vision_id %}
|
| 27 |
+
{{- 'Video ' ~ video_count.value ~ ': ' }}
|
| 28 |
+
{%- endif %}
|
| 29 |
+
{{- '<|vision_start|><|video_pad|><|vision_end|>' }}
|
| 30 |
+
{%- elif 'text' in item %}
|
| 31 |
+
{{- item.text }}
|
| 32 |
+
{%- else %}
|
| 33 |
+
{{- raise_exception('Unexpected item type in content.') }}
|
| 34 |
+
{%- endif %}
|
| 35 |
+
{%- endfor %}
|
| 36 |
+
{%- elif content is none or content is undefined %}
|
| 37 |
+
{{- '' }}
|
| 38 |
+
{%- else %}
|
| 39 |
+
{{- raise_exception('Unexpected content type.') }}
|
| 40 |
+
{%- endif %}
|
| 41 |
+
{%- endmacro %}
|
| 42 |
+
{%- if not messages %}
|
| 43 |
+
{{- raise_exception('No messages provided.') }}
|
| 44 |
+
{%- endif %}
|
| 45 |
+
{%- set sysns = namespace(count=0, text='') %}
|
| 46 |
+
{%- for message in messages %}
|
| 47 |
+
{%- if sysns.count == loop.index0 and (message.role == 'system' or message.role == 'developer') %}
|
| 48 |
+
{%- set sys_content = render_content(message.content, false, true)|trim %}
|
| 49 |
+
{%- if sys_content %}
|
| 50 |
+
{%- set sysns.text = sysns.text + ('\n' if sysns.text else '') + sys_content %}
|
| 51 |
+
{%- endif %}
|
| 52 |
+
{%- set sysns.count = sysns.count + 1 %}
|
| 53 |
+
{%- endif %}
|
| 54 |
+
{%- endfor %}
|
| 55 |
+
{%- set num_sys = sysns.count %}
|
| 56 |
+
{%- set merged_system = sysns.text %}
|
| 57 |
+
{%- set reasoning_instructions = '' %}
|
| 58 |
+
{%- if enable_thinking is undefined or enable_thinking is true %}
|
| 59 |
+
{%- set resolved_reasoning_effort = reasoning_effort|default('xhigh') %}
|
| 60 |
+
{%- if resolved_reasoning_effort == 'high' %}
|
| 61 |
+
{%- set resolved_reasoning_effort = 'xhigh' %}
|
| 62 |
+
{%- endif %}
|
| 63 |
+
{%- if resolved_reasoning_effort not in ('xhigh', 'medium', 'low') %}
|
| 64 |
+
{{- raise_exception('Unexpected reasoning effort ' ~ reasoning_effort ~ '. Supported types are xhigh (default), medium, and low.') }}
|
| 65 |
+
{%- endif %}
|
| 66 |
+
{%- if resolved_reasoning_effort == 'xhigh' %}
|
| 67 |
+
{%- set reasoning_instructions = 'Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.' %}
|
| 68 |
+
{%- elif resolved_reasoning_effort == 'low' %}
|
| 69 |
+
{%- set reasoning_instructions = 'Reasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.' %}
|
| 70 |
+
{%- endif %}
|
| 71 |
+
{%- endif %}
|
| 72 |
+
{%- if tools and tools is iterable and tools is not mapping %}
|
| 73 |
+
{{- '<|im_start|>system\n' }}
|
| 74 |
+
{%- if reasoning_instructions %}
|
| 75 |
+
{{- reasoning_instructions + '\n\n' }}
|
| 76 |
+
{%- endif %}
|
| 77 |
+
{{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
|
| 78 |
+
{%- for tool in tools %}
|
| 79 |
+
{{- "\n" }}
|
| 80 |
+
{{- tool | tojson }}
|
| 81 |
+
{%- endfor %}
|
| 82 |
+
{{- "\n</tools>" }}
|
| 83 |
+
{{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
|
| 84 |
+
{%- if merged_system %}
|
| 85 |
+
{{- '\n\n' + merged_system }}
|
| 86 |
+
{%- endif %}
|
| 87 |
+
{{- '<|im_end|>\n' }}
|
| 88 |
+
{%- else %}
|
| 89 |
+
{%- if merged_system %}
|
| 90 |
+
{{- '<|im_start|>system\n' + (reasoning_instructions + '\n\n' if reasoning_instructions else '') + merged_system + '<|im_end|>\n' }}
|
| 91 |
+
{%- elif reasoning_instructions %}
|
| 92 |
+
{{- '<|im_start|>system\n' + reasoning_instructions + '<|im_end|>\n' }}
|
| 93 |
+
{%- endif %}
|
| 94 |
+
{%- endif %}
|
| 95 |
+
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
| 96 |
+
{%- for message in messages[::-1] %}
|
| 97 |
+
{%- set index = (messages|length - 1) - loop.index0 %}
|
| 98 |
+
{%- if ns.multi_step_tool and message.role == "user" %}
|
| 99 |
+
{%- set content = render_content(message.content, false)|trim %}
|
| 100 |
+
{%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
|
| 101 |
+
{%- set ns.multi_step_tool = false %}
|
| 102 |
+
{%- set ns.last_query_index = index %}
|
| 103 |
+
{%- endif %}
|
| 104 |
+
{%- endif %}
|
| 105 |
+
{%- endfor %}
|
| 106 |
+
{%- for message in messages %}
|
| 107 |
+
{%- if loop.index0 >= num_sys %}
|
| 108 |
+
{%- set content = render_content(message.content, true)|trim %}
|
| 109 |
+
{%- if message.role == "system" or message.role == "developer" %}
|
| 110 |
+
{{- raise_exception('System message must be at the beginning.') }}
|
| 111 |
+
{%- elif message.role == "user" %}
|
| 112 |
+
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
|
| 113 |
+
{%- elif message.role == "assistant" %}
|
| 114 |
+
{%- set reasoning_content = '' %}
|
| 115 |
+
{%- if message.reasoning_content is string %}
|
| 116 |
+
{%- set reasoning_content = message.reasoning_content %}
|
| 117 |
+
{%- endif %}
|
| 118 |
+
{%- set reasoning_content = reasoning_content|trim %}
|
| 119 |
+
{%- if preserve_thinking is undefined or preserve_thinking is true or loop.index0 > ns.last_query_index %}
|
| 120 |
+
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
|
| 121 |
+
{%- else %}
|
| 122 |
+
{{- '<|im_start|>' + message.role + '\n' + content }}
|
| 123 |
+
{%- endif %}
|
| 124 |
+
{%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
|
| 125 |
+
{%- for tool_call in message.tool_calls %}
|
| 126 |
+
{%- if tool_call.function is defined %}
|
| 127 |
+
{%- set tool_call = tool_call.function %}
|
| 128 |
+
{%- endif %}
|
| 129 |
+
{%- if tool_call.name is not defined or tool_call.name is none %}
|
| 130 |
+
{{- raise_exception('Tool call is missing a function name.') }}
|
| 131 |
+
{%- endif %}
|
| 132 |
+
{%- if loop.first %}
|
| 133 |
+
{%- if content|trim %}
|
| 134 |
+
{{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 135 |
+
{%- else %}
|
| 136 |
+
{{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 137 |
+
{%- endif %}
|
| 138 |
+
{%- else %}
|
| 139 |
+
{{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 140 |
+
{%- endif %}
|
| 141 |
+
{%- if tool_call.arguments is mapping %}
|
| 142 |
+
{%- for args_name, args_value in tool_call.arguments|items %}
|
| 143 |
+
{{- '<parameter=' + args_name + '>\n' }}
|
| 144 |
+
{%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}
|
| 145 |
+
{{- args_value }}
|
| 146 |
+
{{- '\n</parameter>\n' }}
|
| 147 |
+
{%- endfor %}
|
| 148 |
+
{%- elif tool_call.arguments is string %}
|
| 149 |
+
{%- if tool_call.arguments|trim %}
|
| 150 |
+
{{- raise_exception('Tool call arguments for function "' + (tool_call.name | string) + '" were passed as a JSON string. Parse them into an object before calling apply_chat_template.') }}
|
| 151 |
+
{%- endif %}
|
| 152 |
+
{%- elif tool_call.arguments is defined and tool_call.arguments is not none %}
|
| 153 |
+
{{- raise_exception('Tool call arguments for function "' + (tool_call.name | string) + '" must be an object/mapping or a JSON string.') }}
|
| 154 |
+
{%- endif %}
|
| 155 |
+
{{- '</function>\n</tool_call>' }}
|
| 156 |
+
{%- endfor %}
|
| 157 |
+
{%- endif %}
|
| 158 |
+
{{- '<|im_end|>\n' }}
|
| 159 |
+
{%- elif message.role == "tool" %}
|
| 160 |
+
{%- if loop.previtem and loop.previtem.role != "tool" %}
|
| 161 |
+
{{- '<|im_start|>user' }}
|
| 162 |
+
{%- endif %}
|
| 163 |
+
{{- '\n<tool_response>\n' }}
|
| 164 |
+
{{- content }}
|
| 165 |
+
{{- '\n</tool_response>' }}
|
| 166 |
+
{%- if not loop.last and loop.nextitem.role != "tool" %}
|
| 167 |
+
{{- '<|im_end|>\n' }}
|
| 168 |
+
{%- elif loop.last %}
|
| 169 |
+
{{- '<|im_end|>\n' }}
|
| 170 |
+
{%- endif %}
|
| 171 |
+
{%- else %}
|
| 172 |
+
{{- raise_exception('Unexpected message role.') }}
|
| 173 |
+
{%- endif %}
|
| 174 |
+
{%- endif %}
|
| 175 |
+
{%- endfor %}
|
| 176 |
+
{%- if add_generation_prompt %}
|
| 177 |
+
{{- '<|im_start|>assistant\n' }}
|
| 178 |
+
{%- if enable_thinking is defined and enable_thinking is false %}
|
| 179 |
+
{{- '<think>\n\n</think>\n\n' }}
|
| 180 |
+
{%- else %}
|
| 181 |
+
{{- '<think>\n' }}
|
| 182 |
+
{%- endif %}
|
| 183 |
+
{%- endif %}
|
| 184 |
+
{#- Unsloth fixes - developer role, merged system messages, tool calling #}
|
config.json
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3_5ForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"eos_token_id": [
|
| 6 |
+
248046,
|
| 7 |
+
248044
|
| 8 |
+
],
|
| 9 |
+
"image_token_id": 248056,
|
| 10 |
+
"language_model_only": false,
|
| 11 |
+
"model_name": "/workspace/renji-training/Jackrong/Qwen3.8-27B-unsloth-HF-Test1-base",
|
| 12 |
+
"model_type": "qwen3_5",
|
| 13 |
+
"pad_token_id": 248044,
|
| 14 |
+
"quantization": {
|
| 15 |
+
"group_size": 64,
|
| 16 |
+
"bits": 8,
|
| 17 |
+
"mode": "affine"
|
| 18 |
+
},
|
| 19 |
+
"quantization_config": {
|
| 20 |
+
"group_size": 64,
|
| 21 |
+
"bits": 8,
|
| 22 |
+
"mode": "affine"
|
| 23 |
+
},
|
| 24 |
+
"text_config": {
|
| 25 |
+
"attention_bias": false,
|
| 26 |
+
"attention_dropout": 0.0,
|
| 27 |
+
"attn_output_gate": true,
|
| 28 |
+
"bos_token_id": 248044,
|
| 29 |
+
"torch_dtype": "bfloat16",
|
| 30 |
+
"eos_token_id": 248044,
|
| 31 |
+
"full_attention_interval": 4,
|
| 32 |
+
"head_dim": 256,
|
| 33 |
+
"hidden_act": "silu",
|
| 34 |
+
"hidden_size": 5120,
|
| 35 |
+
"initializer_range": 0.02,
|
| 36 |
+
"intermediate_size": 17408,
|
| 37 |
+
"layer_types": [
|
| 38 |
+
"linear_attention",
|
| 39 |
+
"linear_attention",
|
| 40 |
+
"linear_attention",
|
| 41 |
+
"full_attention",
|
| 42 |
+
"linear_attention",
|
| 43 |
+
"linear_attention",
|
| 44 |
+
"linear_attention",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"linear_attention",
|
| 47 |
+
"linear_attention",
|
| 48 |
+
"linear_attention",
|
| 49 |
+
"full_attention",
|
| 50 |
+
"linear_attention",
|
| 51 |
+
"linear_attention",
|
| 52 |
+
"linear_attention",
|
| 53 |
+
"full_attention",
|
| 54 |
+
"linear_attention",
|
| 55 |
+
"linear_attention",
|
| 56 |
+
"linear_attention",
|
| 57 |
+
"full_attention",
|
| 58 |
+
"linear_attention",
|
| 59 |
+
"linear_attention",
|
| 60 |
+
"linear_attention",
|
| 61 |
+
"full_attention",
|
| 62 |
+
"linear_attention",
|
| 63 |
+
"linear_attention",
|
| 64 |
+
"linear_attention",
|
| 65 |
+
"full_attention",
|
| 66 |
+
"linear_attention",
|
| 67 |
+
"linear_attention",
|
| 68 |
+
"linear_attention",
|
| 69 |
+
"full_attention",
|
| 70 |
+
"linear_attention",
|
| 71 |
+
"linear_attention",
|
| 72 |
+
"linear_attention",
|
| 73 |
+
"full_attention",
|
| 74 |
+
"linear_attention",
|
| 75 |
+
"linear_attention",
|
| 76 |
+
"linear_attention",
|
| 77 |
+
"full_attention",
|
| 78 |
+
"linear_attention",
|
| 79 |
+
"linear_attention",
|
| 80 |
+
"linear_attention",
|
| 81 |
+
"full_attention",
|
| 82 |
+
"linear_attention",
|
| 83 |
+
"linear_attention",
|
| 84 |
+
"linear_attention",
|
| 85 |
+
"full_attention",
|
| 86 |
+
"linear_attention",
|
| 87 |
+
"linear_attention",
|
| 88 |
+
"linear_attention",
|
| 89 |
+
"full_attention",
|
| 90 |
+
"linear_attention",
|
| 91 |
+
"linear_attention",
|
| 92 |
+
"linear_attention",
|
| 93 |
+
"full_attention",
|
| 94 |
+
"linear_attention",
|
| 95 |
+
"linear_attention",
|
| 96 |
+
"linear_attention",
|
| 97 |
+
"full_attention",
|
| 98 |
+
"linear_attention",
|
| 99 |
+
"linear_attention",
|
| 100 |
+
"linear_attention",
|
| 101 |
+
"full_attention"
|
| 102 |
+
],
|
| 103 |
+
"linear_conv_kernel_dim": 4,
|
| 104 |
+
"linear_key_head_dim": 128,
|
| 105 |
+
"linear_num_key_heads": 16,
|
| 106 |
+
"linear_num_value_heads": 48,
|
| 107 |
+
"linear_value_head_dim": 128,
|
| 108 |
+
"mamba_ssm_dtype": "float32",
|
| 109 |
+
"max_position_embeddings": 262144,
|
| 110 |
+
"model_type": "qwen3_5_text",
|
| 111 |
+
"mtp_num_hidden_layers": 1,
|
| 112 |
+
"mtp_use_dedicated_embeddings": false,
|
| 113 |
+
"num_attention_heads": 24,
|
| 114 |
+
"num_hidden_layers": 64,
|
| 115 |
+
"num_key_value_heads": 4,
|
| 116 |
+
"output_gate_type": "swish",
|
| 117 |
+
"pad_token_id": null,
|
| 118 |
+
"partial_rotary_factor": 0.25,
|
| 119 |
+
"rms_norm_eps": 1e-06,
|
| 120 |
+
"rope_parameters": {
|
| 121 |
+
"mrope_interleaved": true,
|
| 122 |
+
"mrope_section": [
|
| 123 |
+
11,
|
| 124 |
+
11,
|
| 125 |
+
10
|
| 126 |
+
],
|
| 127 |
+
"partial_rotary_factor": 0.25,
|
| 128 |
+
"rope_theta": 10000000,
|
| 129 |
+
"rope_type": "default"
|
| 130 |
+
},
|
| 131 |
+
"tie_word_embeddings": false,
|
| 132 |
+
"use_cache": false,
|
| 133 |
+
"vocab_size": 248320
|
| 134 |
+
},
|
| 135 |
+
"tie_word_embeddings": false,
|
| 136 |
+
"unsloth_version": "2026.8.19",
|
| 137 |
+
"video_token_id": 248057,
|
| 138 |
+
"vision_config": {
|
| 139 |
+
"deepstack_visual_indexes": [],
|
| 140 |
+
"depth": 27,
|
| 141 |
+
"torch_dtype": "bfloat16",
|
| 142 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 143 |
+
"hidden_size": 1152,
|
| 144 |
+
"in_channels": 3,
|
| 145 |
+
"initializer_range": 0.02,
|
| 146 |
+
"intermediate_size": 4304,
|
| 147 |
+
"model_type": "qwen3_5",
|
| 148 |
+
"num_heads": 16,
|
| 149 |
+
"num_position_embeddings": 2304,
|
| 150 |
+
"out_hidden_size": 5120,
|
| 151 |
+
"patch_size": 16,
|
| 152 |
+
"spatial_merge_size": 2,
|
| 153 |
+
"temporal_patch_size": 2
|
| 154 |
+
},
|
| 155 |
+
"vision_end_token_id": 248054,
|
| 156 |
+
"vision_start_token_id": 248053
|
| 157 |
+
}
|
configuration.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"framework":"Pytorch","task":"visual-question-answering"}
|
generation_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 248044,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
248046,
|
| 6 |
+
248044
|
| 7 |
+
],
|
| 8 |
+
"pad_token_id": 248044,
|
| 9 |
+
"temperature": 1.0,
|
| 10 |
+
"top_k": 20,
|
| 11 |
+
"top_p": 0.95,
|
| 12 |
+
"transformers_version": "5.5.0"
|
| 13 |
+
}
|
model-00001-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fba21997b38015763f3b5b1c28d5f5efc3d2456d76bcbcb5ecdf09db6d8bddce
|
| 3 |
+
size 5317707349
|
model-00002-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a166f96dfabec43dc3f7699d9fbce01661dfb0c6f3f16eaf3d0c91c707db90a
|
| 3 |
+
size 5354102528
|
model-00003-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:13574062fe7e9f7aac271847c8d3fc3f444df56501e768b1c817face21e92510
|
| 3 |
+
size 5354184654
|
model-00004-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c8636df307efb14de7dce87f102b825a799e13a2099a1b1b0b1fd9e5181751f
|
| 3 |
+
size 5337309675
|
model-00005-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d6b9dd040fe05e13a2fc696d3dde9a544c149a3c2913085be98e7c3963f7be45
|
| 3 |
+
size 5292848520
|
model-00006-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b6744816b90aaf0871ac5be234543bce35f246ff12160fbf510eec684508dae8
|
| 3 |
+
size 2845065535
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"size": {
|
| 3 |
+
"longest_edge": 16777216,
|
| 4 |
+
"shortest_edge": 65536
|
| 5 |
+
},
|
| 6 |
+
"patch_size": 16,
|
| 7 |
+
"temporal_patch_size": 2,
|
| 8 |
+
"merge_size": 2,
|
| 9 |
+
"image_mean": [
|
| 10 |
+
0.5,
|
| 11 |
+
0.5,
|
| 12 |
+
0.5
|
| 13 |
+
],
|
| 14 |
+
"image_std": [
|
| 15 |
+
0.5,
|
| 16 |
+
0.5,
|
| 17 |
+
0.5
|
| 18 |
+
],
|
| 19 |
+
"processor_class": "Qwen3VLProcessor",
|
| 20 |
+
"image_processor_type": "Qwen2VLImageProcessorFast"
|
| 21 |
+
}
|
processor_config.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor": {
|
| 3 |
+
"do_convert_rgb": true,
|
| 4 |
+
"do_normalize": true,
|
| 5 |
+
"do_rescale": true,
|
| 6 |
+
"do_resize": true,
|
| 7 |
+
"image_mean": [
|
| 8 |
+
0.5,
|
| 9 |
+
0.5,
|
| 10 |
+
0.5
|
| 11 |
+
],
|
| 12 |
+
"image_processor_type": "Qwen2VLImageProcessor",
|
| 13 |
+
"image_std": [
|
| 14 |
+
0.5,
|
| 15 |
+
0.5,
|
| 16 |
+
0.5
|
| 17 |
+
],
|
| 18 |
+
"merge_size": 2,
|
| 19 |
+
"patch_size": 16,
|
| 20 |
+
"resample": 3,
|
| 21 |
+
"rescale_factor": 0.00392156862745098,
|
| 22 |
+
"size": {
|
| 23 |
+
"longest_edge": 16777216,
|
| 24 |
+
"shortest_edge": 65536
|
| 25 |
+
},
|
| 26 |
+
"temporal_patch_size": 2
|
| 27 |
+
},
|
| 28 |
+
"processor_class": "Qwen3VLProcessor",
|
| 29 |
+
"video_processor": {
|
| 30 |
+
"do_convert_rgb": true,
|
| 31 |
+
"do_normalize": true,
|
| 32 |
+
"do_rescale": true,
|
| 33 |
+
"do_resize": true,
|
| 34 |
+
"do_sample_frames": true,
|
| 35 |
+
"fps": 2,
|
| 36 |
+
"image_mean": [
|
| 37 |
+
0.5,
|
| 38 |
+
0.5,
|
| 39 |
+
0.5
|
| 40 |
+
],
|
| 41 |
+
"image_std": [
|
| 42 |
+
0.5,
|
| 43 |
+
0.5,
|
| 44 |
+
0.5
|
| 45 |
+
],
|
| 46 |
+
"max_frames": 768,
|
| 47 |
+
"merge_size": 2,
|
| 48 |
+
"min_frames": 4,
|
| 49 |
+
"patch_size": 16,
|
| 50 |
+
"resample": 3,
|
| 51 |
+
"rescale_factor": 0.00392156862745098,
|
| 52 |
+
"return_metadata": false,
|
| 53 |
+
"size": {
|
| 54 |
+
"longest_edge": 25165824,
|
| 55 |
+
"shortest_edge": 4096
|
| 56 |
+
},
|
| 57 |
+
"temporal_patch_size": 2,
|
| 58 |
+
"video_processor_type": "Qwen3VLVideoProcessor"
|
| 59 |
+
}
|
| 60 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/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 6 |
+
"backend": "tokenizers",
|
| 7 |
+
"bos_token": null,
|
| 8 |
+
"clean_up_tokenization_spaces": false,
|
| 9 |
+
"eos_token": "<|im_end|>",
|
| 10 |
+
"errors": "replace",
|
| 11 |
+
"image_token": "<|image_pad|>",
|
| 12 |
+
"is_local": true,
|
| 13 |
+
"model_max_length": 262144,
|
| 14 |
+
"model_specific_special_tokens": {
|
| 15 |
+
"audio_bos_token": "<|audio_start|>",
|
| 16 |
+
"audio_eos_token": "<|audio_end|>",
|
| 17 |
+
"audio_token": "<|audio_pad|>",
|
| 18 |
+
"image_token": "<|image_pad|>",
|
| 19 |
+
"video_token": "<|video_pad|>",
|
| 20 |
+
"vision_bos_token": "<|vision_start|>",
|
| 21 |
+
"vision_eos_token": "<|vision_end|>"
|
| 22 |
+
},
|
| 23 |
+
"pad_token": "<|endoftext|>",
|
| 24 |
+
"padding_side": "left",
|
| 25 |
+
"pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
|
| 26 |
+
"processor_class": "Qwen3VLProcessor",
|
| 27 |
+
"split_special_tokens": false,
|
| 28 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 29 |
+
"unk_token": null,
|
| 30 |
+
"video_token": "<|video_pad|>",
|
| 31 |
+
"vision_bos_token": "<|vision_start|>",
|
| 32 |
+
"vision_eos_token": "<|vision_end|>",
|
| 33 |
+
"added_tokens_decoder": {
|
| 34 |
+
"248044": {
|
| 35 |
+
"content": "<|endoftext|>",
|
| 36 |
+
"single_word": false,
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"rstrip": false,
|
| 39 |
+
"normalized": false,
|
| 40 |
+
"special": true
|
| 41 |
+
},
|
| 42 |
+
"248045": {
|
| 43 |
+
"content": "<|im_start|>",
|
| 44 |
+
"single_word": false,
|
| 45 |
+
"lstrip": false,
|
| 46 |
+
"rstrip": false,
|
| 47 |
+
"normalized": false,
|
| 48 |
+
"special": true
|
| 49 |
+
},
|
| 50 |
+
"248046": {
|
| 51 |
+
"content": "<|im_end|>",
|
| 52 |
+
"single_word": false,
|
| 53 |
+
"lstrip": false,
|
| 54 |
+
"rstrip": false,
|
| 55 |
+
"normalized": false,
|
| 56 |
+
"special": true
|
| 57 |
+
},
|
| 58 |
+
"248047": {
|
| 59 |
+
"content": "<|object_ref_start|>",
|
| 60 |
+
"single_word": false,
|
| 61 |
+
"lstrip": false,
|
| 62 |
+
"rstrip": false,
|
| 63 |
+
"normalized": false,
|
| 64 |
+
"special": true
|
| 65 |
+
},
|
| 66 |
+
"248048": {
|
| 67 |
+
"content": "<|object_ref_end|>",
|
| 68 |
+
"single_word": false,
|
| 69 |
+
"lstrip": false,
|
| 70 |
+
"rstrip": false,
|
| 71 |
+
"normalized": false,
|
| 72 |
+
"special": true
|
| 73 |
+
},
|
| 74 |
+
"248049": {
|
| 75 |
+
"content": "<|box_start|>",
|
| 76 |
+
"single_word": false,
|
| 77 |
+
"lstrip": false,
|
| 78 |
+
"rstrip": false,
|
| 79 |
+
"normalized": false,
|
| 80 |
+
"special": true
|
| 81 |
+
},
|
| 82 |
+
"248050": {
|
| 83 |
+
"content": "<|box_end|>",
|
| 84 |
+
"single_word": false,
|
| 85 |
+
"lstrip": false,
|
| 86 |
+
"rstrip": false,
|
| 87 |
+
"normalized": false,
|
| 88 |
+
"special": true
|
| 89 |
+
},
|
| 90 |
+
"248051": {
|
| 91 |
+
"content": "<|quad_start|>",
|
| 92 |
+
"single_word": false,
|
| 93 |
+
"lstrip": false,
|
| 94 |
+
"rstrip": false,
|
| 95 |
+
"normalized": false,
|
| 96 |
+
"special": true
|
| 97 |
+
},
|
| 98 |
+
"248052": {
|
| 99 |
+
"content": "<|quad_end|>",
|
| 100 |
+
"single_word": false,
|
| 101 |
+
"lstrip": false,
|
| 102 |
+
"rstrip": false,
|
| 103 |
+
"normalized": false,
|
| 104 |
+
"special": true
|
| 105 |
+
},
|
| 106 |
+
"248053": {
|
| 107 |
+
"content": "<|vision_start|>",
|
| 108 |
+
"single_word": false,
|
| 109 |
+
"lstrip": false,
|
| 110 |
+
"rstrip": false,
|
| 111 |
+
"normalized": false,
|
| 112 |
+
"special": true
|
| 113 |
+
},
|
| 114 |
+
"248054": {
|
| 115 |
+
"content": "<|vision_end|>",
|
| 116 |
+
"single_word": false,
|
| 117 |
+
"lstrip": false,
|
| 118 |
+
"rstrip": false,
|
| 119 |
+
"normalized": false,
|
| 120 |
+
"special": true
|
| 121 |
+
},
|
| 122 |
+
"248055": {
|
| 123 |
+
"content": "<|vision_pad|>",
|
| 124 |
+
"single_word": false,
|
| 125 |
+
"lstrip": false,
|
| 126 |
+
"rstrip": false,
|
| 127 |
+
"normalized": false,
|
| 128 |
+
"special": true
|
| 129 |
+
},
|
| 130 |
+
"248056": {
|
| 131 |
+
"content": "<|image_pad|>",
|
| 132 |
+
"single_word": false,
|
| 133 |
+
"lstrip": false,
|
| 134 |
+
"rstrip": false,
|
| 135 |
+
"normalized": false,
|
| 136 |
+
"special": true
|
| 137 |
+
},
|
| 138 |
+
"248057": {
|
| 139 |
+
"content": "<|video_pad|>",
|
| 140 |
+
"single_word": false,
|
| 141 |
+
"lstrip": false,
|
| 142 |
+
"rstrip": false,
|
| 143 |
+
"normalized": false,
|
| 144 |
+
"special": true
|
| 145 |
+
},
|
| 146 |
+
"248058": {
|
| 147 |
+
"content": "<tool_call>",
|
| 148 |
+
"single_word": false,
|
| 149 |
+
"lstrip": false,
|
| 150 |
+
"rstrip": false,
|
| 151 |
+
"normalized": false,
|
| 152 |
+
"special": false
|
| 153 |
+
},
|
| 154 |
+
"248059": {
|
| 155 |
+
"content": "</tool_call>",
|
| 156 |
+
"single_word": false,
|
| 157 |
+
"lstrip": false,
|
| 158 |
+
"rstrip": false,
|
| 159 |
+
"normalized": false,
|
| 160 |
+
"special": false
|
| 161 |
+
},
|
| 162 |
+
"248060": {
|
| 163 |
+
"content": "<|fim_prefix|>",
|
| 164 |
+
"single_word": false,
|
| 165 |
+
"lstrip": false,
|
| 166 |
+
"rstrip": false,
|
| 167 |
+
"normalized": false,
|
| 168 |
+
"special": false
|
| 169 |
+
},
|
| 170 |
+
"248061": {
|
| 171 |
+
"content": "<|fim_middle|>",
|
| 172 |
+
"single_word": false,
|
| 173 |
+
"lstrip": false,
|
| 174 |
+
"rstrip": false,
|
| 175 |
+
"normalized": false,
|
| 176 |
+
"special": false
|
| 177 |
+
},
|
| 178 |
+
"248062": {
|
| 179 |
+
"content": "<|fim_suffix|>",
|
| 180 |
+
"single_word": false,
|
| 181 |
+
"lstrip": false,
|
| 182 |
+
"rstrip": false,
|
| 183 |
+
"normalized": false,
|
| 184 |
+
"special": false
|
| 185 |
+
},
|
| 186 |
+
"248063": {
|
| 187 |
+
"content": "<|fim_pad|>",
|
| 188 |
+
"single_word": false,
|
| 189 |
+
"lstrip": false,
|
| 190 |
+
"rstrip": false,
|
| 191 |
+
"normalized": false,
|
| 192 |
+
"special": false
|
| 193 |
+
},
|
| 194 |
+
"248064": {
|
| 195 |
+
"content": "<|repo_name|>",
|
| 196 |
+
"single_word": false,
|
| 197 |
+
"lstrip": false,
|
| 198 |
+
"rstrip": false,
|
| 199 |
+
"normalized": false,
|
| 200 |
+
"special": false
|
| 201 |
+
},
|
| 202 |
+
"248065": {
|
| 203 |
+
"content": "<|file_sep|>",
|
| 204 |
+
"single_word": false,
|
| 205 |
+
"lstrip": false,
|
| 206 |
+
"rstrip": false,
|
| 207 |
+
"normalized": false,
|
| 208 |
+
"special": false
|
| 209 |
+
},
|
| 210 |
+
"248066": {
|
| 211 |
+
"content": "<tool_response>",
|
| 212 |
+
"single_word": false,
|
| 213 |
+
"lstrip": false,
|
| 214 |
+
"rstrip": false,
|
| 215 |
+
"normalized": false,
|
| 216 |
+
"special": false
|
| 217 |
+
},
|
| 218 |
+
"248067": {
|
| 219 |
+
"content": "</tool_response>",
|
| 220 |
+
"single_word": false,
|
| 221 |
+
"lstrip": false,
|
| 222 |
+
"rstrip": false,
|
| 223 |
+
"normalized": false,
|
| 224 |
+
"special": false
|
| 225 |
+
},
|
| 226 |
+
"248068": {
|
| 227 |
+
"content": "<think>",
|
| 228 |
+
"single_word": false,
|
| 229 |
+
"lstrip": false,
|
| 230 |
+
"rstrip": false,
|
| 231 |
+
"normalized": false,
|
| 232 |
+
"special": false
|
| 233 |
+
},
|
| 234 |
+
"248069": {
|
| 235 |
+
"content": "</think>",
|
| 236 |
+
"single_word": false,
|
| 237 |
+
"lstrip": false,
|
| 238 |
+
"rstrip": false,
|
| 239 |
+
"normalized": false,
|
| 240 |
+
"special": false
|
| 241 |
+
},
|
| 242 |
+
"248070": {
|
| 243 |
+
"content": "<|audio_start|>",
|
| 244 |
+
"single_word": false,
|
| 245 |
+
"lstrip": false,
|
| 246 |
+
"rstrip": false,
|
| 247 |
+
"normalized": false,
|
| 248 |
+
"special": true
|
| 249 |
+
},
|
| 250 |
+
"248071": {
|
| 251 |
+
"content": "<|audio_end|>",
|
| 252 |
+
"single_word": false,
|
| 253 |
+
"lstrip": false,
|
| 254 |
+
"rstrip": false,
|
| 255 |
+
"normalized": false,
|
| 256 |
+
"special": true
|
| 257 |
+
},
|
| 258 |
+
"248072": {
|
| 259 |
+
"content": "<tts_pad>",
|
| 260 |
+
"single_word": false,
|
| 261 |
+
"lstrip": false,
|
| 262 |
+
"rstrip": false,
|
| 263 |
+
"normalized": false,
|
| 264 |
+
"special": true
|
| 265 |
+
},
|
| 266 |
+
"248073": {
|
| 267 |
+
"content": "<tts_text_bos>",
|
| 268 |
+
"single_word": false,
|
| 269 |
+
"lstrip": false,
|
| 270 |
+
"rstrip": false,
|
| 271 |
+
"normalized": false,
|
| 272 |
+
"special": true
|
| 273 |
+
},
|
| 274 |
+
"248074": {
|
| 275 |
+
"content": "<tts_text_eod>",
|
| 276 |
+
"single_word": false,
|
| 277 |
+
"lstrip": false,
|
| 278 |
+
"rstrip": false,
|
| 279 |
+
"normalized": false,
|
| 280 |
+
"special": true
|
| 281 |
+
},
|
| 282 |
+
"248075": {
|
| 283 |
+
"content": "<tts_text_bos_single>",
|
| 284 |
+
"single_word": false,
|
| 285 |
+
"lstrip": false,
|
| 286 |
+
"rstrip": false,
|
| 287 |
+
"normalized": false,
|
| 288 |
+
"special": true
|
| 289 |
+
},
|
| 290 |
+
"248076": {
|
| 291 |
+
"content": "<|audio_pad|>",
|
| 292 |
+
"single_word": false,
|
| 293 |
+
"lstrip": false,
|
| 294 |
+
"rstrip": false,
|
| 295 |
+
"normalized": false,
|
| 296 |
+
"special": true
|
| 297 |
+
}
|
| 298 |
+
},
|
| 299 |
+
"chat_template": "{%- set image_count = namespace(value=0) %}\n{%- set video_count = namespace(value=0) %}\n{%- macro render_content(content, do_vision_count, is_system_content=false) %}\n {%- if content is string %}\n {{- content }}\n {%- elif content is iterable and content is not mapping %}\n {%- for item in content %}\n {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}\n {%- if is_system_content %}\n {{- raise_exception('System message cannot contain images.') }}\n {%- endif %}\n {%- if do_vision_count %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- endif %}\n {%- if add_vision_id %}\n {{- 'Picture ' ~ image_count.value ~ ': ' }}\n {%- endif %}\n {{- '<|vision_start|><|image_pad|><|vision_end|>' }}\n {%- elif 'video' in item or item.type == 'video' %}\n {%- if is_system_content %}\n {{- raise_exception('System message cannot contain videos.') }}\n {%- endif %}\n {%- if do_vision_count %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- endif %}\n {%- if add_vision_id %}\n {{- 'Video ' ~ video_count.value ~ ': ' }}\n {%- endif %}\n {{- '<|vision_start|><|video_pad|><|vision_end|>' }}\n {%- elif 'text' in item %}\n {{- item.text }}\n {%- else %}\n {{- raise_exception('Unexpected item type in content.') }}\n {%- endif %}\n {%- endfor %}\n {%- elif content is none or content is undefined %}\n {{- '' }}\n {%- else %}\n {{- raise_exception('Unexpected content type.') }}\n {%- endif %}\n{%- endmacro %}\n{%- if not messages %}\n {{- raise_exception('No messages provided.') }}\n{%- endif %}\n{%- set sysns = namespace(count=0, text='') %}\n{%- for message in messages %}\n {%- if sysns.count == loop.index0 and (message.role == 'system' or message.role == 'developer') %}\n {%- set sys_content = render_content(message.content, false, true)|trim %}\n {%- if sys_content %}\n {%- set sysns.text = sysns.text + ('\\n' if sysns.text else '') + sys_content %}\n {%- endif %}\n {%- set sysns.count = sysns.count + 1 %}\n {%- endif %}\n{%- endfor %}\n{%- set num_sys = sysns.count %}\n{%- set merged_system = sysns.text %}\n{%- set reasoning_instructions = '' %}\n{%- if enable_thinking is undefined or enable_thinking is true %}\n {%- set resolved_reasoning_effort = reasoning_effort|default('xhigh') %}\n {%- if resolved_reasoning_effort == 'high' %}\n {%- set resolved_reasoning_effort = 'xhigh' %}\n {%- endif %}\n {%- if resolved_reasoning_effort not in ('xhigh', 'medium', 'low') %}\n {{- raise_exception('Unexpected reasoning effort ' ~ reasoning_effort ~ '. Supported types are xhigh (default), medium, and low.') }}\n {%- endif %}\n {%- if resolved_reasoning_effort == 'xhigh' %}\n {%- set reasoning_instructions = 'Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.' %}\n {%- elif resolved_reasoning_effort == 'low' %}\n {%- set reasoning_instructions = 'Reasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.' %}\n {%- endif %}\n{%- endif %}\n{%- if tools and tools is iterable and tools is not mapping %}\n {{- '<|im_start|>system\\n' }}\n {%- if reasoning_instructions %}\n {{- reasoning_instructions + '\\n\\n' }}\n {%- endif %}\n {{- \"# Tools\\n\\nYou have access to the following functions:\\n\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\" }}\n {{- '\\n\\nIf you choose to call a function ONLY reply in the following format with NO suffix:\\n\\n<tool_call>\\n<function=example_function_name>\\n<parameter=example_parameter_1>\\nvalue_1\\n</parameter>\\n<parameter=example_parameter_2>\\nThis is the value for the second parameter\\nthat can span\\nmultiple lines\\n</parameter>\\n</function>\\n</tool_call>\\n\\n<IMPORTANT>\\nReminder:\\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\\n- Required parameters MUST be specified\\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\\n</IMPORTANT>' }}\n {%- if merged_system %}\n {{- '\\n\\n' + merged_system }}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n{%- else %}\n {%- if merged_system %}\n {{- '<|im_start|>system\\n' + (reasoning_instructions + '\\n\\n' if reasoning_instructions else '') + merged_system + '<|im_end|>\\n' }}\n {%- elif reasoning_instructions %}\n {{- '<|im_start|>system\\n' + reasoning_instructions + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" %}\n {%- set content = render_content(message.content, false)|trim %}\n {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- if loop.index0 >= num_sys %}\n {%- set content = render_content(message.content, true)|trim %}\n {%- if message.role == \"system\" or message.role == \"developer\" %}\n {{- raise_exception('System message must be at the beginning.') }}\n {%- elif message.role == \"user\" %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- endif %}\n {%- set reasoning_content = reasoning_content|trim %}\n {%- if preserve_thinking is undefined or preserve_thinking is true or loop.index0 > ns.last_query_index %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content + '\\n</think>\\n\\n' + content }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {%- if tool_call.name is not defined or tool_call.name is none %}\n {{- raise_exception('Tool call is missing a function name.') }}\n {%- endif %}\n {%- if loop.first %}\n {%- if content|trim %}\n {{- '\\n\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- else %}\n {{- '<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- endif %}\n {%- else %}\n {{- '\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- endif %}\n {%- if tool_call.arguments is mapping %}\n {%- for args_name, args_value in tool_call.arguments|items %}\n {{- '<parameter=' + args_name + '>\\n' }}\n {%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}\n {{- args_value }}\n {{- '\\n</parameter>\\n' }}\n {%- endfor %}\n {%- elif tool_call.arguments is string %}\n {%- if tool_call.arguments|trim %}\n {{- raise_exception('Tool call arguments for function \"' + (tool_call.name | string) + '\" were passed as a JSON string. Parse them into an object before calling apply_chat_template.') }}\n {%- endif %}\n {%- elif tool_call.arguments is defined and tool_call.arguments is not none %}\n {{- raise_exception('Tool call arguments for function \"' + (tool_call.name | string) + '\" must be an object/mapping or a JSON string.') }}\n {%- endif %}\n {{- '</function>\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.previtem and loop.previtem.role != \"tool\" %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- content }}\n {{- '\\n</tool_response>' }}\n {%- if not loop.last and loop.nextitem.role != \"tool\" %}\n {{- '<|im_end|>\\n' }}\n {%- elif loop.last %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- else %}\n {{- raise_exception('Unexpected message role.') }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- else %}\n {{- '<think>\\n' }}\n {%- endif %}\n{%- endif %}\n{#- Unsloth fixes - developer role, merged system messages, tool calling #}"
|
| 300 |
+
}
|
video_preprocessor_config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"size": {
|
| 3 |
+
"longest_edge": 25165824,
|
| 4 |
+
"shortest_edge": 4096
|
| 5 |
+
},
|
| 6 |
+
"patch_size": 16,
|
| 7 |
+
"temporal_patch_size": 2,
|
| 8 |
+
"merge_size": 2,
|
| 9 |
+
"image_mean": [
|
| 10 |
+
0.5,
|
| 11 |
+
0.5,
|
| 12 |
+
0.5
|
| 13 |
+
],
|
| 14 |
+
"image_std": [
|
| 15 |
+
0.5,
|
| 16 |
+
0.5,
|
| 17 |
+
0.5
|
| 18 |
+
],
|
| 19 |
+
"processor_class": "Qwen3VLProcessor",
|
| 20 |
+
"video_processor_type": "Qwen3VLVideoProcessor"
|
| 21 |
+
}
|