Skip to content

Conversation

@atdrendel
Copy link
Contributor

@atdrendel atdrendel commented Dec 10, 2025

  • Parse Qwen3-VL reasoning tokens correctly
  • Add Qwen3-VL-2B-Thinking-4bit and Qwen3-VL-4B-Instruct-4bit models

Copilot AI review requested due to automatic review settings December 10, 2025 20:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for two new Qwen 3 VL model variants: the 2B Thinking and 4B Instruct models. The changes differentiate between "Instruct" and "Thinking" model variants by introducing separate response parsers and renaming existing structures to clarify which variant they support.

Key Changes:

  • Added two new model variants to the download script and package resources
  • Refactored response parsers to distinguish between Instruct models (standard parsing) and Thinking models (supports reasoning output)
  • Renamed and reorganized test files to clearly differentiate between 2B/4B and Instruct/Thinking variants

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
bin/download.sh Added entries for Qwen3-VL-2B-Thinking-4bit and Qwen3-VL-4B-Instruct-4bit models
Package.swift Added commented-out resource copy entries for the two new models
Sources/SHLLM/ResponseParser.swift Introduced qwen3VLInstructParser and qwen3VLThinkingParser, refactored parser implementations into hybridParser and defaultsToThinkingParser
Sources/SHLLM/LLM.swift Added responseParser parameter to qwen3VL function; added static properties for new model directories
Tests/SHLLMTests/Models/Qwen3VL-4B-ThinkingTests.swift Renamed struct from Qwen3VL_4BTests to Qwen3VL_4B_ThinkingTests and updated to use qwen3VLThinkingParser
Tests/SHLLMTests/Models/Qwen3VL-4B-InstructTests.swift New test file for the 4B Instruct variant with appropriate parser configuration
Tests/SHLLMTests/Models/Qwen3VL-2B-ThinkingTests.swift New test file for the 2B Thinking variant with reasoning test support
Tests/SHLLMTests/Models/Qwen3VL-2B-InstructTests.swift Renamed from Qwen3VL_2BTests to Qwen3VL_2B_InstructTests, updated directory and parser references
Comments suppressed due to low confidence (1)

Tests/SHLLMTests/Models/Qwen3VL-2B-InstructTests.swift:93

  • The helper function name qwen3VL_2B is inconsistent with the 4B Instruct test file, which uses qwen3VL_4B_Instruct. For consistency and clarity, consider renaming this to qwen3VL_2B_Instruct to match the naming pattern used in the 4B Instruct tests and better reflect that it's testing the Instruct variant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@atdrendel atdrendel merged commit d7f4322 into main Dec 11, 2025
1 check passed
@atdrendel atdrendel deleted the qwen3-vl-instruct branch December 11, 2025 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants