-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
gushiqiao
committed
Nov 28, 2024
1 parent
e9b83ce
commit e2ec48c
Showing
15 changed files
with
477 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
base: | ||
seed: &seed 42 | ||
model: | ||
type: model_type | ||
path: model path | ||
torch_dtype: auto | ||
eval: | ||
eval_pos: [pretrain, fake_quant] | ||
name: wikitext2 | ||
download: False | ||
path: eval data path | ||
seq_len: 2048 | ||
# For 7B / 13B model eval, bs can be set to "1", and inference_per_block can be set to "False". | ||
# For 70B model eval, bs can be set to "20", and inference_per_block can be set to "True". | ||
bs: 1 | ||
inference_per_block: False | ||
# Consistency of tokens between original and fake-quantized model output. | ||
eval_token_consist: True | ||
quant: | ||
method: RTN | ||
weight: | ||
bit: 8 | ||
symmetric: True | ||
granularity: per_channel | ||
group_size: -1 | ||
act: | ||
bit: 8 | ||
symmetric: True | ||
granularity: per_token | ||
kvcache: | ||
method: Naive | ||
bit: 8 | ||
symmetric: True | ||
granularity: per_token | ||
save: | ||
save_fake: False | ||
save_path: /path/to/save/ |
47 changes: 47 additions & 0 deletions
47
configs/quantization/methods/RTN/rtn_w_a_pertensor_static_kv.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
base: | ||
seed: &seed 42 | ||
model: | ||
type: model_type | ||
path: model path | ||
torch_dtype: auto | ||
calib: | ||
name: pileval | ||
download: False | ||
path: calib data path | ||
n_samples: 128 | ||
bs: 1 | ||
seq_len: 2048 | ||
preproc: general | ||
seed: *seed | ||
eval: | ||
eval_pos: [pretrain, fake_quant] | ||
name: wikitext2 | ||
download: False | ||
path: eval data path | ||
seq_len: 2048 | ||
# For 7B / 13B model eval, bs can be set to "1", and inference_per_block can be set to "False". | ||
# For 70B model eval, bs can be set to "20", and inference_per_block can be set to "True". | ||
bs: 1 | ||
inference_per_block: False | ||
# Consistency of tokens between original and fake-quantized model output. | ||
eval_token_consist: True | ||
quant: | ||
method: RTN | ||
weight: | ||
bit: 8 | ||
symmetric: True | ||
granularity: per_channel | ||
group_size: -1 | ||
act: | ||
bit: 8 | ||
symmetric: True | ||
granularity: per_tensor | ||
static: True | ||
kvcache: | ||
method: Naive | ||
bit: 8 | ||
symmetric: True | ||
granularity: per_tensor | ||
save: | ||
save_fake: False | ||
save_path: /path/to/save/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.