Skip to content
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

[Feature]: support LlavaForConditionalGeneration with turbomind inference #2710

Merged
merged 9 commits into from
Nov 8, 2024

Conversation

deepindeed2022
Copy link
Contributor

@deepindeed2022 deepindeed2022 commented Nov 5, 2024

Motivation

  • 在main分支上支持 llava_interleave_qwen2_7b_hf 的turbomind推理
  • 修复多模态模型在tune 的bug

Modification

  • 适配模型加载
  • 添加测试example
  • 生成 gemm_config.ini 脚本的适配

Use cases (Optional)

lmdeploy serve api_server llava_hf/llava_interleave_qwen2_7b_hf

@lvhan028
Copy link
Collaborator

lvhan028 commented Nov 5, 2024

Please resolve the linting error by :

pip install pre-commit
cd lmdeploy # the root directory of lmdeploy repo
pre-commit install
pre-commit run --all-files

@lvhan028 lvhan028 requested review from AllentDan and irexyc November 5, 2024 03:28
@lvhan028 lvhan028 added the enhancement New feature or request label Nov 5, 2024
examples/python/README.md Outdated Show resolved Hide resolved
docs/en/multi_modal/llava_qwen.md Outdated Show resolved Hide resolved
docs/en/multi_modal/llava_qwen.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

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

Please resolve the conflicts

lmdeploy/turbomind/generate_gemm_config.py Outdated Show resolved Hide resolved
lmdeploy/turbomind/supported_models.py Outdated Show resolved Hide resolved
lmdeploy/turbomind/supported_models.py Outdated Show resolved Hide resolved
@deepindeed2022 deepindeed2022 changed the title [Feature]: support llava qwen2 with turbomind inference [Feature]: support LlavaForConditionalGeneration with turbomind inference Nov 8, 2024
@irexyc
Copy link
Collaborator

irexyc commented Nov 8, 2024

从config.json 里面读参数可能不是特别好,尤其是对于这种融合了多个模型的结构,很多参数都省略了,强行加默认值会增加出错的风险,之后可以另外提交PR采用更好的方式。

Copy link
Collaborator

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

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

Tested OK with llava-interleave-qwen-7b-hf

@lvhan028
Copy link
Collaborator

lvhan028 commented Nov 8, 2024

pr_ete_test flow is being rerun. It suffered OOM issue somehow.

@lvhan028 lvhan028 merged commit 78ab485 into InternLM:main Nov 8, 2024
5 checks passed
AllentDan pushed a commit to AllentDan/lmdeploy that referenced this pull request Nov 13, 2024
…ence (InternLM#2710)

* feat: support llava_qwen2 for fp16 and awq

* update generate gemm config script for VLM

* lint: fix lint warning

* doc: presenting the usage in the user guide

* resolve conflict issue and refactor for better design

* fix and doc:
- fix tune attribute error
- add chinese llava doc

* keep LlavaLlamaForCausalLM/LlavaMistralForCausalLM to llama

* fix attn_bias default value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants