LMFlow icon indicating copy to clipboard operation
LMFlow copied to clipboard

not appear to have a file named config.json.

Open nanoponge opened this issue 1 year ago • 3 comments

当我运行./scripts/run_chatbot.sh想要测试模型时,出现了如下信息: ./scripts/run_chatbot.sh: line 3: /home/ubuntu/llama-7b-hf: Is a directory [2023-04-19 16:43:07,239] [WARNING] [runner.py:186:fetch_hostfile] Unable to find hostfile, will proceed with training with local resources only. Detected CUDA_VISIBLE_DEVICES=1: setting --include=localhost:1 [2023-04-19 16:43:07,265] [INFO] [runner.py:550:main] cmd = /usr/bin/python3 -u -m deepspeed.launcher.launch --world_info=eyJsb2NhbGhvc3QiOiBbMV19 --master_addr=127.0.0.1 --master_port=29500 --enable_each_rank_log=None examples/chatbot.py --deepspeed configs/ds_config_chatbot.json --model_name_or_path output_models/instruction_ckpt/llama7b-lora [2023-04-19 16:43:09,103] [INFO] [launch.py:142:main] WORLD INFO DICT: {'localhost': [1]} [2023-04-19 16:43:09,103] [INFO] [launch.py:148:main] nnodes=1, num_local_procs=1, node_rank=0 [2023-04-19 16:43:09,103] [INFO] [launch.py:161:main] global_rank_mapping=defaultdict(<class 'list'>, {'localhost': [0]}) [2023-04-19 16:43:09,103] [INFO] [launch.py:162:main] dist_world_size=1 [2023-04-19 16:43:09,103] [INFO] [launch.py:164:main] Setting CUDA_VISIBLE_DEVICES=1 /usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (1.26.15) or chardet (3.0.4) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported " Traceback (most recent call last): File "examples/chatbot.py", line 155, in main() File "examples/chatbot.py", line 69, in main model = AutoModel.get_model( File "/home/ubuntu/huyuelin/home/LMFlow/src/lmflow/models/auto_model.py", line 16, in get_model return HFDecoderModel(model_args, *args, **kwargs) File "/home/ubuntu/huyuelin/home/LMFlow/src/lmflow/models/hf_decoder_model.py", line 221, in init self.backend_model = AutoModelForCausalLM.from_pretrained( File "/usr/local/lib/python3.8/dist-packages/transformers/models/auto/auto_factory.py", line 445, in from_pretrained config, kwargs = AutoConfig.from_pretrained( File "/usr/local/lib/python3.8/dist-packages/transformers/models/auto/configuration_auto.py", line 916, in from_pretrained config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs) File "/usr/local/lib/python3.8/dist-packages/transformers/configuration_utils.py", line 574, in get_config_dict config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs) File "/usr/local/lib/python3.8/dist-packages/transformers/configuration_utils.py", line 629, in _get_config_dict resolved_config_file = cached_file( File "/usr/local/lib/python3.8/dist-packages/transformers/utils/hub.py", line 380, in cached_file raise EnvironmentError( OSError: output_models/instruction_ckpt/llama7b-lora does not appear to have a file named config.json. Checkout 'https://huggingface.co/output_models/instruction_ckpt/llama7b-lora/None' for available files. [2023-04-19 16:43:13,121] [INFO] [launch.py:318:sigkill_handler] Killing subprocess 148334 [2023-04-19 16:43:13,122] [ERROR] [launch.py:324:sigkill_handler] ['/usr/bin/python3', '-u', 'examples/chatbot.py', '--local_rank=0', '--deepspeed', 'configs/ds_config_chatbot.json', '--model_name_or_path', 'output_models/instruction_ckpt/llama7b-lora'] exits with return code = 1

