Views
No views yet
1export MODEL_DIR = [local model checkpoint folder] or mistralai/Mixtral-8x7B-Instruct-v0.1
2# single GPU
3python3 quantize_quark.py \
4 --model_dir $MODEL_DIR \
5 --output_dir Mixtral-8x7B-Instruct-v0.1-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# If model size is too large for single GPU, please use multi GPU instead.
13python3 quantize_quark.py \
14 --model_dir $MODEL_DIR \
15 --output_dir Mixtral-8x7B-Instruct-v0.1-FP8-KV \
16 --quant_scheme w_fp8_a_fp8 \
17 --kv_cache_dtype fp8 \
18 --num_calib_data 128 \
19 --model_export quark_safetensors \
20 --no_weight_matrix_merge \
21 --multi_gpu \
22 --custom_mode fp8| Benchmark | Mixtral-8x7B-Instruct-v0.1 | Mixtral-8x7B-Instruct-v0.1-FP8-KV(this model) |
| Perplexity-wikitext2 | 4.1391 | 4.2187 |
http://www.apache.org/licenses/LICENSE-2.0