Skip to content

Conversation

@3manifold
Copy link
Contributor

PR type

  • Document Updates

PR information

Add an example of an advanced usecase of --vllm_engine_kwargs use since there was nothing similar in the past. It applies to vllm >= 0.13.0.
List of input vLLM args can be found here vllm-project/vllm#26315 . It relates to #7132 .

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @3manifold, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the existing vLLM examples by introducing a practical demonstration of how to utilize the --vllm_engine_kwargs argument for advanced engine configurations. The update specifically illustrates how to enable Flash Attention, which can lead to performance improvements in compatible vLLM environments. This addition aims to provide clearer guidance for users looking to optimize their vLLM deployments.

Highlights

  • Documentation Update: This pull request primarily focuses on updating documentation by adding a new example.
  • Advanced vLLM Engine Configuration: An advanced use case for the --vllm_engine_kwargs parameter has been added to demonstrate how to configure the vLLM engine, specifically enabling Flash Attention.
  • vLLM Version Compatibility: The added example is applicable for vLLM versions 0.13.0 and above.
  • Issue Resolution: This change addresses the issue reported in vLLM 0.13.0 causes error due to deprecated VLLM_ATTENTION_BACKEND environment variable #7132.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a valuable example demonstrating the use of --vllm_engine_kwargs to configure the attention backend in vLLM. The change is correct and enhances the provided examples. I've added one suggestion to include a comment about the required vLLM version to make the example even more user-friendly.

--val_dataset speech_asr/speech_asr_aishell1_trainsets:validation#1000 \
--vllm_gpu_memory_utilization 0.9 \
--vllm_max_model_len 8192 \
--vllm_engine_kwargs '{"attention_config": {"backend": "FLASH_ATTN"}}' \
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This is a great example of using vllm_engine_kwargs. To prevent potential issues for users with older vLLM versions, it would be helpful to add a comment specifying the version requirement for attention_config, as this feature was introduced in vllm>=0.3.0.

Suggested change
--vllm_engine_kwargs '{"attention_config": {"backend": "FLASH_ATTN"}}' \
# Use flash attention via vllm_engine_kwargs (requires vllm>=0.3.0)
--vllm_engine_kwargs '{"attention_config": {"backend": "FLASH_ATTN"}}' \

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.

1 participant