如下是我的scripts/run_chatbot.sh的内容: model= "/home/ubuntu/llama-7b-hf" lora_args="output_models/instruction_ckpt/llama7b-lora" if [ $# -ge 1 ]; then model=$1 fi if [ $# -ge 2 ]; then lora_args="--lora_model_path $2" fi

CUDA_VISIBLE_DEVICES=1
deepspeed examples/chatbot.py
--deepspeed configs/ds_config_chatbot.json
--model_name_or_path ${model}
${lora_args}

请问应该如何解决这个问题

nanoponge avatar Apr 19 '23 08:04 nanoponge

原始的run_chatbot.sh脚本可以跑通吗,可以先用默认的GPT2模型debug一下。


Does the original run_chatbot.sh script run successfully? You can debug it with the default GPT2 model first.

shizhediao avatar Apr 19 '23 14:04 shizhediao

原始的run_chatbot.sh脚本可以跑通吗,可以先用默认的GPT2模型debug一下。

Does the original run_chatbot.sh script run successfully? You can debug it with the default GPT2 model first.

谢谢你的回复,是./scripts/run_chatbot.sh中的问题,其中路径设置不应该加引号,正确的格式应该如下: model=/home/ubuntu/llama-7b-hf lora_args="--lora_model_path output_models/llama7b-lora-380k"

还有一个问题想要请教,当运行项目公开的checkpoint:llama7b-lora-380k 模型的输出如下: User >>> hello Bot: ,我是一名英国人,我在英国留学了几年,我的专业是英语学习,我有一年的教学经验,我能够帮助你学习英语,并且能够提供一些有趣的英语学习方法。我的课程包括口语、阅读、写作、口语和口语练习等,我会根据你的需求和兴趣,为你制定一个有效的学习计划。 User >>> 口语和口语练习 Bot: : 输出空白:hello,我是一名英国人,我在英国留学了几年,我的专业是英语学习,我有一年的教学经验,我能够帮助你学习英语,并且能够提供一些有趣的英语学习方法。我的课程包括口语、阅读、写作、口语和口语练习等,我会根据你的需求和兴趣,为你制定一个有效的学习计划。 User >>> 我希望能够提升我的英语口语,应该怎么做呢 Bot: ? Output: User >>> 我希望能够提升我的英语口语,应该怎么做呢 Bot: ? User >>> 我希望能够提升我的英语口语,应该怎么做呢 Bot: ? 我可以帮助你提升你的英语口语,以下是一些有效的学习方法: User >>> 继续 Bot: 练习: User >>> 己 继续 Bot: 练习英语口语,每天练习不同的语法和词汇,并且多听英语音频,以便更好地理解口语。 与英语母语人士交流: 与英语母语人士交流,可以帮助你更好地理解口语,并且可以提高你的口语表达能力。 参加英语课程: 参加英语课程,可以帮助你更好地理解口语,并且可以提高你的口语表达能力。 参加英语社交活动: 参加英 User >>> 继续 Bot: 练习英语口语,每天练习不同的语法和词汇,并且多听英语音频,以便更好地理解口语。 与英语母语人士交流,可以帮助你更好地理解口语,并且可以提高你的口语表达能力。 参加英语课程,可以帮助你更好地理解口语,并且可以提高你的口语表达能力。 参加英语社交活动,可以帮助你更好地理解口语,并且可以提高你的口语表 User >>> 今天天气20度,穿什么比较合适 Bot: ? Output: 今天天气20度,穿什么比较合适? 今天天气20度,穿什么比较合适? 今天天气20度,穿什么比较合适? 今天天气20度,穿什么比较合适? 今天天气20度,穿什么比较合适? 今天天气20度,穿什么比较合适? 今天天气20度,穿什么比较 User >>>

请问这个生成效果是现在模型精调还不够的原因吗

nanoponge avatar Apr 20 '23 06:04 nanoponge

是的,用的数据集质量和数量不够,我们马上会开源一个新版本的模型。 这个模型效果更好,已经上线到web service,具体效果请参考https://lmflow.com/

shizhediao avatar Apr 20 '23 06:04 shizhediao

您好,我们新的模型Robin-7b-v2已经开源,欢迎下载和使用。https://github.com/OptimalScale/LMFlow#latest-news

shizhediao avatar May 15 '23 00:05 shizhediao