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

Add support GPT-NeoX Models without attention biases #2301

Merged
merged 3 commits into from
Dec 30, 2023

Conversation

dalgarak
Copy link
Contributor

This PR enables support for GPT-NeoX models without attention bias.

All models with the currently released GPT-NeoX architecture use attention bias by default, but the next version of huggingface transformers will support models without attention bias (merged PR - huggingface/transformers#28126), and we want to modify the code to properly initialize these models in vLLM as well.

In previous versions of the transformers, there was no attention_bias argument in GPTNeoXConfig, so we used hasattr() to apply a default value to avoid compatibility issues with version differences.

Copy link
Collaborator

@WoosukKwon WoosukKwon left a comment

Choose a reason for hiding this comment

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

Hi @dalgarak, thanks for submitting the PR. It seems we can simplify the change a bit. Please take a look at the review.

vllm/model_executor/models/gpt_neox.py Outdated Show resolved Hide resolved
Co-authored-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
Copy link
Collaborator

@WoosukKwon WoosukKwon left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for submitting the PR!

@WoosukKwon WoosukKwon merged commit 4934d49 into vllm-project:main Dec 30, 2023
2 checks passed
hongxiayang pushed a commit to hongxiayang/vllm that referenced this pull request Feb 13, 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.

None yet

2 participants