-
Notifications
You must be signed in to change notification settings - Fork 100
feat: support Qwen2-VL & GME-Qwen2-VL model on npu device. #399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6d904ed to
03edd98
Compare
03edd98 to
59dac9c
Compare
59dac9c to
ae16a2c
Compare
| namespace layer { | ||
|
|
||
| #if defined(USE_NPU) | ||
| class Qwen2VisionEncoderLayer |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. | ||
| ==============================================================================*/ |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
131db27 to
7bc6598
Compare
xllm/models/vlm/qwen2_vl.h
Outdated
|
|
||
| namespace xllm { | ||
|
|
||
| #define PrintTensor(tensor) print_tensor(tensor, #tensor, 10, true, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does PrintTensor do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
沿用qwen2_5_vl.h风格,已删
xllm/models/vlm/qwen2_vl.h
Outdated
| } | ||
|
|
||
| private: | ||
| int dim_ = 0; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
xllm/models/vlm/qwen2_vl.h
Outdated
|
|
||
| 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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
7bc6598 to
71832a6
Compare
yq33victor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.