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

Update stream llm to get correct outputs and re-enable rerotated-attention test. #656

Merged
merged 3 commits into from
Apr 25, 2024

Conversation

raikonenfnu
Copy link
Member

During the update of pytorch/HF, there seem to be a change of how causal mask was being handled. It seems like the attention.forward function used to get a causal_mask from the argument as attention_mask when is_causal is on. Now it seems like we would need to construct our own mask when is_causal is true. This was causing numerical issues in this test as well as on Llama2 qualitatively.

This PR introduces construction of causal mask, as well as removing unnecessary tensor parallel config checks which simplifies the code quite a bit.

Copy link
Contributor

@monorimet monorimet left a comment

Choose a reason for hiding this comment

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

Nice, thanks for this fix! LGTM

@raikonenfnu raikonenfnu merged commit 4a01c40 into nod-ai:main Apr 25, 2024
4 checks passed
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