Skip to content

Conversation

@xanecdotex
Copy link
Collaborator

No description provided.

@xanecdotex xanecdotex changed the title feat: support Qwen2-VL & GME-Qwen2-VL. feat: support Qwen2-VL & GME-Qwen2-VL model on npu device. Nov 18, 2025
namespace layer {

#if defined(USE_NPU)
class Qwen2VisionEncoderLayer
Copy link
Collaborator

Choose a reason for hiding this comment

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

please refer to the code: xllm/core/layers/llama_decoder_layer.h, don't use #ifdefine here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

已修改

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's the difference to npu/qwen2_vl.h npu/qwen2_vl_embedding.h ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

qwen2_vl_embedding.h是为了支持vlm embedding模型gme-qwen2-vl

@xanecdotex xanecdotex force-pushed the qwen2vl_embedding branch 5 times, most recently from 131db27 to 7bc6598 Compare December 15, 2025 12:05

namespace xllm {

#define PrintTensor(tensor) print_tensor(tensor, #tensor, 10, true, false);
Copy link
Collaborator

Choose a reason for hiding this comment

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

what does PrintTensor do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

沿用qwen2_5_vl.h风格,已删

}

private:
int dim_ = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

specify int is int32_t or int64_t.

Copy link
Collaborator Author

@xanecdotex xanecdotex Dec 15, 2025

Choose a reason for hiding this comment

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

已修改


int64_t d_model = model_args.mm_projection_dim(); // out_hidden_size
int context_dim = model_args.mm_hidden_size();
int spatial_merge_size = model_args.mm_spatial_merge_size();
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

已修改

Copy link
Collaborator

@yq33victor yq33victor left a comment

Choose a reason for hiding this comment

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

LGTM

@yq33victor yq33victor merged commit cc2ef9e into jd-opensource:main Dec 16, 2025
15 of 34 checks passed
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.

3 participants