[Feature] TurboMind backend missing VLM support for DeepSeek-VL2, Llama4, Gemma3, Qwen3-VL

オープン
#4,553 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@irexyc がすでに取り組んでいます。

2026年4月29日 から。

評価

この issue はまだ評価されていません。

説明

Description

Four VLM model classes have to_turbomind() wired up to call to_turbomind_aux() but their forward() methods raise NotImplementedError, making TurboMind backend unusable for these models. One model (qwen3.py) has to_turbomind() as a bare pass.

Users who set --backend turbomind with any of these models will get a runtime error when processing vision inputs.

Affected Models

File to_turbomind() forward() Issue
vl/model/deepseek_vl2.py Calls to_turbomind_aux NotImplementedError (line 104-117) Runtime crash
vl/model/llama4.py Calls to_turbomind_aux NotImplementedError (line 85-98) Runtime crash
vl/model/gemma3_vl.py Calls to_turbomind_aux NotImplementedError (line 92-105) Runtime crash
vl/model/qwen3.py pass (line ~) pass Silent no-op

Working Reference

vl/model/internvl.py has a working implementation:

  1. to_turbomind() calls self.proc_messages() to format prompt + image tokens, then delegates to self.to_turbomind_aux()
  2. forward() extracts visual features from pixel values and appends them to messages with role='forward'
  3. to_turbomind_aux() (in base.py) reads these features to build input_embeddings

What Needs to Be Implemented

For each model, forward() must:

  1. Accept preprocessed messages containing pixel values
  2. Run the model's vision encoder to extract visual features
  3. Append features to the message list with role='forward'

Additionally, qwen3.py needs its to_turbomind() and build_model() implemented from scratch.

Suggested Approach

Start with one model (e.g., Gemma3) as a reference implementation following the internvl.py pattern, then replicate for the other three.

Key Files

  • lmdeploy/vl/model/base.py — VisionModel base class, to_turbomind_aux() helper (line 289-323)
  • lmdeploy/vl/model/internvl.py — working reference (line 283-296)
  • lmdeploy/vl/model/deepseek_vl2.py — stub
  • lmdeploy/vl/model/llama4.py — stub
  • lmdeploy/vl/model/gemma3_vl.py — stub
  • lmdeploy/vl/model/qwen3.py — stub
主要言語
Python
スター
8.2k
フォーク
797
平均マージ
3日 15時間
マージ済み PR(30日)
52

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

InternLM/lmdeploy のほかの issue

InternLM/lmdeploy の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。