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

Simulated W4Afp8 Quantization #331

Merged
merged 35 commits into from
Nov 28, 2024
Merged

Simulated W4Afp8 Quantization #331

merged 35 commits into from
Nov 28, 2024

Conversation

wenhuach21
Copy link
Contributor

@wenhuach21 wenhuach21 commented Nov 21, 2024

for model_name in "/models/Meta-Llama-3.1-8B-Instruct" "/models/Meta-Llama-3-8B-Instruct"
do
CUDA_VISIBLE_DEVICES=$device
python3 -m auto_round
--model_name $model_name
--device 0
--act_bits 8
--group_size 128
--bits 4
--tasks "lambada_openai,hellaswag,winogrande,piqa,mmlu"
--eval_bs $eval_bs
--data_type "fp8_to_int_sym"
--act_data_type "fp8"
--disable_act_dynamic
--format "fake"
2>&1 | tee -a w4_fp8_act_static.txt
done

@wenhuach21 wenhuach21 marked this pull request as draft November 27, 2024 06:10
@wenhuach21 wenhuach21 changed the title [WIP]try to support fp8 Simulated W4Afp8 Quantization Nov 28, 2024
@wenhuach21 wenhuach21 marked this pull request as ready for review November 28, 2024 02:05
@wenhuach21 wenhuach21 removed the draft label Nov 28, 2024
self.orig_layer = orig_layer
self.device = device
self.enable_minmax_tuning = enable_minmax_tuning
self.enable_norm_bias_tuning = enable_norm_bias_tuning and orig_layer.bias is not None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enable_norm_bias_tuning and (orig_layer.bias is not None)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a must, right? is not should be calculated first

@wenhuach21 wenhuach21 merged commit a98175f into main Nov 28, 2024
8 checks passed
@wenhuach21 wenhuach21 deleted the fp8 branch November 28, 2024 11:05
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.

4 participants