Loading checkpoint shards: 100%|██████████| 7/7 [00:16<00:00, 2.42s/it]
[INFO|modeling_utils.py:3185] 2023-08-16 16:30:08,574 >> All model checkpoint weights were used when initializing ChatGLMForConditionalGeneration.
[WARNING
modeling_utils.py:3187] 2023-08-16 16:30:08,574 >> Some weights of ChatGLMForConditionalGeneration were not initialized from the model checkpoint at chatglm2-6b and are newly initialized: ['transformer.prefix_encoder.embedding.weight']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
[INFO
modeling_utils.py:2821] 2023-08-16 16:30:08,579 >> Generation config file not found, using a generation config created from the model config.
Running tokenizer on train dataset: 0%
Loading checkpoint shards: 100%|██████████| 7/7 [00:16<00:00, 2.42s/it]
[INFO|modeling_utils.py:3185] 2023-08-16 16:30:08,574 >> All model checkpoint weights were used when initializing ChatGLMForConditionalGeneration.
[WARNING
modeling_utils.py:3187] 2023-08-16 16:30:08,574 >> Some weights of ChatGLMForConditionalGeneration were not initialized from the model checkpoint at chatglm2-6b and are newly initialized: ['transformer.prefix_encoder.embedding.weight']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
[INFO
modeling_utils.py:2821] 2023-08-16 16:30:08,579 >> Generation config file not found, using a generation config created from the model config.
Running tokenizer on train dataset: 0%
Is there an existing issue for this?
Current Behavior
微调报错 ValueError: None is not in list $ sh train.sh 08/16/2023 16:29:49 - WARNING - main - Process rank: 0, device: cuda:0, n_gpu: 1distributed training: True, 16-bits training: False 08/16/2023 16:29:49 - INFO - main - Training/evaluation parameters Seq2SeqTrainingArguments( _n_gpu=1, adafactor=False, adam_beta1=0.9, adam_beta2=0.999, adam_epsilon=1e-08, auto_find_batch_size=False, bf16=False, bf16_full_eval=False, data_seed=None, dataloader_drop_last=False, dataloader_num_workers=0, dataloader_pin_memory=True, ddp_backend=None, ddp_bucket_cap_mb=None, ddp_find_unused_parameters=None, ddp_timeout=1800, debug=[], deepspeed=None, disable_tqdm=False, do_eval=False, do_predict=False, do_train=True, eval_accumulation_steps=None, eval_delay=0, eval_steps=None, evaluation_strategy=no, fp16=False, fp16_backend=auto, fp16_full_eval=False, fp16_opt_level=O1, fsdp=[], fsdp_config={'fsdp_min_num_params': 0, 'xla': False, 'xla_fsdp_grad_ckpt': False}, fsdp_min_num_params=0, fsdp_transformer_layer_cls_to_wrap=None, full_determinism=False, generation_config=None, generation_max_length=None, generation_num_beams=None, gradient_accumulation_steps=16, gradient_checkpointing=False, greater_is_better=None, group_by_length=False, half_precision_backend=auto, hub_model_id=None, hub_private_repo=False, hub_strategy=every_save, hub_token=,
ignore_data_skip=False,
include_inputs_for_metrics=False,
jit_mode_eval=False,
label_names=None,
label_smoothing_factor=0.0,
learning_rate=0.02,
length_column_name=length,
load_best_model_at_end=False,
local_rank=0,
log_level=passive,
log_level_replica=warning,
log_on_each_node=True,
logging_dir=output/adgen-chatglm2-6b-pt-128-2e-2\runs\Aug16_16-29-49_DESKTOP-JQ9P2MC,
logging_first_step=False,
logging_nan_inf_filter=True,
logging_steps=10,
logging_strategy=steps,
lr_scheduler_type=linear,
max_grad_norm=1.0,
max_steps=3000,
metric_for_best_model=None,
mp_parameters=,
no_cuda=False,
num_train_epochs=3.0,
optim=adamw_hf,
optim_args=None,
output_dir=output/adgen-chatglm2-6b-pt-128-2e-2,
overwrite_output_dir=True,
past_index=-1,
per_device_eval_batch_size=1,
per_device_train_batch_size=1,
predict_with_generate=True,
prediction_loss_only=False,
push_to_hub=False,
push_to_hub_model_id=None,
push_to_hub_organization=None,
push_to_hub_token=,
ray_scope=last,
remove_unused_columns=True,
report_to=[],
resume_from_checkpoint=None,
run_name=output/adgen-chatglm2-6b-pt-128-2e-2,
save_on_each_node=False,
save_safetensors=False,
save_steps=1000,
save_strategy=steps,
save_total_limit=None,
seed=42,
sharded_ddp=[],
skip_memory_metrics=True,
sortish_sampler=False,
tf32=None,
torch_compile=False,
torch_compile_backend=None,
torch_compile_mode=None,
torchdynamo=None,
tpu_metrics_debug=False,
tpu_num_cores=None,
use_ipex=False,
use_legacy_prediction_loop=False,
use_mps_device=False,
warmup_ratio=0.0,
warmup_steps=0,
weight_decay=0.0,
xpu_backend=None,
)
C:\ProgramData\anaconda3\envs\ChatGLM\lib\site-packages\datasets\load.py:2072: FutureWarning: 'use_auth_token' was deprecated in favor of 'token' in version 2.14.0 and will be removed in 3.0.0.
You can remove this warning by passing 'token=None' instead.
warnings.warn(
[INFO|configuration_utils.py:667] 2023-08-16 16:29:50,852 >> loading configuration file chatglm2-6b\config.json
[INFO|configuration_utils.py:667] 2023-08-16 16:29:50,868 >> loading configuration file chatglm2-6b\config.json
[INFO|configuration_utils.py:725] 2023-08-16 16:29:50,871 >> Model config ChatGLMConfig {
"_name_or_path": "chatglm2-6b",
"add_bias_linear": false,
"add_qkv_bias": true,
"apply_query_key_layer_scaling": true,
"apply_residual_connection_post_layernorm": false,
"architectures": [
"ChatGLMModel"
],
"attention_dropout": 0.0,
"attention_softmax_in_fp32": true,
"auto_map": {
"AutoConfig": "configuration_chatglm.ChatGLMConfig",
"AutoModel": "modeling_chatglm.ChatGLMForConditionalGeneration",
"AutoModelForCausalLM": "modeling_chatglm.ChatGLMForConditionalGeneration",
"AutoModelForSeq2SeqLM": "modeling_chatglm.ChatGLMForConditionalGeneration"
},
"bias_dropout_fusion": true,
"eos_token_id": 2,
"ffn_hidden_size": 13696,
"fp32_residual_connection": false,
"hidden_dropout": 0.0,
"hidden_size": 4096,
"kv_channels": 128,
"layernorm_epsilon": 1e-05,
"model_type": "chatglm",
"multi_query_attention": true,
"multi_query_group_num": 2,
"num_attention_heads": 32,
"num_layers": 28,
"original_rope": true,
"pad_token_id": 0,
"padded_vocab_size": 65024,
"post_layer_norm": true,
"pre_seq_len": null,
"prefix_projection": false,
"quantization_bit": 0,
"rmsnorm": true,
"seq_length": 32768,
"tie_word_embeddings": false,
"torch_dtype": "float16",
"transformers_version": "4.29.1",
"use_cache": true,
"vocab_size": 65024
}
[INFO|tokenization_utils_base.py:1808] 2023-08-16 16:29:50,881 >> loading file tokenizer.model [INFO|tokenization_utils_base.py:1808] 2023-08-16 16:29:50,882 >> loading file added_tokens.json [INFO|tokenization_utils_base.py:1808] 2023-08-16 16:29:50,882 >> loading file special_tokens_map.json [INFO|tokenization_utils_base.py:1808] 2023-08-16 16:29:50,882 >> loading file tokenizer_config.json [INFO|modeling_utils.py:2513] 2023-08-16 16:29:51,038 >> loading weights file chatglm2-6b\pytorch_model.bin.index.json [INFO|configuration_utils.py:577] 2023-08-16 16:29:51,041 >> Generate config GenerationConfig { "_from_model_config": true, "eos_token_id": 2, "pad_token_id": 0, "transformers_version": "4.29.1" }
Loading checkpoint shards: 100%|██████████| 7/7 [00:16<00:00, 2.42s/it] [INFO|modeling_utils.py:3185] 2023-08-16 16:30:08,574 >> All model checkpoint weights were used when initializing ChatGLMForConditionalGeneration.
+-----------------------------------------------------------------------------+ ValueError: None is not in list
Expected Behavior
无
Steps To Reproduce
$ sh train.sh 08/16/2023 16:29:49 - WARNING - main - Process rank: 0, device: cuda:0, n_gpu: 1distributed training: True, 16-bits training: False 08/16/2023 16:29:49 - INFO - main - Training/evaluation parameters Seq2SeqTrainingArguments( _n_gpu=1, adafactor=False, adam_beta1=0.9, adam_beta2=0.999, adam_epsilon=1e-08, auto_find_batch_size=False, bf16=False, bf16_full_eval=False, data_seed=None, dataloader_drop_last=False, dataloader_num_workers=0, dataloader_pin_memory=True, ddp_backend=None, ddp_bucket_cap_mb=None, ddp_find_unused_parameters=None, ddp_timeout=1800, debug=[], deepspeed=None, disable_tqdm=False, do_eval=False, do_predict=False, do_train=True, eval_accumulation_steps=None, eval_delay=0, eval_steps=None, evaluation_strategy=no, fp16=False, fp16_backend=auto, fp16_full_eval=False, fp16_opt_level=O1, fsdp=[], fsdp_config={'fsdp_min_num_params': 0, 'xla': False, 'xla_fsdp_grad_ckpt': False}, fsdp_min_num_params=0, fsdp_transformer_layer_cls_to_wrap=None, full_determinism=False, generation_config=None, generation_max_length=None, generation_num_beams=None, gradient_accumulation_steps=16, gradient_checkpointing=False, greater_is_better=None, group_by_length=False, half_precision_backend=auto, hub_model_id=None, hub_private_repo=False, hub_strategy=every_save, hub_token=,
ignore_data_skip=False,
include_inputs_for_metrics=False,
jit_mode_eval=False,
label_names=None,
label_smoothing_factor=0.0,
learning_rate=0.02,
length_column_name=length,
load_best_model_at_end=False,
local_rank=0,
log_level=passive,
log_level_replica=warning,
log_on_each_node=True,
logging_dir=output/adgen-chatglm2-6b-pt-128-2e-2\runs\Aug16_16-29-49_DESKTOP-JQ9P2MC,
logging_first_step=False,
logging_nan_inf_filter=True,
logging_steps=10,
logging_strategy=steps,
lr_scheduler_type=linear,
max_grad_norm=1.0,
max_steps=3000,
metric_for_best_model=None,
mp_parameters=,
no_cuda=False,
num_train_epochs=3.0,
optim=adamw_hf,
optim_args=None,
output_dir=output/adgen-chatglm2-6b-pt-128-2e-2,
overwrite_output_dir=True,
past_index=-1,
per_device_eval_batch_size=1,
per_device_train_batch_size=1,
predict_with_generate=True,
prediction_loss_only=False,
push_to_hub=False,
push_to_hub_model_id=None,
push_to_hub_organization=None,
push_to_hub_token=,
ray_scope=last,
remove_unused_columns=True,
report_to=[],
resume_from_checkpoint=None,
run_name=output/adgen-chatglm2-6b-pt-128-2e-2,
save_on_each_node=False,
save_safetensors=False,
save_steps=1000,
save_strategy=steps,
save_total_limit=None,
seed=42,
sharded_ddp=[],
skip_memory_metrics=True,
sortish_sampler=False,
tf32=None,
torch_compile=False,
torch_compile_backend=None,
torch_compile_mode=None,
torchdynamo=None,
tpu_metrics_debug=False,
tpu_num_cores=None,
use_ipex=False,
use_legacy_prediction_loop=False,
use_mps_device=False,
warmup_ratio=0.0,
warmup_steps=0,
weight_decay=0.0,
xpu_backend=None,
)
C:\ProgramData\anaconda3\envs\ChatGLM\lib\site-packages\datasets\load.py:2072: FutureWarning: 'use_auth_token' was deprecated in favor of 'token' in version 2.14.0 and will be removed in 3.0.0.
You can remove this warning by passing 'token=None' instead.
warnings.warn(
[INFO|configuration_utils.py:667] 2023-08-16 16:29:50,852 >> loading configuration file chatglm2-6b\config.json
[INFO|configuration_utils.py:667] 2023-08-16 16:29:50,868 >> loading configuration file chatglm2-6b\config.json
[INFO|configuration_utils.py:725] 2023-08-16 16:29:50,871 >> Model config ChatGLMConfig {
"_name_or_path": "chatglm2-6b",
"add_bias_linear": false,
"add_qkv_bias": true,
"apply_query_key_layer_scaling": true,
"apply_residual_connection_post_layernorm": false,
"architectures": [
"ChatGLMModel"
],
"attention_dropout": 0.0,
"attention_softmax_in_fp32": true,
"auto_map": {
"AutoConfig": "configuration_chatglm.ChatGLMConfig",
"AutoModel": "modeling_chatglm.ChatGLMForConditionalGeneration",
"AutoModelForCausalLM": "modeling_chatglm.ChatGLMForConditionalGeneration",
"AutoModelForSeq2SeqLM": "modeling_chatglm.ChatGLMForConditionalGeneration"
},
"bias_dropout_fusion": true,
"eos_token_id": 2,
"ffn_hidden_size": 13696,
"fp32_residual_connection": false,
"hidden_dropout": 0.0,
"hidden_size": 4096,
"kv_channels": 128,
"layernorm_epsilon": 1e-05,
"model_type": "chatglm",
"multi_query_attention": true,
"multi_query_group_num": 2,
"num_attention_heads": 32,
"num_layers": 28,
"original_rope": true,
"pad_token_id": 0,
"padded_vocab_size": 65024,
"post_layer_norm": true,
"pre_seq_len": null,
"prefix_projection": false,
"quantization_bit": 0,
"rmsnorm": true,
"seq_length": 32768,
"tie_word_embeddings": false,
"torch_dtype": "float16",
"transformers_version": "4.29.1",
"use_cache": true,
"vocab_size": 65024
}
[INFO|tokenization_utils_base.py:1808] 2023-08-16 16:29:50,881 >> loading file tokenizer.model [INFO|tokenization_utils_base.py:1808] 2023-08-16 16:29:50,882 >> loading file added_tokens.json [INFO|tokenization_utils_base.py:1808] 2023-08-16 16:29:50,882 >> loading file special_tokens_map.json [INFO|tokenization_utils_base.py:1808] 2023-08-16 16:29:50,882 >> loading file tokenizer_config.json [INFO|modeling_utils.py:2513] 2023-08-16 16:29:51,038 >> loading weights file chatglm2-6b\pytorch_model.bin.index.json [INFO|configuration_utils.py:577] 2023-08-16 16:29:51,041 >> Generate config GenerationConfig { "_from_model_config": true, "eos_token_id": 2, "pad_token_id": 0, "transformers_version": "4.29.1" }
Loading checkpoint shards: 100%|██████████| 7/7 [00:16<00:00, 2.42s/it] [INFO|modeling_utils.py:3185] 2023-08-16 16:30:08,574 >> All model checkpoint weights were used when initializing ChatGLMForConditionalGeneration.
+-----------------------------------------------------------------------------+ ValueError: None is not in list
Environment
Anything else?
。