Chinese-LLaMA-Alpaca
Chinese-LLaMA-Alpaca copied to clipboard
运行预训练脚本发生AttributeError
详细描述问题
尝试进行预训练,训练数据加载和处理阶段发生错误。 以下是run_pt.sh的配置:
lr=2e-4
lora_rank=8
lora_alpha=32
lora_trainable="q_proj,v_proj,k_proj,o_proj,gate_proj,down_proj,up_proj"
modules_to_save="embed_tokens,lm_head"
lora_dropout=0.05
pretrained_model=/root/autodl-tmp/openllama-3b-350bt/config.json
chinese_tokenizer_path=/root/autodl-tmp/openllama-3b-350bt/tokenizer.model
dataset_dir=/root/autodl-tmp/Dataset
data_cache=/root/autodl-tmp/Data_cache
per_device_train_batch_size=1
per_device_eval_batch_size=1
training_steps=10
gradient_accumulation_steps=1
output_dir=/root/autodl-tmp/Output
看起来和run_clm_pt_with_peft.py
中的group_texts(examples):
(ln434)之下的lm_datasets
以及处理代码有关,导致其缺少'train_test_split'方法
运行截图或日志
[INFO|tokenization_utils_base.py:1809] 2023-05-23 00:45:34,889 >> loading file /root/autodl-tmp/openllama-3b-350bt/tokenizer.model from cache at /root/autodl-tmp/openllama-3b-350bt/tokenizer.model
Traceback (most recent call last):
File "/root/autodl-tmp/Chinese-LLaMA-Alpaca/scripts/run_clm_pt_with_peft.py", line 622, in <module>
main()
File "/root/autodl-tmp/Chinese-LLaMA-Alpaca/scripts/run_clm_pt_with_peft.py", line 495, in main
lm_datasets = lm_datasets.train_test_split(test_size = data_args.validation_split_percentage)
AttributeError: 'list' object has no attribute 'train_test_split'
必查项目(前三项只保留你要问的)
基础模型:LLaMA (OpenLLaMA-3b-350bt preview)https://huggingface.co/openlm-research/open_llama_3b_350bt_preview 注:开源的羊驼复现,也许有雷,但是看起来这里和模型本身还没有关系 运行系统: Linux 问题分类:模型训练与精调
- [y ] (必选)由于相关依赖频繁更新,请确保按照Wiki中的相关步骤执行
- [y ] (必选)我已阅读FAQ章节并且已在Issue中对问题进行了搜索,没有找到相似问题和解决方案
- [y ] (必选)第三方插件问题:例如llama.cpp、text-generation-webui、LlamaChat等,同时建议到对应的项目中查找解决方案
默认加载dataset_dir下所有以txt结尾的文件。从报错信息看,并没有找到这些文件
默认加载dataset_dir下所有以txt结尾的文件。从报错信息看,并没有找到这些文件
好的,感谢解答。如果需要使用.json格式的数据集,应该要修改代码吧🤔
是的
详细描述问题
尝试进行预训练,训练数据加载和处理阶段发生错误。 以下是run_pt.sh的配置:
lr=2e-4 lora_rank=8 lora_alpha=32 lora_trainable="q_proj,v_proj,k_proj,o_proj,gate_proj,down_proj,up_proj" modules_to_save="embed_tokens,lm_head" lora_dropout=0.05 pretrained_model=/root/autodl-tmp/openllama-3b-350bt/config.json chinese_tokenizer_path=/root/autodl-tmp/openllama-3b-350bt/tokenizer.model dataset_dir=/root/autodl-tmp/Dataset data_cache=/root/autodl-tmp/Data_cache per_device_train_batch_size=1 per_device_eval_batch_size=1 training_steps=10 gradient_accumulation_steps=1 output_dir=/root/autodl-tmp/Output
看起来和
run_clm_pt_with_peft.py
中的group_texts(examples):
(ln434)之下的lm_datasets
以及处理代码有关,导致其缺少'train_test_split'方法运行截图或日志
[INFO|tokenization_utils_base.py:1809] 2023-05-23 00:45:34,889 >> loading file /root/autodl-tmp/openllama-3b-350bt/tokenizer.model from cache at /root/autodl-tmp/openllama-3b-350bt/tokenizer.model Traceback (most recent call last): File "/root/autodl-tmp/Chinese-LLaMA-Alpaca/scripts/run_clm_pt_with_peft.py", line 622, in <module> main() File "/root/autodl-tmp/Chinese-LLaMA-Alpaca/scripts/run_clm_pt_with_peft.py", line 495, in main lm_datasets = lm_datasets.train_test_split(test_size = data_args.validation_split_percentage) AttributeError: 'list' object has no attribute 'train_test_split'
必查项目(前三项只保留你要问的)
基础模型:LLaMA (OpenLLaMA-3b-350bt preview)https://huggingface.co/openlm-research/open_llama_3b_350bt_preview 注:开源的羊驼复现,也许有雷,但是看起来这里和模型本身还没有关系 运行系统: Linux 问题分类:模型训练与精调
- [y ] (必选)由于相关依赖频繁更新,请确保按照Wiki中的相关步骤执行
- [y ] (必选)我已阅读FAQ章节并且已在Issue中对问题进行了搜索,没有找到相似问题和解决方案
- [y ] (必选)第三方插件问题:例如llama.cpp、text-generation-webui、LlamaChat等,同时建议到对应的项目中查找解决方案
大佬,我这边的实验,跟你的实验环境(autodl)和基础模型(openllama)都使用的一样,可否加个好友 交流下呢 🤝
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your consideration.
Closing the issue, since no updates observed. Feel free to re-open if you need any further assistance.
AttributeError: 'list' object has no attribute 'train_test_split' 我也报了同样的错误,求指教,如何解决呢?
AttributeError: 'list' object has no attribute 'train_test_split' 我也报了同样的错误,求指教,如何解决呢?
请问你后来解决这个问题了吗?我也报了同样的错误,在线求助
详细描述问题
尝试进行预训练,训练数据加载和处理阶段发生错误。 以下是run_pt.sh的配置:
lr=2e-4 lora_rank=8 lora_alpha=32 lora_trainable="q_proj,v_proj,k_proj,o_proj,gate_proj,down_proj,up_proj" modules_to_save="embed_tokens,lm_head" lora_dropout=0.05 pretrained_model=/root/autodl-tmp/openllama-3b-350bt/config.json chinese_tokenizer_path=/root/autodl-tmp/openllama-3b-350bt/tokenizer.model dataset_dir=/root/autodl-tmp/Dataset data_cache=/root/autodl-tmp/Data_cache per_device_train_batch_size=1 per_device_eval_batch_size=1 training_steps=10 gradient_accumulation_steps=1 output_dir=/root/autodl-tmp/Output
看起来和
run_clm_pt_with_peft.py
中的group_texts(examples):
(ln434)之下的lm_datasets
以及处理代码有关,导致其缺少'train_test_split'方法运行截图或日志
[INFO|tokenization_utils_base.py:1809] 2023-05-23 00:45:34,889 >> loading file /root/autodl-tmp/openllama-3b-350bt/tokenizer.model from cache at /root/autodl-tmp/openllama-3b-350bt/tokenizer.model Traceback (most recent call last): File "/root/autodl-tmp/Chinese-LLaMA-Alpaca/scripts/run_clm_pt_with_peft.py", line 622, in <module> main() File "/root/autodl-tmp/Chinese-LLaMA-Alpaca/scripts/run_clm_pt_with_peft.py", line 495, in main lm_datasets = lm_datasets.train_test_split(test_size = data_args.validation_split_percentage) AttributeError: 'list' object has no attribute 'train_test_split'
必查项目(前三项只保留你要问的)
基础模型:LLaMA (OpenLLaMA-3b-350bt preview)https://huggingface.co/openlm-research/open_llama_3b_350bt_preview 注:开源的羊驼复现,也许有雷,但是看起来这里和模型本身还没有关系 运行系统: Linux 问题分类:模型训练与精调
- [y ] (必选)由于相关依赖频繁更新,请确保按照Wiki中的相关步骤执行
- [y ] (必选)我已阅读FAQ章节并且已在Issue中对问题进行了搜索,没有找到相似问题和解决方案
- [y ] (必选)第三方插件问题:例如llama.cpp、text-generation-webui、LlamaChat等,同时建议到对应的项目中查找解决方案
大佬,我这边的实验,跟你的实验环境(autodl)和基础模型(openllama)都使用的一样,可否加个好友 交流下呢 🤝
请问这个问题你解决了吗?求助
@iMountTai
可以参考Chinese-LLaMA-Alpaca-2训练脚本,且模型性能相对一期项目有较大的提升。
详细描述问题
尝试进行预训练,训练数据加载和处理阶段发生错误。 以下是run_pt.sh的配置:
lr=2e-4 lora_rank=8 lora_alpha=32 lora_trainable="q_proj,v_proj,k_proj,o_proj,gate_proj,down_proj,up_proj" modules_to_save="embed_tokens,lm_head" lora_dropout=0.05 pretrained_model=/root/autodl-tmp/openllama-3b-350bt/config.json chinese_tokenizer_path=/root/autodl-tmp/openllama-3b-350bt/tokenizer.model dataset_dir=/root/autodl-tmp/Dataset data_cache=/root/autodl-tmp/Data_cache per_device_train_batch_size=1 per_device_eval_batch_size=1 training_steps=10 gradient_accumulation_steps=1 output_dir=/root/autodl-tmp/Output
看起来和
run_clm_pt_with_peft.py
中的group_texts(examples):
(ln434)之下的lm_datasets
以及处理代码有关,导致其缺少'train_test_split'方法运行截图或日志
[INFO|tokenization_utils_base.py:1809] 2023-05-23 00:45:34,889 >> loading file /root/autodl-tmp/openllama-3b-350bt/tokenizer.model from cache at /root/autodl-tmp/openllama-3b-350bt/tokenizer.model Traceback (most recent call last): File "/root/autodl-tmp/Chinese-LLaMA-Alpaca/scripts/run_clm_pt_with_peft.py", line 622, in <module> main() File "/root/autodl-tmp/Chinese-LLaMA-Alpaca/scripts/run_clm_pt_with_peft.py", line 495, in main lm_datasets = lm_datasets.train_test_split(test_size = data_args.validation_split_percentage) AttributeError: 'list' object has no attribute 'train_test_split'
必查项目(前三项只保留你要问的)
基础模型:LLaMA (OpenLLaMA-3b-350bt preview)https://huggingface.co/openlm-research/open_llama_3b_350bt_preview 注:开源的羊驼复现,也许有雷,但是看起来这里和模型本身还没有关系 运行系统: Linux 问题分类:模型训练与精调
- [y ] (必选)由于相关依赖频繁更新,请确保按照Wiki中的相关步骤执行
- [y ] (必选)我已阅读FAQ章节并且已在Issue中对问题进行了搜索,没有找到相似问题和解决方案
- [y ] (必选)第三方插件问题:例如llama.cpp、text-generation-webui、LlamaChat等,同时建议到对应的项目中查找解决方案
大佬,我这边的实验,跟你的实验环境(autodl)和基础模型(openllama)都使用的一样,可否加个好友 交流下呢 🤝
请问这个问题你解决了吗?求助
dataset_dir这个参数里面的数据集要以txt结尾,比如 我在training目录下建了个datas,里面放的是按他要求的数据,文件以.txt 结尾 然后用dataset_dir=datas 就可了