使用mindie下atb-models对llama3-70b fp16量化成llama3-70b w4a16,出现expected str, bytes or os.PathLike object, not NoneType报错
收藏回复举报
使用mindie下atb-models对llama3-70b fp16量化成llama3-70b w4a16,出现expected str, bytes or os.PathLike object, not NoneType报错
t('forum.solved') 已解决
发表于2024-09-05 14:03:25
0 查看

【服务器型号】:Atlas 800 I A2

【版本信息】:

--驱动版本:24.1.rc2

--固件版本:7.3.0.1.231

--CANN版本:CANN 8.0.RC2

--Mindie:1.0.RC2

--Python版本:Python3.10.12

--操作系统版本:ubuntu22.04

--pytorch版本:2.1.0

问题现象:TypeError: expected str, bytes or os.PathLike object, not NoneType

python3 examples/models/llama3/convert_quant_weights.py --model_path /workspce/modelzoo/llama3-70b/  --save_directory /workspce/modelzoo/llama3-70b-w4a16  --w_bit 4 --a_bit 16  --w_sym True --mm_tensor False --is_lowbit True --group_size=128 --open_outlier False
/usr/local/Ascend/atb-models/examples/models/llama3/convert_quant_weights.py:5: DeprecationWarning: Package API `modelslim` is deprecated and will be removed in future version. Please use `msmodelslim` instead.
  from modelslim.pytorch.llm_ptq.llm_ptq_tools import QuantConfig
2024-09-05 05:54:25,305 [INFO] [pid: 5791] env.py-55: {'use_ascend': True, 'max_memory_gb': None, 'reserved_memory_gb': 3, 'skip_warmup': False, 'visible_devices': None, 'use_host_chooser': True, 'bind_cpu': True}
2024-09-05 05:54:25,442 - msmodelslim-logger - WARNING - `cpu` is set as `dev_type`, `dev_id` cannot be specified manually!
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 30/30 [00:22<00:00,  1.32it/s]
Traceback (most recent call last):
  File "/usr/local/Ascend/atb-models/examples/models/llama3/convert_quant_weights.py", line 105, in <module>
    quant_weight_generator = Quantifier(
  File "/usr/local/Ascend/atb-models/examples/convert/model_slim/quantifier.py", line 86, in __init__
    self.tokenizer = AutoTokenizer.from_pretrained(
  File "/usr/local/python3.10.12/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 846, in from_pretrained
    return tokenizer_class_py.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
  File "/usr/local/python3.10.12/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2048, in from_pretrained
    return cls._from_pretrained(
  File "/usr/local/python3.10.12/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2287, in _from_pretrained
    tokenizer = cls(*init_inputs, **init_kwargs)
  File "/usr/local/python3.10.12/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 182, in __init__
    self.sp_model = self.get_spm_processor(kwargs.pop("from_slow", False))
  File "/usr/local/python3.10.12/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 212, in get_spm_processor
    with open(self.vocab_file, "rb") as f:
TypeError: expected str, bytes or os.PathLike object, not NoneType
[ERROR] 2024-09-05-05:54:50 (PID:5791, Device:-1, RankID:-1) ERR99999 UNKNOWN application exception

cke_3845.png期望解决日期:2024.9.6

本帖最后由 匿名用户2024/09/05 14:04:16 编辑

我要发帖子