Skip to content

Commit

Permalink
typo fix, refine log
Browse files Browse the repository at this point in the history
Signed-off-by: Zhang, Weiwei1 <weiwei1.zhang@intel.com>
  • Loading branch information
WeiweiZhang1 committed Jan 17, 2025
1 parent 35512fe commit f958f4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion auto_round/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def check_auto_round_exllamav2_installed():
packing_format="triton_zp+-1",
bits=[2, 3, 4, 8], group_size=None,
priority=1, feature_checks=[feature_multiply_checker_32],
alias=["auto_round:auto_gptq:cuda,auto_gptq:cuda, auto_round:gptq:cuda"],
alias=["auto_round:auto_gptq:cuda","auto_gptq:cuda","auto_round:gptq:cuda"],
convertable_format=["triton_zp+-1"],
requirements=["auto-gptq>=0.7.1"]
)
Expand Down Expand Up @@ -554,3 +554,4 @@ def get_layer_backend(device, backend, orig_backend, bits, group_size, sym, in_f
reverse=True)

return supported_backends[0]

7 changes: 3 additions & 4 deletions auto_round/calib_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,15 @@ def get_pile_dataset(tokenizer, seqlen, dataset_name="NeelNanda/pile-10k", split
calib_dataset = load_dataset(dataset_name, split=split)
except Exception as e:
logger.error(f"Failed to load the dataset: {e}." \
"Another source dataset can be used as an alternative by installing the 'modelscope' library and " \
"setting '--dataset swift/pile-val-backup' then re-running the script.")
"Consider using a backup dataset by `pip install modelscope`" \
" and set '--dataset swift/pile-val-backup' in AutoRound API.")
sys.exit(1)
calib_dataset = calib_dataset.shuffle(seed=seed)
calib_dataset = calib_dataset.map(tokenizer_function, batched=True)

return calib_dataset



@register_dataset("swift/pile-val-backup")
def get_pile_val_dataset(tokenizer, seqlen, dataset_name="swift/pile-val-backup", split=None, seed=42,
apply_chat_template=False):
Expand All @@ -141,7 +140,7 @@ def get_pile_val_dataset(tokenizer, seqlen, dataset_name="swift/pile-val-backup"
tokenizer_function = get_tokenizer_function(tokenizer, seqlen, apply_chat_template=apply_chat_template)
from transformers.utils.versions import require_version
require_version("modelscope",
"Loading swift/pile-val-backup dataset requires modelscope to be installed, `pip install modelscope`")
"Loading 'swift/pile-val-backup' dataset requires modelscope to be installed, `pip install modelscope`")
from modelscope import MsDataset # pylint: disable=E0401
calib_dataset = MsDataset.load('swift/pile-val-backup',
'default', split=split).to_iterable_dataset() #, use_streaming=True
Expand Down

0 comments on commit f958f4c

Please sign in to comment.