Views
No views yet
1export MODEL_DIR = [local model checkpoint folder] or databricks/dbrx-instruct
2# single GPU
3python3 quantize_quark.py \
4 --model_dir $MODEL_DIR \
5 --output_dir dbrx-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# 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 dbrx-instruct-FP8-KV\
16 --quant_scheme w_fp8_a_fp8 \
17 --kv_cache_dtype fp8 \
18 --num_calib_data 128 \
19 --multi_gpu \
20 --model_export quark_safetensors \
21 --no_weight_matrix_merge \
22 --custom_mode fp8| Benchmark | dbrx-instruct | dbrx-instruct-FP8-KV(this model) |
| Perplexity-wikitext2 | 4.2275 | 4.3033 |