有人用这个模型训练过吗?
我已经在电脑上配置好了该模型所需的环境(WIN11,使用了anaconda+python3.9.13,cuda11.5),并且使用python web_demo.py和python cli_demo.py也毫无问题。后来我按照仓库中所给的例子尝试着训练ADGEN,具体网址是https://github.com/THUDM/P-tuning-v2,使用bash train.sh训练也没问题,得到了3个模型,但是当我按照仓库所给的推理方法运行bash evaluate.sh就出问题了。结果显示
bash evaluate.sh
04/04/2023 15:08:24 - WARNING - main - Process rank: -1, device: cuda:0, n_gpu: 1distributed training: False, 16-bits training: False
04/04/2023 15:08:24 - INFO - main - Training/evaluation parameters Seq2SeqTrainingArguments(
n_gpu=1,
...(一大堆无关信息)
04/04/2023 15:20:33 - WARNING - datasets.builder - Found cached dataset json (C:/Users/ALIENWARE/.cache/huggingface/datasets/json/default-57b0ba1f30cea6ff/0.0.0/fe5dd6ea2639a6df622901539cb550cf8797e5a6b2dd7af1cf934bed8e233e6e)
100%|▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒| 2/2 [00:00<00:00, 1002.58it/s]
[INFO|configuration_utils.py:666] 2023-04-04 15:20:33,655 >> loading configuration file ./output/adgen-chatglm-6b-pt-8-1e-2/checkpoint-3000\config.json
[WARNING|configuration_auto.py:905] 2023-04-04 15:20:33,655 >> Explicitly passing a revision
is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision.
Traceback (most recent call last):
File "D:\ChatGLM-6B-main\ptuning\main.py", line 389, in
main()
File "D:\ChatGLM-6B-main\ptuning\main.py", line 107, in main
config = AutoConfig.from_pretrained(model_args.model_name_or_path, trust_remote_code=True)
File "C:\ProgramData\Anaconda3\lib\site-packages\transformers\models\auto\configuration_auto.py", line 911, in from_pretrained
config_class = get_class_from_dynamic_module(
File "C:\ProgramData\Anaconda3\lib\site-packages\transformers\dynamic_module_utils.py", line 399, in get_class_from_dynamic_module
return get_class_in_module(class_name, final_module.replace(".py", ""))
File "C:\ProgramData\Anaconda3\lib\site-packages\transformers\dynamic_module_utils.py", line 177, in get_class_in_module
module = importlib.import_module(module_path)
File "C:\ProgramData\Anaconda3\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'transformers_modules.'
跑通了吗老铁,是不是需要在liunx下跑,来个教程
训练之后,模型就只会回答服装的问题,好像是有问题
可能是 evaluate.sh 文件没修改,看看你的 evaluate.sh 文件