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

没看懂论文Alogrithm1 逻辑 #73

Open
dujifeng opened this issue Nov 24, 2024 · 8 comments
Open

没看懂论文Alogrithm1 逻辑 #73

dujifeng opened this issue Nov 24, 2024 · 8 comments

Comments

@dujifeng
Copy link

能否用简单的话或者举个例子说明论文对于权重的比特拆分逻辑和查找表构造的逻辑。

@QingtaoLi1
Copy link
Contributor

@dujifeng Here is an example.
Image

@dujifeng
Copy link
Author

感谢您的回答!图中的意思我明白了。有一个点比较困惑,二进制表示的weight,为什么0代表-1,1代表+1?想请教一下这样做的内在逻辑

@QingtaoLi1
Copy link
Contributor

@dujifeng This can maximize the precision of calculation by making the values symmetric.

@dujifeng
Copy link
Author

dujifeng commented Nov 28, 2024

您好!感谢您的回答。下面是我的理解,希望您看看哪里不太对:
如果按照比特分解的逻辑进行乘法, 假设bitLength是w(标量)的比特位宽,w[i]是第i个比特,w*x = sum(w[i] * 2^i for i in range(bitLength)) * x = sum(w[i] * x * 2^i for i in range(bitLength)),所以我理解,第i个比特是0的时候,即w[i] = 0, w[i] * x = 0 * x, 但是您给的图中, 0代表的是-1, 所以不是很理解。
还有您说的最大化精度,也不是很理解。

@QingtaoLi1
Copy link
Contributor

@dujifeng We have an arithmerical conversion from [-1, 1] to [0,1] as well as other biases of the number representation. You can check the LUT kernel code for details. Take 2-bit as an example, the origin numbers are x=[-2 -1 0 1], our numbers are y=[-3 -1 1 3], then x=(y-1)/2.

@QingtaoLi1
Copy link
Contributor

Here are some discussions related to the problems: #35

@x2e500614
Copy link

@dujifeng Here is an example. Image

您好,请问这张图来自哪篇文章?

@QingtaoLi1
Copy link
Contributor

@x2e500614 This is provided by our team, not from any public paper.

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

No branches or pull requests

3 participants