Skip to content

Conversation

@maximizemaxwell
Copy link
Contributor

What does this PR do?

Add support for Qwen-2.5-VL

Part of Issue

#2814

@maximizemaxwell maximizemaxwell marked this pull request as draft June 15, 2025 22:36
@lucasjinreal
Copy link

Nice work, does the result verified? Also, would consider add quantization support maybe

@maximizemaxwell
Copy link
Contributor Author

It's still on work though..

@lucasjinreal
Copy link

Oh. no

@akshayballal95
Copy link
Contributor

Nice Work. This is definitely needed. But I see that the model uses conv3d which is not there yet in Candle. How are you planning to handle that?

@maximizemaxwell
Copy link
Contributor Author

maximizemaxwell commented Jun 17, 2025

@akshayballal95 I’ve been struggling this for a while. While flattening the temporal dimension and using Conv2D (reshaping [B, T, C, H, W] to [B*T, C, H, W]) may be possible, it changes the computation and is incompatible with pretrained weights. Implementing native Conv3D support in Candle seems to be the proper solution.

@akshayballal95
Copy link
Contributor

Well, we have been asking for it

#795 (comment)

@EricLBuehler
Copy link
Member

@maximizemaxwell you can look at: https://github.com/EricLBuehler/mistral.rs/blob/4608202c128da44b84157573dbc8ff1a1146f64c/mistralrs-core/src/layers.rs#L1965-L2036

This is written under the assumption that the temporal patch size==kernel_sizes[0]==2, which is true for Qwen 2.5 VL.

@maximizemaxwell
Copy link
Contributor Author

Gosh I didn’t realize there was already an issue — I just created a new one with the same content, thinking it didn’t exist.
For now, I think it’s best to focus on implementing conv3d and postpone support for Qwen-VL.
I’ll think through a concrete implementation plan for conv3d tomorrow and open a PR under the issue you shared.

@lucasjinreal
Copy link

We need someone to review these features as already implemented in the community. Please merge it into candle so that other people could bring more broad model support to candle!

@maximizemaxwell maximizemaxwell marked this pull request as ready for review August 6, 2025 04:21
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.

4 participants