Conversation
76d8272 to
68eacae
Compare
|
Detailed adaptation work can be done after Qwen3.5-9B-Instruct and Qwen3.5-35B-A3B-Instruct are released. |
|
I've tested pruned version of the Qwen 3.5 model. |
|
I'm updating and testing this with |
|
Closed the PR temporarily to update to the latest commit. |
|
I'm currently refactoring some logic locally, but the hybrid structure of qwen3-next and qwen3.5 is basically running. You can continue testing after I finish the initial implementation. |
|
I'm having some trouble testing this. I'm not sure if it's related to my OS, Python version, or this project. Last time I compiled it (about two days ago) it worked fine.
Does it crash because of this? |
|
No, it's because your compiled library is incompatible or the library file is missing. |
|
Okay, thanks! I'll try to fix it as soon as possible to continue testing. |
|
The initial implementation is now live. You can try out qwen3.5 and see how it performs. Looking forward to your feedback. |
|
I've tested the chat template with and without images, thinking mode, etc. I've only used The model seems to work fine without images, but hallucinates a lot when using images (can't describe them properly, etc.). Since the model is so big and I'm just asking for a simple description of the image, the quantization I'm using should not be a problem. Note Activating the thinking mode and looking at the reasoning content, the model does not see the image. I'll check the chat template to make sure it's not causing this problem. I'll continue to work on this. |
|
Looking at the console output, I find this: I have no idea if it's related to this bug, but is only printed when adding an image to the prompt. Comparing the Qwen35ChatHandler's template with the Qwen3VLChatHandler's template, the code to load an image is similar: Qwen3VLChatHandler: ...
{%- if 'image_url' in content -%}
{%- set image_count.value = image_count.value + 1 -%}
{%- if add_vision_id -%}
{{- 'Picture ' -}}
{{- image_count.value | string -}}
{{- ': ' -}}
{%- endif -%}
{{- '<|vision_start|>' -}}
{%- if content.image_url is string -%}
{{- content.image_url -}}
{%- else -%}
{{- content.image_url.url -}}
{%- endif -%}
{{- '<|vision_end|>' -}}
{%- endif -%}
...Qwen35ChatHandler: ...
{%- if 'image' in item or 'image_url' in item -%}
{%- if is_system_content -%}
{{- raise_exception('System message cannot contain images.') -}}
{%- endif -%}
{%- if do_vision_count -%}
{%- set image_count.value = image_count.value + 1 -%}
{%- endif -%}
{%- if add_vision_id -%}
{{- 'Picture ' ~ image_count.value ~ ': ' -}}
{%- endif -%}
{{- '<|vision_start|>' -}}
{%- if 'image' in item -%}
{%- if item.image is string -%}
{{- item.image -}}
{%- else -%}
{{- item.image.url -}}
{%- endif -%}
{%- elif 'image_url' in item -%}
{%- if item.image_url is string -%}
{{- item.image_url -}}
{%- else -%}
{{- item.image_url.url -}}
{%- endif -%}
{%- endif -%}
{{- '<|vision_end|>' -}}
{%- elif 'video' in item -%}
... |
# Clear state for multiple runs
llama.reset()
llama._ctx.memory_clear(True)
llama.n_tokens = 0These all need to be removed; the generation and eval processes should now manage them. |
You can check how the final format template it constructs is assembled, and whether there are any <media> elements mounted in it. |
I guess, even after you remove this part, an identical codes will be called by |
This PR implements Qwen3.5 models. Not tested yet due to lack of compute power on my end.
This PR is going to be a draft for now until I can test it with smaller models and also check and fix the chat template and parameters of the
Qwen35ChatHandlerclass.I still need to decide which parameters are useful.