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

Why Rotate Again in main.py #15

Open
RanchiZhao opened this issue Jul 30, 2024 · 3 comments
Open

Why Rotate Again in main.py #15

RanchiZhao opened this issue Jul 30, 2024 · 3 comments

Comments

@RanchiZhao
Copy link

logger.info("* Rotating model in float16 again")
tools.logging.Formatter.indent_inc()
rotate_llm(model, config.quant.rotation, rotation=rotation)

hi! Thanks for your work. I do not know why to rotate again in the above codes?

@wfan1203
Copy link

我也想问

@synxlin
Copy link
Contributor

synxlin commented Nov 8, 2024

Hi,
We fix this issue in the latest release.
In the previous version, we load all models in FP16 by default. However, some models use BF16 by default. Since rotation is sensitive to the weight precision, we choose to first load model in FP32 which is compatible with both FP16 and BF16, and perform weight rotation. We then load FP16 model and replace corresponding weights with rotated weights.

@wfan1203
Copy link

wfan1203 commented Nov 8, 2024 via email

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