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

Support pipeline parallel for glm-4v #11545

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

plusbang
Copy link
Contributor

@plusbang plusbang commented Jul 9, 2024

Description

Support pipeline parallel for glm-4v and provide related example.
TODO: may use the common python script for qwen-vl and glm-4v

3. Summary of the change

  • update logic of past key values for glm-4v
  • update model forward for case of input_ids=None and input mapped with image features
  • support more input parameter for pipeline_parallel_generate
  • add related examples

4. How to test?

@plusbang plusbang changed the title [WIP] Support pipeline parallel for glm-4v Support pipeline parallel for glm-4v Jul 10, 2024
@plusbang plusbang requested review from qiuxin2012 and xiangyuT July 11, 2024 01:42
inputs_embeds = self.embedding(input_ids)
else:
batch_size, seq_length, _ = inputs_embeds.shape
Copy link
Contributor

Choose a reason for hiding this comment

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

input_ids is needed for self.get_masks(). Maybe add an empty tensor here (similar to chatglm2/4)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

input_ids is needed for self.get_masks(). Maybe add an empty tensor here (similar to chatglm2/4)

Have updated :)

Copy link
Contributor

@xiangyuT xiangyuT left a comment

Choose a reason for hiding this comment

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

LGTM

@plusbang plusbang merged commit 2b8ad87 into intel-analytics:main Jul 11, 2024
1 check passed
RyuKosei pushed a commit to RyuKosei/ipex-llm that referenced this pull request Jul 19, 2024
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.

2 participants