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

[Hardware][Intel-Gaudi] Enable long-contexts + LoRA support for Intel Gaudi #12812

Merged
merged 2 commits into from
Feb 8, 2025

Conversation

SanjuCSudhakaran
Copy link
Contributor

This PR includes changes required to enable long-contexts + LoRA support in Intel Gaudi accelerators.

Copy link

github-actions bot commented Feb 6, 2025

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@SanjuCSudhakaran SanjuCSudhakaran marked this pull request as ready for review February 6, 2025 10:34
long_lora_offsets = torch.zeros(len(index_mapping_indices),
device=device,
dtype=torch.long)
if device == torch.device("hpu"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you limit the modifications to PunicaWrapperHPU, such as overriding the _update_base_metadata function?

Signed-off-by: Sanju C Sudhakaran <scsudhakaran@habana.ai>
@SanjuCSudhakaran SanjuCSudhakaran force-pushed the enable-long-contexts-lora branch from 9dce58a to 0d3e30d Compare February 7, 2025 09:55
Signed-off-by: Sanju C Sudhakaran <scsudhakaran@habana.ai>
@SanjuCSudhakaran SanjuCSudhakaran force-pushed the enable-long-contexts-lora branch from 0d3e30d to 25dd63d Compare February 7, 2025 10:15
Copy link
Collaborator

@jeejeelee jeejeelee left a comment

Choose a reason for hiding this comment

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

LGTM, I assume you have already tested and verified it successfully.

@jeejeelee jeejeelee added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 7, 2025
@DarkLight1337 DarkLight1337 merged commit 2880e21 into vllm-project:main Feb 8, 2025
61 of 64 checks passed
AoyuQC pushed a commit to AoyuQC/vllm that referenced this pull request Feb 8, 2025
… Gaudi (vllm-project#12812)

Signed-off-by: Sanju C Sudhakaran <scsudhakaran@habana.ai>
ShangmingCai pushed a commit to ShangmingCai/vllm that referenced this pull request Feb 10, 2025
… Gaudi (vllm-project#12812)

Signed-off-by: Sanju C Sudhakaran <scsudhakaran@habana.ai>
vivekgoe added a commit to HabanaAI/vllm-fork that referenced this pull request Feb 11, 2025
This PR refactors long-context + LoRA flow to align with the upstream
main branch vllm-project#12812.

HPU requires special handling while creating `long_lora_offsets_tensor`
in `convert_mapping`.
[(refer)](https://github.com/HabanaAI/vllm-fork/blob/b0a4e825370434ccaa30574ba9d20311fccdab36/vllm/lora/punica_wrapper/punica_hpu.py#L46)

As suggested by the vllm team this PR sets `long_lora_context` to None
while calling `convert_mapping`. This avoids HPU specific conditions
inside `convert_mapping` and explicitly handles HPU long-lora logic
inside overrided `_update_base_metadata`.

Co-authored-by: Vivek Goel <vgoel@habana.ai>
SzymonOzog pushed a commit to SzymonOzog/vllm that referenced this pull request Feb 12, 2025
… Gaudi (vllm-project#12812)

Signed-off-by: Sanju C Sudhakaran <scsudhakaran@habana.ai>
Signed-off-by: SzymonOzog <szymon.ozog@aleph-alpha.com>
panf2333 pushed a commit to yottalabsai/vllm that referenced this pull request Feb 18, 2025
… Gaudi (vllm-project#12812)

Signed-off-by: Sanju C Sudhakaran <scsudhakaran@habana.ai>
kerthcet pushed a commit to kerthcet/vllm that referenced this pull request Feb 21, 2025
… Gaudi (vllm-project#12812)

Signed-off-by: Sanju C Sudhakaran <scsudhakaran@habana.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants