File "~/ceval/code/evaluator_series/evaluators/llama.py", line 109, in generate
tokens[0, : prompt_size] = torch.tensor(prompt_tokens).long()
RuntimeError: The expanded size of the tensor (2048) must match the existing size (2318) at non-singleton dimension 0. Target sizes: [2048]. Tensor sizes: [2318]
在验证llama效果 请教一下5-shot情况下,部分subject的prompt的token数大于2048的情况下,是怎么处理的呢?看llama.py的代码里貌似没有相关的逻辑且会报错
复现: torchrun --nproc_per_node 1 code/evaluator_series/eval_llama.py --ckpt_dir [ckpd dir] --param_size 7 --few_shot --ntrain 5 --subject logic
File "~/ceval/code/evaluator_series/evaluators/llama.py", line 109, in generate tokens[0, : prompt_size] = torch.tensor(prompt_tokens).long() RuntimeError: The expanded size of the tensor (2048) must match the existing size (2318) at non-singleton dimension 0. Target sizes: [2048]. Tensor sizes: [2318]