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

Mixtral support #1644

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

minhthuc2502
Copy link
Collaborator

@minhthuc2502 minhthuc2502 commented Mar 18, 2024

I tried to support Mixtral by implementing MoE. The current problem is the inaccurancy in tensor after passing the MHA layer causes the wrong selection between the experts for certain tokens. This leads to a very low quality. tested with and without quantization.

I appreciate if you have any idea about this.

@minhthuc2502 minhthuc2502 marked this pull request as draft March 18, 2024 09:41
@vince62s
Copy link
Member

maybe you can check qkv before applying rotary to make sure the issue does not come from rotary embeddings/

also are those longer "tabs" on purpose ? makes the PR more difficult to read.

@minhthuc2502
Copy link
Collaborator Author

minhthuc2502 commented Mar 18, 2024

I already compared the tensor before passing the rotary embeddings. I seems like there is already a difference before the rotary embeddings (compared with transformers for HF). The input of self attention has a very high accurancy (+- < 0.0001) but the output of self attention has an error (+- ~0.002) then after passing post norm (+- <0.02). The drawback is that I can log only some values at the begin and at the end of the tensor in CT2, but the first and the last token work correctly, so the small inaccuracy in theses values are useless to conclude. I think should implement new version of log for StorageView to make the debugging more efficiency in the future.

I will fix the longer tabs, because I dev in a remote machine, the indent's configuration sometimes goes wrong.

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