Skip to content

ExLlamav2_HF: Convert logits to FP32 #4310

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

Merged
merged 7 commits into from
Oct 19, 2023
Merged

Conversation

turboderp
Copy link
Contributor

ExLlama converts logits to FP32 at the end of the forward pass, while ExLlamaV2 returns FP16 logits straight from the lm_head layer. Converting in the V2 loader makes sure the HF sampler behavior the same for V1 and V2.

Checklist:

turboderp and others added 7 commits October 5, 2023 17:50
# Conflicts:
#	modules/exllamav2.py
#	requirements.txt
#	requirements_amd.txt
#	requirements_amd_noavx2.txt
#	requirements_apple_intel.txt
#	requirements_apple_silicon.txt
#	requirements_cpu_only.txt
#	requirements_cpu_only_noavx2.txt
#	requirements_noavx2.txt
#	requirements_nowheels.txt
@Ph0rk0z
Copy link
Contributor

Ph0rk0z commented Oct 18, 2023

PPL on evaluation went down slightly after this.

@oobabooga
Copy link
Owner

Thanks @turboderp, I would never have noticed this.

@oobabooga oobabooga merged commit ae8cd44 into oobabooga:main Oct 19, 2023
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

Successfully merging this pull request may close these issues.

3 participants