-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support ShadowKV and fix bugs (#291)
* Support ShadowKV and fix bugs * Support ShadowKV and fix bugs * Support ShadowKV and fix bugs --------- Co-authored-by: gushiqiao <[email protected]>
- Loading branch information
Showing
26 changed files
with
1,479 additions
and
701 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,46 @@ | ||
base: | ||
seed: &seed 42 | ||
model: | ||
type: Qwen2 | ||
path: /home/gushiqiao/nvme/gushiqiao/bussinesss/code_72b/SenseChat-Code-Tmp | ||
tokenizer_mode: fast | ||
torch_dtype: auto | ||
calib: | ||
name: pileval | ||
download: False | ||
path: /home/gushiqiao/nvme/gushiqiao/llm_datasets/calib/pileval | ||
n_samples: 256 | ||
bs: -1 | ||
seq_len: 512 | ||
preproc: txt_general_preproc | ||
seed: *seed | ||
# eval: | ||
# - eval_pos: [ fake_quant] | ||
# name: wikitext2 | ||
# download: False | ||
# path: /home/gushiqiao/nvme/gushiqiao/llm_datasets/eval/wikitext2 | ||
# 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: 10 | ||
# inference_per_block: True | ||
quant: | ||
method: Awq | ||
weight: | ||
bit: 8 | ||
symmetric: True | ||
granularity: per_channel | ||
group_size: -1 | ||
act: | ||
bit: 8 | ||
symmetric: True | ||
granularity: per_token | ||
special: | ||
trans: True | ||
trans_version: v2 | ||
weight_clip: False | ||
awq_bs: 128 | ||
quant_out: True | ||
save: | ||
save_trans: True | ||
save_path: ./awq_test_new_pileval_down_ov/ |
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
38 changes: 0 additions & 38 deletions
38
configs/quantization/methods/KVQuant/rtn_w_a_sink_quant_kv.yml
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
base: | ||
seed: &seed 42 | ||
model: | ||
type: model_type | ||
path: model path | ||
torch_dtype: torch.bfloat16 | ||
eval: | ||
eval_pos: [transformed] | ||
name: wikitext2 | ||
download: False | ||
path: eval_data_path | ||
bs: 1 | ||
seq_len: 2048 | ||
sparse: | ||
method: Dense | ||
kvcache: | ||
method: ShadowKV | ||
replace_attn: True | ||
sparsity_out: False | ||
save: | ||
save_trans: False | ||
save_path: ./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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
base: | ||
seed: &seed 42 | ||
model: | ||
type: model_type | ||
path: model path | ||
torch_dtype: torch.bfloat16 | ||
eval: | ||
eval_pos: [transformed] | ||
name: wikitext2 | ||
type: decode_ppl | ||
download: False | ||
path: eval_data_path | ||
bs: 1 | ||
inference_per_block: False | ||
num_samples: 50 | ||
# num_eval_tokens: 3 | ||
sparse: | ||
method: Dense | ||
kvcache: | ||
method: SinkKV | ||
window_length: 256 | ||
num_sink_tokens: 4 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,5 @@ sparse: | |
weight: | ||
sparsity: 0.5 | ||
save: | ||
save_fp: False | ||
save_lightllm: False | ||
save_trans: False | ||
save_path: ./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
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.