Views
No views yet
1export MODEL_DIR = [local model checkpoint folder] or meta-llama/Meta-Llama-3.1-405B-Instruct
2# single GPU
3python3 quantize_quark.py \
4 --model_dir $MODEL_DIR \
5 --output_dir Meta-Llama-3.1-405B-Instruct-FP8-KV \
6 --quant_scheme w_fp8_a_fp8 \
7 --kv_cache_dtype fp8 \
8 --num_calib_data 128 \
9 --model_export quark_safetensors \
10 --no_weight_matrix_merge \
11 --custom_mode fp8
12
13# If model size is too large for single GPU, please use multi GPU instead.
14python3 quantize_quark.py \
15 --model_dir $MODEL_DIR \
16 --output_dir Meta-Llama-3.1-405B-Instruct-FP8-KV \
17 --quant_scheme w_fp8_a_fp8 \
18 --kv_cache_dtype fp8 \
19 --num_calib_data 128 \
20 --model_export quark_safetensors \
21 --no_weight_matrix_merge \
22 --multi_gpu \
23 --custom_mode fp8| Benchmark | Meta-Llama-3.1-405B-Instruct | Meta-Llama-3.1-405B-Instruct-FP8-KV(this model) |
| Perplexity-wikitext2 | 1.8561 | 1.8951 |