TruncationStrategy问题
作者您好,
torchrun --nproc_per_node 4
-m FlagEmbedding.finetune.reranker.encoder_only.base
--model_name_or_path /home/gpu1/SAIT_HQ_XIAN/share/SOLVE/CodeLLM/bge-reranker-large
--cache_dir $base_path/$version/cache/model
--train_data /home/gpu1/SAIT_HQ_XIAN/share/SOLVE/yupeng_RAG/SCODE-R/BGE_M3/datas/mined_Neg_20_200.jsonl
--cache_path $base_path/$version/cache/data
--train_group_size 8
--query_max_len 512
--passage_max_len 512
--pad_to_multiple_of 8
--knowledge_distillation False
--output_dir $base_path/$version/mined_Neg_finetune
--overwrite_output_dir
--learning_rate 6e-5
--fp16
--num_train_epochs 2
--per_device_train_batch_size 8
--gradient_accumulation_steps 1
--dataloader_drop_last True
--warmup_ratio 0.1
--gradient_checkpointing
--weight_decay 0.01
--deepspeed ./ds_config.json
--logging_steps 1
--save_steps 1000
我使用上述脚本(来自https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune/reranker#1-standard-model )的时候,报出以下错误: ... [rank0]: buffered_token_type_ids_expanded = buffered_token_type_ids.expand(batch_size, seq_length) [rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [rank0]: RuntimeError: The expanded size of the tensor (1024) must match the existing size (514) at non-singleton dimension 1. Target sizes: [64, 1024]. Tensor sizes: [1, 514]
看了其他问题的解答之后,说是修改truncation=True。 但是在这个问题中,据说已经修复:https://github.com/FlagOpen/FlagEmbedding/issues/202 。 是否在最新版本没有修复这个问题?(我下载的1.3.4最新版本的FlagEmbedding)
请问我应该在哪里修改truncation=True?