Atlas 800I A2使用deepspeed进行微调报错
收藏回复举报
Atlas 800I A2使用deepspeed进行微调报错
t('forum.solved') 已解决
发表于2024-09-14 09:18:20
0 查看

版本信息如下

  • 模型:llama2-7B

  • 机型:Atlas 800I A2

  • 驱动true

  • cann以及算子加速包的版本信息true

  • pytorch,transformers和deepspeed版本true




  • 报错如下true

  • true

  • true

  • 报错日志 ```cpp [2024-09-13 08:53:04,378] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to npu (auto detect) [2024-09-13 08:53:05,465] [WARNING] [runner.py:212:fetch_hostfile] Unable to find hostfile, will proceed with training with local resources only. [2024-09-13 08:53:05,466] [INFO] [runner.py:585:main] cmd = /usr/local/bin/python3.10 -u -m deepspeed.launcher.launch --world_info=eyJsb2NhbGhvc3QiOiBbMCwgMSwgMiwgMywgNCwgNSwgNiwgN119 --master_addr=127.0.0.1 --master_port=29500 --enable_each_rank_log=None main.py --data_path Dahoas/rm-static Dahoas/full-hh-rlhf Dahoas/synthetic-instruct-gptj-pairwise yitingxie/rlhf-reward-datasets --data_split 2,4,4 --model_name_or_path /home/llama2 --per_device_train_batch_size 4 --per_device_eval_batch_size 4 --max_seq_len 512 --learning_rate 9.65e-6 --weight_decay 0. --num_train_epochs 4 --gradient_accumulation_steps 1 --lr_scheduler_type cosine --num_warmup_steps 0 --seed 1234 --gradient_checkpointing --zero_stage 3 --deepspeed --lora_dim 128 --lora_module_name layers. --output_dir ./output [2024-09-13 08:53:09,257] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to npu (auto detect) [2024-09-13 08:53:10,249] [INFO] [launch.py:146:main] WORLD INFO DICT: {'localhost': [0, 1, 2, 3, 4, 5, 6, 7]} [2024-09-13 08:53:10,249] [INFO] [launch.py:152:main] nnodes=1, num_local_procs=8, node_rank=0 [2024-09-13 08:53:10,249] [INFO] [launch.py:163:main] global_rank_mapping=defaultdict(<class 'list'>, {'localhost': [0, 1, 2, 3, 4, 5, 6, 7]}) [2024-09-13 08:53:10,249] [INFO] [launch.py:164:main] dist_world_size=8 [2024-09-13 08:53:10,249] [INFO] [launch.py:168:main] Setting ASCEND_RT_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 [2024-09-13 08:53:10,250] [INFO] [launch.py:256:main] process 453424 spawned with command: ['/usr/local/bin/python3.10', '-u', 'main.py', '--local_rank=0', '--data_path', 'Dahoas/rm-static', 'Dahoas/full-hh-rlhf', 'Dahoas/synthetic-instruct-gptj-pairwise', 'yitingxie/rlhf-reward-datasets', '--data_split', '2,4,4', '--model_name_or_path', '/home/llama2', '--per_device_train_batch_size', '4', '--per_device_eval_batch_size', '4', '--max_seq_len', '512', '--learning_rate', '9.65e-6', '--weight_decay', '0.', '--num_train_epochs', '4', '--gradient_accumulation_steps', '1', '--lr_scheduler_type', 'cosine', '--num_warmup_steps', '0', '--seed', '1234', '--gradient_checkpointing', '--zero_stage', '3', '--deepspeed', '--lora_dim', '128', '--lora_module_name', 'layers.', '--output_dir', './output'] [2024-09-13 08:53:10,251] [INFO] [launch.py:256:main] process 453425 spawned with command: ['/usr/local/bin/python3.10', '-u', 'main.py', '--local_rank=1', '--data_path', 'Dahoas/rm-static', 'Dahoas/full-hh-rlhf', 'Dahoas/synthetic-instruct-gptj-pairwise', 'yitingxie/rlhf-reward-datasets', '--data_split', '2,4,4', '--model_name_or_path', '/home/llama2', '--per_device_train_batch_size', '4', '--per_device_eval_batch_size', '4', '--max_seq_len', '512', '--learning_rate', '9.65e-6', '--weight_decay', '0.', '--num_train_epochs', '4', '--gradient_accumulation_steps', '1', '--lr_scheduler_type', 'cosine', '--num_warmup_steps', '0', '--seed', '1234', '--gradient_checkpointing', '--zero_stage', '3', '--deepspeed', '--lora_dim', '128', '--lora_module_name', 'layers.', '--output_dir', './output'] [2024-09-13 08:53:10,252] [INFO] [launch.py:256:main] process 453426 spawned with command: ['/usr/local/bin/python3.10', '-u', 'main.py', '--local_rank=2', '--data_path', 'Dahoas/rm-static', 'Dahoas/full-hh-rlhf', 'Dahoas/synthetic-instruct-gptj-pairwise', 'yitingxie/rlhf-reward-datasets', '--data_split', '2,4,4', '--model_name_or_path', '/home/llama2', '--per_device_train_batch_size', '4', '--per_device_eval_batch_size', '4', '--max_seq_len', '512', '--learning_rate', '9.65e-6', '--weight_decay', '0.', '--num_train_epochs', '4', '--gradient_accumulation_steps', '1', '--lr_scheduler_type', 'cosine', '--num_warmup_steps', '0', '--seed', '1234', '--gradient_checkpointing', '--zero_stage', '3', '--deepspeed', '--lora_dim', '128', '--lora_module_name', 'layers.', '--output_dir', './output'] [2024-09-13 08:53:10,252] [INFO] [launch.py:256:main] process 453427 spawned with command: ['/usr/local/bin/python3.10', '-u', 'main.py', '--local_rank=3', '--data_path', 'Dahoas/rm-static', 'Dahoas/full-hh-rlhf', 'Dahoas/synthetic-instruct-gptj-pairwise', 'yitingxie/rlhf-reward-datasets', '--data_split', '2,4,4', '--model_name_or_path', '/home/llama2', '--per_device_train_batch_size', '4', '--per_device_eval_batch_size', '4', '--max_seq_len', '512', '--learning_rate', '9.65e-6', '--weight_decay', '0.', '--num_train_epochs', '4', '--gradient_accumulation_steps', '1', '--lr_scheduler_type', 'cosine', '--num_warmup_steps', '0', '--seed', '1234', '--gradient_checkpointing', '--zero_stage', '3', '--deepspeed', '--lora_dim', '128', '--lora_module_name', 'layers.', '--output_dir', './output'] [2024-09-13 08:53:10,253] [INFO] [launch.py:256:main] process 453428 spawned with command: ['/usr/local/bin/python3.10', '-u', 'main.py', '--local_rank=4', '--data_path', 'Dahoas/rm-static', 'Dahoas/full-hh-rlhf', 'Dahoas/synthetic-instruct-gptj-pairwise', 'yitingxie/rlhf-reward-datasets', '--data_split', '2,4,4', '--model_name_or_path', '/home/llama2', '--per_device_train_batch_size', '4', '--per_device_eval_batch_size', '4', '--max_seq_len', '512', '--learning_rate', '9.65e-6', '--weight_decay', '0.', '--num_train_epochs', '4', '--gradient_accumulation_steps', '1', '--lr_scheduler_type', 'cosine', '--num_warmup_steps', '0', '--seed', '1234', '--gradient_checkpointing', '--zero_stage', '3', '--deepspeed', '--lora_dim', '128', '--lora_module_name', 'layers.', '--output_dir', './output'] [2024-09-13 08:53:10,254] [INFO] [launch.py:256:main] process 453429 spawned with command: ['/usr/local/bin/python3.10', '-u', 'main.py', '--local_rank=5', '--data_path', 'Dahoas/rm-static', 'Dahoas/full-hh-rlhf', 'Dahoas/synthetic-instruct-gptj-pairwise', 'yitingxie/rlhf-reward-datasets', '--data_split', '2,4,4', '--model_name_or_path', '/home/llama2', '--per_device_train_batch_size', '4', '--per_device_eval_batch_size', '4', '--max_seq_len', '512', '--learning_rate', '9.65e-6', '--weight_decay', '0.', '--num_train_epochs', '4', '--gradient_accumulation_steps', '1', '--lr_scheduler_type', 'cosine', '--num_warmup_steps', '0', '--seed', '1234', '--gradient_checkpointing', '--zero_stage', '3', '--deepspeed', '--lora_dim', '128', '--lora_module_name', 'layers.', '--output_dir', './output'] [2024-09-13 08:53:10,254] [INFO] [launch.py:256:main] process 453430 spawned with command: ['/usr/local/bin/python3.10', '-u', 'main.py', '--local_rank=6', '--data_path', 'Dahoas/rm-static', 'Dahoas/full-hh-rlhf', 'Dahoas/synthetic-instruct-gptj-pairwise', 'yitingxie/rlhf-reward-datasets', '--data_split', '2,4,4', '--model_name_or_path', '/home/llama2', '--per_device_train_batch_size', '4', '--per_device_eval_batch_size', '4', '--max_seq_len', '512', '--learning_rate', '9.65e-6', '--weight_decay', '0.', '--num_train_epochs', '4', '--gradient_accumulation_steps', '1', '--lr_scheduler_type', 'cosine', '--num_warmup_steps', '0', '--seed', '1234', '--gradient_checkpointing', '--zero_stage', '3', '--deepspeed', '--lora_dim', '128', '--lora_module_name', 'layers.', '--output_dir', './output'] [2024-09-13 08:53:10,255] [INFO] [launch.py:256:main] process 453431 spawned with command: ['/usr/local/bin/python3.10', '-u', 'main.py', '--local_rank=7', '--data_path', 'Dahoas/rm-static', 'Dahoas/full-hh-rlhf', 'Dahoas/synthetic-instruct-gptj-pairwise', 'yitingxie/rlhf-reward-datasets', '--data_split', '2,4,4', '--model_name_or_path', '/home/llama2', '--per_device_train_batch_size', '4', '--per_device_eval_batch_size', '4', '--max_seq_len', '512', '--learning_rate', '9.65e-6', '--weight_decay', '0.', '--num_train_epochs', '4', '--gradient_accumulation_steps', '1', '--lr_scheduler_type', 'cosine', '--num_warmup_steps', '0', '--seed', '1234', '--gradient_checkpointing', '--zero_stage', '3', '--deepspeed', '--lora_dim', '128', '--lora_module_name', 'layers.', '--output_dir', './output'] [2024-09-13 08:53:14,441] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to npu (auto detect) [2024-09-13 08:53:14,605] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to npu (auto detect) [2024-09-13 08:53:14,888] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to npu (auto detect) [2024-09-13 08:53:14,889] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to npu (auto detect) [2024-09-13 08:53:14,894] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to npu (auto detect) [2024-09-13 08:53:14,915] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to npu (auto detect) [2024-09-13 08:53:14,951] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to npu (auto detect) [2024-09-13 08:53:14,953] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to npu (auto detect) /usr/local/lib/python3.10/site-packages/transformers/deepspeed.py:24: FutureWarning: transformers.deepspeed module is deprecated and will be removed in a future version. Please import deepspeed modules directly from transformers.integrations warnings.warn( /usr/local/lib/python3.10/site-packages/transformers/deepspeed.py:24: FutureWarning: transformers.deepspeed module is deprecated and will be removed in a future version. Please import deepspeed modules directly from transformers.integrations warnings.warn( /usr/local/lib/python3.10/site-packages/transformers/deepspeed.py:24: FutureWarning: transformers.deepspeed module is deprecated and will be removed in a future version. Please import deepspeed modules directly from transformers.integrations warnings.warn( /usr/local/lib/python3.10/site-packages/transformers/deepspeed.py:24: FutureWarning: transformers.deepspeed module is deprecated and will be removed in a future version. Please import deepspeed modules directly from transformers.integrations warnings.warn( /usr/local/lib/python3.10/site-packages/transformers/deepspeed.py:24: FutureWarning: transformers.deepspeed module is deprecated and will be removed in a future version. Please import deepspeed modules directly from transformers.integrations warnings.warn( /usr/local/lib/python3.10/site-packages/transformers/deepspeed.py:24: FutureWarning: transformers.deepspeed module is deprecated and will be removed in a future version. Please import deepspeed modules directly from transformers.integrations warnings.warn( /usr/local/lib/python3.10/site-packages/transformers/deepspeed.py:24: FutureWarning: transformers.deepspeed module is deprecated and will be removed in a future version. Please import deepspeed modules directly from transformers.integrations warnings.warn( /usr/local/lib/python3.10/site-packages/transformers/deepspeed.py:24: FutureWarning: transformers.deepspeed module is deprecated and will be removed in a future version. Please import deepspeed modules directly from transformers.integrations warnings.warn( [W compiler_depend.ts:623] Warning: expandable_segments currently defaults to false. You can enable this feature by export PYTORCH_NPU_ALLOC_CONF = expandable_segments:True. (function operator()) [W compiler_depend.ts:623] Warning: expandable_segments currently defaults to false. You can enable this feature by export PYTORCH_NPU_ALLOC_CONF = expandable_segments:True. (function operator()) [W compiler_depend.ts:623] Warning: expandable_segments currently defaults to false. You can enable this feature by export PYTORCH_NPU_ALLOC_CONF = expandable_segments:True. (function operator()) [W compiler_depend.ts:623] Warning: expandable_segments currently defaults to false. You can enable this feature by export PYTORCH_NPU_ALLOC_CONF = expandable_segments:True. (function operator()) [W compiler_depend.ts:623] Warning: expandable_segments currently defaults to false. You can enable this feature by export PYTORCH_NPU_ALLOC_CONF = expandable_segments:True. (function operator()) [W compiler_depend.ts:623] Warning: expandable_segments currently defaults to false. You can enable this feature by export PYTORCH_NPU_ALLOC_CONF = expandable_segments:True. (function operator()) [W compiler_depend.ts:623] Warning: expandable_segments currently defaults to false. You can enable this feature by export PYTORCH_NPU_ALLOC_CONF = expandable_segments:True. (function operator()) [W compiler_depend.ts:623] Warning: expandable_segments currently defaults to false. You can enable this feature by export PYTORCH_NPU_ALLOC_CONF = expandable_segments:True. (function operator()) [2024-09-13 08:53:22,223] [INFO] [comm.py:652:init_distributed] cdb=None [2024-09-13 08:53:22,224] [INFO] [comm.py:683:init_distributed] Initializing TorchBackend in DeepSpeed with backend hccl [2024-09-13 08:53:23,084] [INFO] [comm.py:652:init_distributed] cdb=None [2024-09-13 08:53:23,644] [INFO] [comm.py:652:init_distributed] cdb=None [2024-09-13 08:53:23,663] [INFO] [comm.py:652:init_distributed] cdb=None [2024-09-13 08:53:23,981] [INFO] [comm.py:652:init_distributed] cdb=None [2024-09-13 08:53:24,075] [INFO] [comm.py:652:init_distributed] cdb=None [2024-09-13 08:53:24,383] [INFO] [comm.py:652:init_distributed] cdb=None [2024-09-13 08:53:24,532] [INFO] [comm.py:652:init_distributed] cdb=None The tokenizer class you load from this checkpoint is not the same type as the class this function is called from. It may result in unexpected tokenization. The tokenizer class you load from this checkpoint is 'PreTrainedTokenizerFast'. The class this function is called from is 'LlamaTokenizer'. The tokenizer class you load from this checkpoint is not the same type as the class this function is called from. It may result in unexpected tokenization. The tokenizer class you load from this checkpoint is 'PreTrainedTokenizerFast'. The class this function is called from is 'LlamaTokenizer'. You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. This is expected, and simply means that the legacy (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set legacy=False. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. This is expected, and simply means that the legacy (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set legacy=False. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message Traceback (most recent call last): File "/home/main.py", line 395, in main() File "/home/main.py", line 239, in main The tokenizer class you load from this checkpoint is not the same type as the class this function is called from. It may result in unexpected tokenization. The tokenizer class you load from this checkpoint is 'PreTrainedTokenizerFast'. The class this function is called from is 'LlamaTokenizer'. tokenizer = load_hf_tokenizer(args.model_name_or_path, File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 104, in load_hf_tokenizer tokenizer = get_tokenizer(model_name, File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 78, in get_tokenizer tokenizer = LlamaTokenizer.from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2271, in from_pretrained return cls._from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2505, in _from_pretrained You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. This is expected, and simply means that the legacy (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set legacy=False. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message tokenizer = cls(*init_inputs, **init_kwargs) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 171, in __init__ self.sp_model = self.get_spm_processor(kwargs.pop("from_slow", False)) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 198, in get_spm_processor tokenizer.Load(self.vocab_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/__init__.py", line 961, in Load The tokenizer class you load from this checkpoint is not the same type as the class this function is called from. It may result in unexpected tokenization. The tokenizer class you load from this checkpoint is 'PreTrainedTokenizerFast'. The class this function is called from is 'LlamaTokenizer'. return self.LoadFromFile(model_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/__init__.py", line 316, in LoadFromFile return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg) TypeError: not a string Traceback (most recent call last): File "/home/main.py", line 395, in main() File "/home/main.py", line 239, in main tokenizer = load_hf_tokenizer(args.model_name_or_path, You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. This is expected, and simply means that the legacy (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set legacy=False. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 104, in load_hf_tokenizer tokenizer = get_tokenizer(model_name, File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 78, in get_tokenizer The tokenizer class you load from this checkpoint is not the same type as the class this function is called from. It may result in unexpected tokenization. The tokenizer class you load from this checkpoint is 'PreTrainedTokenizerFast'. The class this function is called from is 'LlamaTokenizer'. tokenizer = LlamaTokenizer.from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2271, in from_pretrained return cls._from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2505, in _from_pretrained You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. This is expected, and simply means that the legacy (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set legacy=False. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message tokenizer = cls(*init_inputs, **init_kwargs) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 171, in __init__ self.sp_model = self.get_spm_processor(kwargs.pop("from_slow", False)) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 198, in get_spm_processor Traceback (most recent call last): File "/home/main.py", line 395, in tokenizer.Load(self.vocab_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/__init__.py", line 961, in Load main() File "/home/main.py", line 239, in main return self.LoadFromFile(model_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/__init__.py", line 316, in LoadFromFile tokenizer = load_hf_tokenizer(args.model_name_or_path, File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 104, in load_hf_tokenizer return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg) TypeError: not a string tokenizer = get_tokenizer(model_name, File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 78, in get_tokenizer tokenizer = LlamaTokenizer.from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2271, in from_pretrained The tokenizer class you load from this checkpoint is not the same type as the class this function is called from. It may result in unexpected tokenization. The tokenizer class you load from this checkpoint is 'PreTrainedTokenizerFast'. The class this function is called from is 'LlamaTokenizer'. return cls._from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2505, in _from_pretrained tokenizer = cls(*init_inputs, **init_kwargs) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 171, in __init__ self.sp_model = self.get_spm_processor(kwargs.pop("from_slow", False)) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 198, in get_spm_processor tokenizer.Load(self.vocab_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/__init__.py", line 961, in Load return self.LoadFromFile(model_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/__init__.py", line 316, in LoadFromFile You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. This is expected, and simply means that the legacy (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set legacy=False. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg) TypeError: not a string Traceback (most recent call last): File "/home/main.py", line 395, in main() File "/home/main.py", line 239, in main tokenizer = load_hf_tokenizer(args.model_name_or_path, File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 104, in load_hf_tokenizer tokenizer = get_tokenizer(model_name, File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 78, in get_tokenizer tokenizer = LlamaTokenizer.from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2271, in from_pretrained return cls._from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2505, in _from_pretrained tokenizer = cls(*init_inputs, **init_kwargs) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 171, in __init__ self.sp_model = self.get_spm_processor(kwargs.pop("from_slow", False)) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 198, in get_spm_processor Traceback (most recent call last): File "/home/main.py", line 395, in tokenizer.Load(self.vocab_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/__init__.py", line 961, in Load return self.LoadFromFile(model_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/__init__.py", line 316, in LoadFromFile return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg) TypeError: not a string main() File "/home/main.py", line 239, in main tokenizer = load_hf_tokenizer(args.model_name_or_path, File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 104, in load_hf_tokenizer tokenizer = get_tokenizer(model_name, File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 78, in get_tokenizer tokenizer = LlamaTokenizer.from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2271, in from_pretrained return cls._from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2505, in _from_pretrained tokenizer = cls(*init_inputs, **init_kwargs) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 171, in __init__ self.sp_model = self.get_spm_processor(kwargs.pop("from_slow", False)) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 198, in get_spm_processor tokenizer.Load(self.vocab_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/__init__.py", line 961, in Load return self.LoadFromFile(model_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/__init__.py", line 316, in LoadFromFile The tokenizer class you load from this checkpoint is not the same type as the class this function is called from. It may result in unexpected tokenization. The tokenizer class you load from this checkpoint is 'PreTrainedTokenizerFast'. The class this function is called from is 'LlamaTokenizer'. return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg) TypeError: not a string Traceback (most recent call last): File "/home/main.py", line 395, in You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. This is expected, and simply means that the legacy (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set legacy=False. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message main() File "/home/main.py", line 239, in main tokenizer = load_hf_tokenizer(args.model_name_or_path, File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 104, in load_hf_tokenizer tokenizer = get_tokenizer(model_name, File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 78, in get_tokenizer tokenizer = LlamaTokenizer.from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2271, in from_pretrained return cls._from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2505, in _from_pretrained Traceback (most recent call last): File "/home/main.py", line 395, in tokenizer = cls(*init_inputs, **init_kwargs) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 171, in init self.sp_model = self.get_spm_processor(kwargs.pop("from_slow", False))
    main() File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 198, in get_spm_processor

    File "/home/main.py", line 239, in main tokenizer = load_hf_tokenizer(args.model_name_or_path, File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 104, in load_hf_tokenizer tokenizer.Load(self.vocab_file)tokenizer = get_tokenizer(model_name, File "/usr/local/lib/python3.10/site-packages/sentencepiece/init.py", line 961, in Load File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 78, in get_tokenizer tokenizer = LlamaTokenizer.from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2271, in from_pretrained return self.LoadFromFile(model_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/init.py", line 316, in LoadFromFile return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg)

TypeError: not a string return cls._from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2505, in _from_pretrained tokenizer = cls(*init_inputs, **init_kwargs) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 171, in init self.sp_model = self.get_spm_processor(kwargs.pop("from_slow", False)) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 198, in get_spm_processor tokenizer.Load(self.vocab_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/init.py", line 961, in Load return self.LoadFromFile(model_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/init.py", line 316, in LoadFromFile return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg) TypeError: not a string The tokenizer class you load from this checkpoint is not the same type as the class this function is called from. It may result in unexpected tokenization. The tokenizer class you load from this checkpoint is 'PreTrainedTokenizerFast'. The class this function is called from is 'LlamaTokenizer'. You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. This is expected, and simply means that the legacy (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set legacy=False. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message Traceback (most recent call last): File "/home/main.py", line 395, in main() File "/home/main.py", line 239, in main tokenizer = load_hf_tokenizer(args.model_name_or_path, File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 104, in load_hf_tokenizer tokenizer = get_tokenizer(model_name, File "/home/DeepSpeedExamples-master/applications/DeepSpeed-Chat/dschat/utils/utils.py", line 78, in get_tokenizer tokenizer = LlamaTokenizer.from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2271, in from_pretrained return cls._from_pretrained( File "/usr/local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2505, in _from_pretrained tokenizer = cls(*init_inputs, **init_kwargs) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 171, in init self.sp_model = self.get_spm_processor(kwargs.pop("from_slow", False)) File "/usr/local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 198, in get_spm_processor tokenizer.Load(self.vocab_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/init.py", line 961, in Load return self.LoadFromFile(model_file) File "/usr/local/lib/python3.10/site-packages/sentencepiece/init.py", line 316, in LoadFromFile return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg) TypeError: not a string [ERROR] 2024-09-13-08:53:32 (PID:453429, Device:5, RankID:5) ERR99999 UNKNOWN application exception [ERROR] 2024-09-13-08:53:32 (PID:453428, Device:4, RankID:4) ERR99999 UNKNOWN application exception [ERROR] 2024-09-13-08:53:32 (PID:453427, Device:3, RankID:3) ERR99999 UNKNOWN application exception [ERROR] 2024-09-13-08:53:32 (PID:453426, Device:2, RankID:2) ERR99999 UNKNOWN application exception [ERROR] 2024-09-13-08:53:32 (PID:453430, Device:6, RankID:6) ERR99999 UNKNOWN application exception [ERROR] 2024-09-13-08:53:32 (PID:453424, Device:0, RankID:0) ERR99999 UNKNOWN application exception [ERROR] 2024-09-13-08:53:32 (PID:453431, Device:7, RankID:7) ERR99999 UNKNOWN application exception [ERROR] 2024-09-13-08:53:33 (PID:453425, Device:1, RankID:1) ERR99999 UNKNOWN application exception [2024-09-13 08:53:36,284] [INFO] [launch.py:319:sigkill_handler] Killing subprocess 453424 [2024-09-13 08:53:37,366] [INFO] [launch.py:319:sigkill_handler] Killing subprocess 453425 [2024-09-13 08:53:37,367] [INFO] [launch.py:319:sigkill_handler] Killing subprocess 453426 [2024-09-13 08:53:37,395] [INFO] [launch.py:319:sigkill_handler] Killing subprocess 453427 [2024-09-13 08:53:37,416] [INFO] [launch.py:319:sigkill_handler] Killing subprocess 453428 [2024-09-13 08:53:37,417] [INFO] [launch.py:319:sigkill_handler] Killing subprocess 453429 [2024-09-13 08:53:37,418] [INFO] [launch.py:319:sigkill_handler] Killing subprocess 453430 [2024-09-13 08:53:37,419] [INFO] [launch.py:319:sigkill_handler] Killing subprocess 453431 [2024-09-13 08:53:37,419] [ERROR] [launch.py:325:sigkill_handler] ['/usr/local/bin/python3.10', '-u', 'main.py', '--local_rank=7', '--data_path', 'Dahoas/rm-static', 'Dahoas/full-hh-rlhf', 'Dahoas/synthetic-instruct-gptj-pairwise', 'yitingxie/rlhf-reward-datasets', '--data_split', '2,4,4', '--model_name_or_path', '/home/llama2', '--per_device_train_batch_size', '4', '--per_device_eval_batch_size', '4', '--max_seq_len', '512', '--learning_rate', '9.65e-6', '--weight_decay', '0.', '--num_train_epochs', '4', '--gradient_accumulation_steps', '1', '--lr_scheduler_type', 'cosine', '--num_warmup_steps', '0', '--seed', '1234', '--gradient_checkpointing', '--zero_stage', '3', '--deepspeed', '--lora_dim', '128', '--lora_module_name', 'layers.', '--output_dir', './output'] exits with return code = 1

```

我要发帖子