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 default M from 2 to 8 #35

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

a3213105
Copy link
Contributor

@a3213105 a3213105 commented Nov 1, 2023

So when matrix M<=8, we will use ig kernel to boost bf16 gemms, otherwise use oneDNN kernel.
From the performance data, we can see that with M=8, It can boost next token performance of BS=4/8, especially for BS=4.
This patch doesn't affect first token latency since the M of first latency is larger than 8.

batchsize 1 2 4 8 16
chatglm-6b
original M=2 30.58 31.03 63.56 67.61 78.38
M=7 29.54 32.58 41.28 68.14 78.2
M=8 29.87 32.88 40.57 66.82 78.83
           
chatglm2-6b
original M=2 30.7 31.61 63.11 67.32 83.61
M=7 29.94 33.3 41.1 70.68 83.49
M=8 31.76 31.84 41.01 63.84 78.83
           
llama-7b
original M=2 32.38 36.47 71.6 78.45 92.83
M=7 33.88 37.54 46.43 79.64 93.27
M=8 32.64 36.59 46.04 75.14 93.18

@Duyi-Wang Duyi-Wang merged commit 7e448f6 into intel:main Nov 2, 2023
@a3213105 a3213105 deleted the mulmal_default_M_size branch February 22, 2024 05:48
Duyi-Wang added a commit that referenced this pull request Aug 21, 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.

3 participants