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

FP4 encoding related #1891

Open
Tiantian-Han opened this issue Jul 1, 2024 · 0 comments
Open

FP4 encoding related #1891

Tiantian-Han opened this issue Jul 1, 2024 · 0 comments
Assignees

Comments

@Tiantian-Han
Copy link

FP4_E2M1 = [-6.0, -4.0, -3.0, -2.0, -1.5, -1.0, -0.0625, 0, 0.0625, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0]

FP4_BNB = [-12.0, -8.0, -6.0, -4.0, -3.0, -2.0, -0.0625, 0, 0.0625, 2.0, 3.0, 4.0, 6.0, 8.0, 12.0]
FP4_E2M1 = [-6.0, -4.0, -3.0, -2.0, -1.5, -1.0, -0.0625, 0, 0.0625, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0]

Why is FP4_E2M1 like this? How is 0.0625 computed? According to OCP-Spec shouldn't it be 0.5? Is FP4_BNB the result of left shifting FP4_E2M1 one bit? Does it correspond to becoming E3M0?

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

2 participants