Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问如何对使用paddleslim 对微调后的uie-m-base模型进行自动压缩? #1909

Open
zwjwhxz opened this issue Feb 24, 2025 · 0 comments
Assignees

Comments

@zwjwhxz
Copy link

zwjwhxz commented Feb 24, 2025

环境:
paddlenlp 2.8.1
paddlepaddle-gpu 2.6.1
paddleslim 2.6.

使用paddleslim2.6版本中的example/auto_compression/nlp/run_uie.py脚本,运行报错oved in a future version, please use max_length instead.
/appslog/miniconda3/envs/pEnv39/lib/python3.9/site-packages/paddlenlp/transformers/tokenizer_utils_base.py:1912: FutureWarning: The pad_to_max_length argument is deprecated and will be removed in a future version, use padding=True or padding='longest' to pad to the longest sequence in the batch, or use padding='max_length' to pad to a max length. In this case, you can give a specific length with max_length (e.g. max_length=45) or leave max_length to None to pad to the maximal input size of the model (e.g. 512 for Bert).
Exception in thread Thread-1:
Traceback (most recent call last):
File "/appslog/miniconda3/envs/pEnv39/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/appslog/miniconda3/envs/pEnv39/lib/python3.9/threading.py", line 917, in run
self._target(*self._args, **self._kwargs)
File "/appslog/miniconda3/envs/pEnv39/lib/python3.9/site-packages/paddle/io/dataloader/dataloader_iter.py", line 235, in _thread_loop
batch = self._dataset_fetcher.fetch(
File "/appslog/miniconda3/envs/pEnv39/lib/python3.9/site-packages/paddle/io/dataloader/fetcher.py", line 77, in fetch
data.append(self.dataset[idx])
File "/appslog/miniconda3/envs/pEnv39/lib/python3.9/site-packages/paddlenlp/datasets/dataset.py", line 263, in getitem
return self._transform(self.new_data[idx]) if self._transform_pipline else self.new_data[idx]
File "/appslog/miniconda3/envs/pEnv39/lib/python3.9/site-packages/paddlenlp/datasets/dataset.py", line 255, in _transform
data = fn(data)
File "/appslog/homezwj/pycharmProject/clsLab/UIE/scriptTrain/compresslim/run_uie_org.py", line 105, in convert_example
"token_type_ids": encoded_inputs["token_type_ids"],
KeyError: 'token_type_ids

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants