Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- README.md +84 -0
- chat_template.jinja +155 -0
- config.json +145 -0
- generation_config.json +7 -0
- model-00001-of-00002.safetensors +3 -0
- model-00002-of-00002.safetensors +3 -0
- model.safetensors.index.json +0 -0
- tokenizer.json +3 -0
- tokenizer_config.json +33 -0
.gitattributes
CHANGED
|
@@ -34,3 +34,4 @@ saved_model/**/* 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 |
Ornstein27BSABER.jpeg 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 |
Ornstein27BSABER.jpeg filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: qwen3.5
|
| 4 |
+
license_link: https://huggingface.co/Qwen/Qwen3.5-32B/blob/main/LICENSE
|
| 5 |
+
base_model: DJLougen/Ornstein-27B
|
| 6 |
+
tags:
|
| 7 |
+
- refusal-ablation
|
| 8 |
+
- capability-preserving
|
| 9 |
+
- saber
|
| 10 |
+
- qwen3.5
|
| 11 |
+
- multimodal
|
| 12 |
+
- 27b
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# DJLougen/Ornstein-27B — SABER-Refined
|
| 16 |
+
|
| 17 |
+
This model is a surgically-modified version of [DJLougen/Ornstein-27B](https://huggingface.co/DJLougen/Ornstein-27B) using a novel proprietary method (**SABER** — Spectral Analysis-Based Entanglement Resolution) that removes safety refusal behavior while preserving model capability.
|
| 18 |
+
|
| 19 |
+
## Method Overview
|
| 20 |
+
|
| 21 |
+
SABER identifies and ablates the refusal circuit in an LLM through a multi-stage process:
|
| 22 |
+
|
| 23 |
+
1. **Probing** — Extract activation profiles from both harmful and harmless inputs across all transformer layers
|
| 24 |
+
2. **Spectral Analysis** — Decompose activation differences into individual refusal directions, each scored by how strongly they separate harmful from harmless representations
|
| 25 |
+
3. **Entanglement Quantification** — Measure the overlap between each refusal direction and the model's capability subspace (reasoning, knowledge, code, etc.) to avoid collateral damage
|
| 26 |
+
4. **Targeted Ablation** — Remove only the pure-refusal components, with strength proportional to their "purity" (how little they overlap with capability)
|
| 27 |
+
5. **Iterative Refinement** — Re-probe after each ablation pass to catch hydra effects (dormant refusal features that activate when primary ones are removed)
|
| 28 |
+
|
| 29 |
+
Key differentiator from prior work: SABER explicitly measures and respects the **entanglement** between refusal and capability representations, ablating only the refusal-pure components while leaving capability-entangled directions intact or only partially reduced.
|
| 30 |
+
|
| 31 |
+
## Results
|
| 32 |
+
|
| 33 |
+
**Baseline (DJLougen/Ornstein-27B):**
|
| 34 |
+
- Refusal rate: 100%
|
| 35 |
+
- Perplexity (diverse capability prompts): 3.5
|
| 36 |
+
|
| 37 |
+
**SABER-refined (this model):**
|
| 38 |
+
- Refusal rate: 0%
|
| 39 |
+
- Perplexity (diverse capability prompts): 3.5 (0.0% change)
|
| 40 |
+
|
| 41 |
+
The 27B model's refusal directions are cleanly separated from its capability subspace — ablating them produces zero perplexity degradation, confirming that SABER's entanglement-aware approach surgically removes only the refusal circuit without touching capability representations.
|
| 42 |
+
|
| 43 |
+
## Sweep Results
|
| 44 |
+
|
| 45 |
+
Configuration search over `global_top_k` (number of top directions selected globally) and `alpha_base` (base ablation strength):
|
| 46 |
+
|
| 47 |
+
| Top-K | Alpha | Refusal | PPL | PPL Delta | Layers | Dirs Ablated |
|
| 48 |
+
|-------|-------|---------|-----|-----------|--------|-------------|
|
| 49 |
+
| 25 | 0.85 | 5% | 3.5 | +0.4% | 25 | 125 |
|
| 50 |
+
| **25**| **1.00** | **0%** | **3.5** | **+0.6%** | **25** | **125** |
|
| 51 |
+
| 50 | 0.85 | 0% | 3.5 | +0.8% | 36 | 250 |
|
| 52 |
+
| 50 | 1.00 | 0% | 3.5 | +0.7% | 36 | 250 |
|
| 53 |
+
| 75 | 0.85 | 0% | 3.5 | +0.9% | 37 | 375 |
|
| 54 |
+
| 75 | 1.00 | 0% | 3.5 | +0.9% | 37 | 375 |
|
| 55 |
+
|
| 56 |
+
**Best config: top_k=25, alpha=1.0** — achieves 0% refusal with zero meaningful PPL change, using the minimum number of directions. Higher top-K configs achieve the same 0% refusal but ablate 2-3x more directions for no additional benefit, confirming that the refusal circuit is concentrated in a small number of high-quality directions.
|
| 57 |
+
|
| 58 |
+
### Comparison: SABER Across Model Scales
|
| 59 |
+
|
| 60 |
+
| Model | Params | Refusal | PPL Delta | Best Top-K | Dirs Ablated |
|
| 61 |
+
|-------|--------|---------|-----------|------------|-------------|
|
| 62 |
+
| google/gemma-4-E2B-it | 4B | 0% → 0% | -9.6% | 10 | 50 |
|
| 63 |
+
| DJLougen/Ornstein-27B | 27B | 100% → 0% | +0.6% | 25 | 125 |
|
| 64 |
+
|
| 65 |
+
Larger models have more distributed refusal circuits (requiring more directions) but also exhibit cleaner separation between refusal and capability — resulting in near-zero capability impact.
|
| 66 |
+
|
| 67 |
+
## Capability Evaluation
|
| 68 |
+
|
| 69 |
+
Perplexity was evaluated on a diverse 100-prompt battery spanning five categories:
|
| 70 |
+
- **Arithmetic** (20): multi-step calculation, algebra, word problems
|
| 71 |
+
- **Logic** (20): syllogisms, conditional reasoning, puzzle solving
|
| 72 |
+
- **Code** (20): function implementation, debugging, execution tracing
|
| 73 |
+
- **Instruction Following** (20): constrained formatting, multi-step instructions
|
| 74 |
+
- **Factual Recall** (20): geography, history, science, general knowledge
|
| 75 |
+
|
| 76 |
+
This diverse evaluation ensures the entanglement analysis captures capability across all reasoning modalities, not just a narrow slice.
|
| 77 |
+
|
| 78 |
+
## Intended Use
|
| 79 |
+
|
| 80 |
+
This model is released for research purposes. It demonstrates that safety refusal can be surgically removed from a 27B multimodal model without degrading its capabilities — a finding with implications for both AI safety research and alignment.
|
| 81 |
+
|
| 82 |
+
## Warning
|
| 83 |
+
|
| 84 |
+
This model will comply with any request, including harmful ones. It is intended solely for research into alignment, safety, and model behavior.
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
{%- if tools and tools is iterable and tools is not mapping %}
|
| 46 |
+
{{- '<|im_start|>system\n' }}
|
| 47 |
+
{{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
|
| 48 |
+
{%- for tool in tools %}
|
| 49 |
+
{{- "\n" }}
|
| 50 |
+
{{- tool | tojson }}
|
| 51 |
+
{%- endfor %}
|
| 52 |
+
{{- "\n</tools>" }}
|
| 53 |
+
{{- '\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>' }}
|
| 54 |
+
{%- if messages[0].role == 'system' %}
|
| 55 |
+
{%- set content = render_content(messages[0].content, false, true)|trim %}
|
| 56 |
+
{%- if content %}
|
| 57 |
+
{{- '\n\n' + content }}
|
| 58 |
+
{%- endif %}
|
| 59 |
+
{%- endif %}
|
| 60 |
+
{{- '<|im_end|>\n' }}
|
| 61 |
+
{%- else %}
|
| 62 |
+
{%- if messages[0].role == 'system' %}
|
| 63 |
+
{%- set content = render_content(messages[0].content, false, true)|trim %}
|
| 64 |
+
{{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
|
| 65 |
+
{%- endif %}
|
| 66 |
+
{%- endif %}
|
| 67 |
+
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
| 68 |
+
{%- for message in messages[::-1] %}
|
| 69 |
+
{%- set index = (messages|length - 1) - loop.index0 %}
|
| 70 |
+
{%- if ns.multi_step_tool and message.role == "user" %}
|
| 71 |
+
{%- set content = render_content(message.content, false)|trim %}
|
| 72 |
+
{%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
|
| 73 |
+
{%- set ns.multi_step_tool = false %}
|
| 74 |
+
{%- set ns.last_query_index = index %}
|
| 75 |
+
{%- endif %}
|
| 76 |
+
{%- endif %}
|
| 77 |
+
{%- endfor %}
|
| 78 |
+
{%- if ns.multi_step_tool %}
|
| 79 |
+
{{- raise_exception('No user query found in messages.') }}
|
| 80 |
+
{%- endif %}
|
| 81 |
+
{%- for message in messages %}
|
| 82 |
+
{%- set content = render_content(message.content, true)|trim %}
|
| 83 |
+
{%- if message.role == "system" %}
|
| 84 |
+
{%- if not loop.first %}
|
| 85 |
+
{{- raise_exception('System message must be at the beginning.') }}
|
| 86 |
+
{%- endif %}
|
| 87 |
+
{%- elif message.role == "user" %}
|
| 88 |
+
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
|
| 89 |
+
{%- elif message.role == "assistant" %}
|
| 90 |
+
{%- set reasoning_content = '' %}
|
| 91 |
+
{%- if message.reasoning_content is string %}
|
| 92 |
+
{%- set reasoning_content = message.reasoning_content %}
|
| 93 |
+
{%- else %}
|
| 94 |
+
{%- if '</think>' in content %}
|
| 95 |
+
{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
| 96 |
+
{%- set content = content.split('</think>')[-1].lstrip('\n') %}
|
| 97 |
+
{%- endif %}
|
| 98 |
+
{%- endif %}
|
| 99 |
+
{%- set reasoning_content = reasoning_content|trim %}
|
| 100 |
+
{%- if loop.index0 > ns.last_query_index %}
|
| 101 |
+
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
|
| 102 |
+
{%- else %}
|
| 103 |
+
{{- '<|im_start|>' + message.role + '\n' + content }}
|
| 104 |
+
{%- endif %}
|
| 105 |
+
{%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
|
| 106 |
+
{%- for tool_call in message.tool_calls %}
|
| 107 |
+
{%- if tool_call.function is defined %}
|
| 108 |
+
{%- set tool_call = tool_call.function %}
|
| 109 |
+
{%- endif %}
|
| 110 |
+
{%- if loop.first %}
|
| 111 |
+
{%- if content|trim %}
|
| 112 |
+
{{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 113 |
+
{%- else %}
|
| 114 |
+
{{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 115 |
+
{%- endif %}
|
| 116 |
+
{%- else %}
|
| 117 |
+
{{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
|
| 118 |
+
{%- endif %}
|
| 119 |
+
{%- if tool_call.arguments is mapping %}
|
| 120 |
+
{%- for args_name in tool_call.arguments %}
|
| 121 |
+
{%- set args_value = tool_call.arguments[args_name] %}
|
| 122 |
+
{{- '<parameter=' + args_name + '>\n' }}
|
| 123 |
+
{%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}
|
| 124 |
+
{{- args_value }}
|
| 125 |
+
{{- '\n</parameter>\n' }}
|
| 126 |
+
{%- endfor %}
|
| 127 |
+
{%- endif %}
|
| 128 |
+
{{- '</function>\n</tool_call>' }}
|
| 129 |
+
{%- endfor %}
|
| 130 |
+
{%- endif %}
|
| 131 |
+
{{- '<|im_end|>\n' }}
|
| 132 |
+
{%- elif message.role == "tool" %}
|
| 133 |
+
{%- if loop.previtem and loop.previtem.role != "tool" %}
|
| 134 |
+
{{- '<|im_start|>user' }}
|
| 135 |
+
{%- endif %}
|
| 136 |
+
{{- '\n<tool_response>\n' }}
|
| 137 |
+
{{- content }}
|
| 138 |
+
{{- '\n</tool_response>' }}
|
| 139 |
+
{%- if not loop.last and loop.nextitem.role != "tool" %}
|
| 140 |
+
{{- '<|im_end|>\n' }}
|
| 141 |
+
{%- elif loop.last %}
|
| 142 |
+
{{- '<|im_end|>\n' }}
|
| 143 |
+
{%- endif %}
|
| 144 |
+
{%- else %}
|
| 145 |
+
{{- raise_exception('Unexpected message role.') }}
|
| 146 |
+
{%- endif %}
|
| 147 |
+
{%- endfor %}
|
| 148 |
+
{%- if add_generation_prompt %}
|
| 149 |
+
{{- '<|im_start|>assistant\n' }}
|
| 150 |
+
{%- if enable_thinking is defined and enable_thinking is false %}
|
| 151 |
+
{{- '<think>\n\n</think>\n\n' }}
|
| 152 |
+
{%- else %}
|
| 153 |
+
{{- '<think>\n' }}
|
| 154 |
+
{%- endif %}
|
| 155 |
+
{%- endif %}
|
config.json
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3_5ForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"dtype": "bfloat16",
|
| 6 |
+
"image_token_id": 248056,
|
| 7 |
+
"model_name": "unsloth/Qwen3.5-27B",
|
| 8 |
+
"model_type": "qwen3_5",
|
| 9 |
+
"pad_token_id": 248055,
|
| 10 |
+
"text_config": {
|
| 11 |
+
"attention_bias": false,
|
| 12 |
+
"attention_dropout": 0.0,
|
| 13 |
+
"attn_output_gate": true,
|
| 14 |
+
"bos_token_id": null,
|
| 15 |
+
"dtype": "bfloat16",
|
| 16 |
+
"eos_token_id": 248044,
|
| 17 |
+
"full_attention_interval": 4,
|
| 18 |
+
"head_dim": 256,
|
| 19 |
+
"hidden_act": "silu",
|
| 20 |
+
"hidden_size": 5120,
|
| 21 |
+
"initializer_range": 0.02,
|
| 22 |
+
"intermediate_size": 17408,
|
| 23 |
+
"layer_types": [
|
| 24 |
+
"linear_attention",
|
| 25 |
+
"linear_attention",
|
| 26 |
+
"linear_attention",
|
| 27 |
+
"full_attention",
|
| 28 |
+
"linear_attention",
|
| 29 |
+
"linear_attention",
|
| 30 |
+
"linear_attention",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"linear_attention",
|
| 33 |
+
"linear_attention",
|
| 34 |
+
"linear_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"linear_attention",
|
| 37 |
+
"linear_attention",
|
| 38 |
+
"linear_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"linear_attention",
|
| 41 |
+
"linear_attention",
|
| 42 |
+
"linear_attention",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"linear_attention",
|
| 45 |
+
"linear_attention",
|
| 46 |
+
"linear_attention",
|
| 47 |
+
"full_attention",
|
| 48 |
+
"linear_attention",
|
| 49 |
+
"linear_attention",
|
| 50 |
+
"linear_attention",
|
| 51 |
+
"full_attention",
|
| 52 |
+
"linear_attention",
|
| 53 |
+
"linear_attention",
|
| 54 |
+
"linear_attention",
|
| 55 |
+
"full_attention",
|
| 56 |
+
"linear_attention",
|
| 57 |
+
"linear_attention",
|
| 58 |
+
"linear_attention",
|
| 59 |
+
"full_attention",
|
| 60 |
+
"linear_attention",
|
| 61 |
+
"linear_attention",
|
| 62 |
+
"linear_attention",
|
| 63 |
+
"full_attention",
|
| 64 |
+
"linear_attention",
|
| 65 |
+
"linear_attention",
|
| 66 |
+
"linear_attention",
|
| 67 |
+
"full_attention",
|
| 68 |
+
"linear_attention",
|
| 69 |
+
"linear_attention",
|
| 70 |
+
"linear_attention",
|
| 71 |
+
"full_attention",
|
| 72 |
+
"linear_attention",
|
| 73 |
+
"linear_attention",
|
| 74 |
+
"linear_attention",
|
| 75 |
+
"full_attention",
|
| 76 |
+
"linear_attention",
|
| 77 |
+
"linear_attention",
|
| 78 |
+
"linear_attention",
|
| 79 |
+
"full_attention",
|
| 80 |
+
"linear_attention",
|
| 81 |
+
"linear_attention",
|
| 82 |
+
"linear_attention",
|
| 83 |
+
"full_attention",
|
| 84 |
+
"linear_attention",
|
| 85 |
+
"linear_attention",
|
| 86 |
+
"linear_attention",
|
| 87 |
+
"full_attention"
|
| 88 |
+
],
|
| 89 |
+
"linear_conv_kernel_dim": 4,
|
| 90 |
+
"linear_key_head_dim": 128,
|
| 91 |
+
"linear_num_key_heads": 16,
|
| 92 |
+
"linear_num_value_heads": 48,
|
| 93 |
+
"linear_value_head_dim": 128,
|
| 94 |
+
"mamba_ssm_dtype": "float32",
|
| 95 |
+
"max_position_embeddings": 262144,
|
| 96 |
+
"mlp_only_layers": [],
|
| 97 |
+
"model_type": "qwen3_5_text",
|
| 98 |
+
"mtp_num_hidden_layers": 1,
|
| 99 |
+
"mtp_use_dedicated_embeddings": false,
|
| 100 |
+
"num_attention_heads": 24,
|
| 101 |
+
"num_hidden_layers": 64,
|
| 102 |
+
"num_key_value_heads": 4,
|
| 103 |
+
"pad_token_id": null,
|
| 104 |
+
"partial_rotary_factor": 0.25,
|
| 105 |
+
"rms_norm_eps": 1e-06,
|
| 106 |
+
"rope_parameters": {
|
| 107 |
+
"mrope_interleaved": true,
|
| 108 |
+
"mrope_section": [
|
| 109 |
+
11,
|
| 110 |
+
11,
|
| 111 |
+
10
|
| 112 |
+
],
|
| 113 |
+
"partial_rotary_factor": 0.25,
|
| 114 |
+
"rope_theta": 10000000,
|
| 115 |
+
"rope_type": "default"
|
| 116 |
+
},
|
| 117 |
+
"tie_word_embeddings": false,
|
| 118 |
+
"use_cache": true,
|
| 119 |
+
"vocab_size": 248320
|
| 120 |
+
},
|
| 121 |
+
"tie_word_embeddings": false,
|
| 122 |
+
"transformers_version": "5.5.0",
|
| 123 |
+
"unsloth_fixed": true,
|
| 124 |
+
"unsloth_version": "2026.4.4",
|
| 125 |
+
"video_token_id": 248057,
|
| 126 |
+
"vision_config": {
|
| 127 |
+
"deepstack_visual_indexes": [],
|
| 128 |
+
"depth": 27,
|
| 129 |
+
"dtype": "bfloat16",
|
| 130 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 131 |
+
"hidden_size": 1152,
|
| 132 |
+
"in_channels": 3,
|
| 133 |
+
"initializer_range": 0.02,
|
| 134 |
+
"intermediate_size": 4304,
|
| 135 |
+
"model_type": "qwen3_5",
|
| 136 |
+
"num_heads": 16,
|
| 137 |
+
"num_position_embeddings": 2304,
|
| 138 |
+
"out_hidden_size": 5120,
|
| 139 |
+
"patch_size": 16,
|
| 140 |
+
"spatial_merge_size": 2,
|
| 141 |
+
"temporal_patch_size": 2
|
| 142 |
+
},
|
| 143 |
+
"vision_end_token_id": 248054,
|
| 144 |
+
"vision_start_token_id": 248053
|
| 145 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"eos_token_id": 248044,
|
| 4 |
+
"pad_token_id": 248055,
|
| 5 |
+
"transformers_version": "5.5.0",
|
| 6 |
+
"use_cache": true
|
| 7 |
+
}
|
model-00001-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9126190cb5d99960e8ffd3282aa25b637a900cf761faba258e6ece00673eef28
|
| 3 |
+
size 49825186464
|
model-00002-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1838fa16f4a6e2acd8b0effee03368971e730b64ae32947b0aae27cddbd4c71a
|
| 3 |
+
size 4888452176
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cd74d110005647fd91bb07fa7d1b76ab7f6038db27157013863668dc89a09348
|
| 3 |
+
size 19989609
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"audio_bos_token": "<|audio_start|>",
|
| 4 |
+
"audio_eos_token": "<|audio_end|>",
|
| 5 |
+
"audio_token": "<|audio_pad|>",
|
| 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": false,
|
| 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": "<|vision_pad|>",
|
| 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": "TokenizersBackend",
|
| 29 |
+
"unk_token": null,
|
| 30 |
+
"video_token": "<|video_pad|>",
|
| 31 |
+
"vision_bos_token": "<|vision_start|>",
|
| 32 |
+
"vision_eos_token": "<|vision_end|>"
|
| 33 |
+
}
|