Draft
Conversation
PanZezhong1725
requested changes
May 12, 2025
infiniop/ops/matmul_gptq/README.md
Outdated
| @@ -0,0 +1,210 @@ | |||
|
|
|||
| # `MatmulGptq` | |||
infiniop/ops/matmul_gptq/README.md
Outdated
| z_{n, g} = \left\lfloor \frac{- \min_{k} \{w_{n, k}\}}{s_{n, g}} \right\rfloor | ||
| $$ | ||
|
|
||
| 关于一些细节的补充可以参考 https://zhuanlan.zhihu.com/p/692338716 ,源代码参考 https://github.com/IST-DASLab/gptq 。 |
Collaborator
There was a problem hiding this comment.
还是需要把量化的方式大概展现出来,不要直接上链接
infiniop/ops/matmul_gptq/README.md
Outdated
| ### 计算 | ||
|
|
||
| ```c | ||
| infiniStatus_t infiniopMatmulGptq( |
Collaborator
There was a problem hiding this comment.
infiniopQuantizeLinearGPTQ
infiniop/ops/matmul_gptq/README.md
Outdated
| ### 创建算子描述 | ||
|
|
||
| ```c | ||
| infiniStatus_t infiniopCreateMatmulGptqDescriptor( |
Collaborator
There was a problem hiding this comment.
infiniopCreateQuantizeLinearGPTQDescriptor
infiniop/ops/matmul_gptq/README.md
Outdated
| ### 量化 | ||
|
|
||
| ```c | ||
| infiniStatus_t infiniopMatmulQuant( |
Collaborator
There was a problem hiding this comment.
infiniopQuantizeGPTQ
infiniop/ops/matmul_gptq/README.md
Outdated
|
|
||
| ```c | ||
| infiniStatus_t infiniopMatmulQuant( | ||
| infiniopMatmulGptqDescriptor_t desc, |
Collaborator
There was a problem hiding this comment.
这里不能使用这个desc。因为linear的输入是动态的,而对权重的量化是不依赖任何动态形状信息的。接口逻辑需要重设计。或者你可以把这两个功能分成两个算子也可以
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.