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

multiheadattention int8 quantization #5733

Merged
merged 8 commits into from
Oct 15, 2024
Merged

Conversation

nihui
Copy link
Member

@nihui nihui commented Oct 14, 2024

  • arch fallback
  • quantization tool
  • coverage++
  • code clean
  • op doc

@nihui nihui closed this Oct 15, 2024
@nihui nihui reopened this Oct 15, 2024
@nihui nihui changed the title [WIP] multiheadattention int8 quantization multiheadattention int8 quantization Oct 15, 2024
@nihui nihui merged commit 66b54cb into Tencent:master Oct 15, 2024
60 of 67 checks passed
@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2024

Codecov Report

Attention: Patch coverage is 98.03279% with 6 lines in your changes missing coverage. Please review.

Project coverage is 94.68%. Comparing base (1c7af00) to head (85ddd8a).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/layer/multiheadattention.cpp 97.35% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5733      +/-   ##
==========================================
- Coverage   95.15%   94.68%   -0.47%     
==========================================
  Files         793      553     -240     
  Lines      270315   200255   -70060     
==========================================
- Hits       257218   189618   -67600     
+ Misses      13097    10637    -2460     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nihui
Copy link
Member Author

nihui commented Oct 16, 2024

mha * 12 (ms) fp32 fp16 bf16
(disabled atm)
int8/fp32 int8/fp16 int8/bf16
(disabled atm)
RES (kb) 51180 27816 27744 15380 15744 15548
qcom855plus
big core 1t
34.68 18.59 46.30 11.69 11.70 11.94
qcom855plus
small core 1t
188.14 104.37 176.96 62.78 59.10 61.01
mtk9000
big core 1t
60.12 30.83 69.63 13.00 12.77 12.89
mtk9000
small core 1t
153.16 103.58 181.27 49.55 45.01 50.39
imx7d 1t 863.34 1987.19 452.76 445.55

thus, armv7 gemm needs inline assembly optimization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants