zhiminy/EvalEng huggingface dataset:
Repository: open-compass/opencompass
Issue: I use mmlu dataset to evaluate qwen-14b-base model,I get the long answer which includes the A/B/C/D while I just want A/B/C/D 
Root cause: Configuration Error

### Prerequisite

- [X] I have searched [Issues](https://github.com/open-compass/opencompass/issues/) and [Discussions](https://github.com/open-compass/opencompass/discussions) but cannot get the expected help.
- [X] The bug has not been fixed in the [latest version](https://github.com/open-compass/opencompass).

### Type

I'm evaluating with the officially supported tasks/models/datasets.

### Environment

i use the requirements.txt file 

### Reproduces the problem - code/configuration sample

I just rejust the hf_qwen_14b.py scripts, and you will see below.

### Reproduces the problem - command or script

from opencompass.models import HuggingFaceBaseModel,HuggingFaceCausalLM

models = [
    dict(
        type=HuggingFaceCausalLM,
        abbr='qwen-14b-hf',
        path='./qwen14bbase_from_hf',
        tokenizer_kwargs=dict(trust_remote_code=True,),
        max_out_len=1024,
        batch_size=4,
        model_kwargs=dict(device_map='auto', trust_remote_code=True),
        run_cfg=dict(num_gpus=2),
    )
]
 here is my models setting.
 
 

### Reproduces the problem - error message

![image](https://github.com/user-attachments/assets/52ee9ab5-a7d8-43e8-ba46-17d07b092914)


### Other information

_No response_

The base model is designed to execute completion tasks and does not handle instructions beyond this scope; this behavior is intentional and not indicative of an error.

but i see the qwen2 use mmlu to evaluate base model and instruct model,so I think mmlu can used to evaluate base model,maybe I can adjust the max_new_tokens parameter?

Yes, you can adjust max_new_tokens or use ppl mode.
Repository: open-compass/opencompass
Issue: 您好，请教一个问题，请问OpenCompass官网公开学术榜单中，测试的Qwen2模型中temperature、repetition_penalty、、top_p这些参数是设置多少的？模型部署的方式是采用什么方式部署的？
Root cause: Documentation Deficiency

### Prerequisite

- [X] I have searched [Issues](https://github.com/open-compass/opencompass/issues/) and [Discussions](https://github.com/open-compass/opencompass/discussions) but cannot get the expected help.
- [X] The bug has not been fixed in the [latest version](https://github.com/open-compass/opencompass).

### Type

I'm evaluating with the officially supported tasks/models/datasets.

### Environment

1

### Reproduces the problem - code/configuration sample

1

### Reproduces the problem - command or script

1

### Reproduces the problem - error message

1

### Other information

您好，请教一个问题，请问OpenCompass官网公开学术榜单中，测试的Qwen2模型中temperature、repetition_penalty、top_p这些参数是设置多少的？模型部署的方式是采用什么方式部署的？
![image](https://github.com/user-attachments/assets/110b93e0-3b4b-4cec-aeae-5084ec8d05fe)


We use greedy-decoding, use LMDeploy as inference backend

> We use greedy-decoding, use LMDeploy as inference backend

Thanks your answer, and then how to set temperature、repetition_penalty、top_p and so on ?

For greedy decoding, no need for these parameters



> For greedy decoding, no need for these parameters
我通过调用api服务测试，发现每次测试的结果分数都不一样，本地模型路径的方式加载测试是一样的，调用api测试是哪里设置不对吗，temperature=0，top_k=-1,top_p=1,可以查看下面issue，谢谢大佬:
https://github.com/open-compass/opencompass/issues/1634
Repository: open-compass/opencompass
Issue: use gsm8k dataset to evaluate qwen-14b-chat model,only get predictions file,not get results and summary file
Root cause: Documentation Deficiency

### Prerequisite

- [X] I have searched [Issues](https://github.com/open-compass/opencompass/issues/) and [Discussions](https://github.com/open-compass/opencompass/discussions) but cannot get the expected help.
- [X] The bug has not been fixed in the [latest version](https://github.com/open-compass/opencompass).

### Type

I'm evaluating with the officially supported tasks/models/datasets.

### Environment

another question, for gsm8k, this task is not MCQ. gold is long, and prediction is long too. how to calculate the acc?

### Reproduces the problem - code/configuration sample

from opencompass.models import HuggingFacewithChatTemplate, HuggingFaceCausalLM

models = [
    dict(
        type=HuggingFaceCausalLM,
        abbr='qwen-14b-chat-hf',
        path='/nas2/libianbian/pretrained_models/qwen14bchat_from_hf',
        tokenizer_kwargs=dict(trust_remote_code=True, padding_side='left',truncation_side='left',),
        max_seq_len=1024,
        max_out_len=1,
        batch_size=64,
        generation_kwargs=dict(do_sample=True,),
        model_kwargs=dict(device_map='auto', trust_remote_code=True),
        run_cfg=dict(num_gpus=2),
    )
]


### Reproduces the problem - command or script

nohup bash -c 'CUDA_VISIBLE_DEVICES=4,5 opencompass ./configs/eval_qwen_14b_chat.py --max-workers-per-gpu 1' > output_chat.log 2>&1 &



### Reproduces the problem - error message

![image](https://github.com/user-attachments/assets/286ad6e5-9924-4946-a9e0-973b6277931d)


### Other information

_No response_

Please check the eval logs  in `logs` folder

![image](https://github.com/user-attachments/assets/f16578ab-dbdd-4ba9-bf7c-c31c43592f4a)
the logs dir is as this,no error.

Please try `opencompass ./configs/eval_qwen_14b_chat.py -m eval --debug -r latest` for calculate the metric

yes,I get the final result,thanks a lot.
Repository: open-compass/opencompass
Issue: [Feature]  Speedup for opencompass\icl_retriever\icl_mdl_retriever\MDLRetriever
Root cause: Unimplemented Feature Gap

### 描述该功能

MDLRetriever uses the gpt2-xl model to process the commonsenseqa dataset.
In `def topk_search(self):` ,it took me nearly 2 hours to process to get `rtr_idx_list` on V100. If I don't care about the `random seed`, can I pickle the result of the first processing into a binary file, which is convenient for testing and calling quickly later?

### 是否希望自己实现该功能？

- [ ] 我希望自己来实现这一功能，并向 OpenCompass 贡献代码！

The same situation exists in opencompass\icl_retriever\icl_topk_retriever\ `TopkRetriever`

Yes, you can modify [TopkRetriever.create_index](https://github.com/InternLM/opencompass/blob/191a3f6f9d5fe4f0e4b96e3a6be95d50a14efd63/opencompass/openicl/icl_retriever/icl_topk_retriever.py#L86)

```
    def create_index(self):
        self.select_datalist = self.dataset_reader.generate_input_field_corpus(
            self.index_ds)
        encode_datalist = DatasetEncoder(self.select_datalist,
                                         tokenizer=self.tokenizer)
        co = DataCollatorWithPaddingAndCuda(tokenizer=self.tokenizer,
                                            device=self.device)
        dataloader = DataLoader(encode_datalist,
                                batch_size=self.batch_size,
                                collate_fn=co)
        index = faiss.IndexIDMap(
            faiss.IndexFlatIP(self.model.get_sentence_embedding_dimension()))
        res_list = self.forward(dataloader,
                                process_bar=True,
                                information='Creating index for index set...')
        id_list = np.array([res['metadata']['id'] for res in res_list])
        self.embed_list = np.stack([res['embed'] for res in res_list])
        index.add_with_ids(self.embed_list, id_list)
        return index
```

To:

1. calculate as hash code of all the data list and model_info.
2. check a path such as `~/.cache/opencompass/dataset_embeds/{dataset_name}_{model_name}_{hashcode}.pkl `
3. if exist: load the .pkl file, else do the origin logit code and save to data to a path such as `~/.cache/opencompass/dataset_embeds/{dataset_name}{model_name}{hashcode}.pkl
`
4. maybe you can set a `cache_embed` parameter to control that


I understand that I just need to save the `index.add_with_ids(self.embed_list, id_list)` index file to `.pkl`.

Yes, welcome your PR to implement this feature.
Repository: open-compass/opencompass
Issue: [Bug] MTBench评测model confg中设置batch size无效
Root cause: Architectural Constraint

### 先决条件

- [X] 我已经搜索过 [问题](https://github.com/open-compass/opencompass/issues/) 和 [讨论](https://github.com/open-compass/opencompass/discussions) 但未得到预期的帮助。
- [X] 错误在 [最新版本](https://github.com/open-compass/opencompass) 中尚未被修复。

### 问题类型

我正在使用官方支持的任务/模型/数据集进行评估。

### 环境

rt

### 重现问题 - 代码/配置示例

rt

### 重现问题 - 命令或脚本

rt

### 重现问题 - 错误信息

log显示一直是一条的跑

### 其他信息

_No response_

mtbench题目数量不多，多轮对话的暂时实现上是只能bs=1的
Repository: open-compass/opencompass
Issue: [Bug] PreTrainedTokenizerFast inference with unexpected parameter token_type_ids
Root cause: Validation Gap

### Prerequisite

- [X] I have searched [Issues](https://github.com/open-compass/opencompass/issues/) and [Discussions](https://github.com/open-compass/opencompass/discussions) but cannot get the expected help.
- [X] The bug has not been fixed in the [latest version](https://github.com/open-compass/opencompass).

### Type

I'm evaluating with the officially supported tasks/models/datasets.

### Environment

offcial install

### Reproduces the problem - code/configuration sample

any models with PreTrainedTokenizerFast

### Reproduces the problem - command or script

any models with PreTrainedTokenizerFast

### Reproduces the problem - error message

Traceback (most recent call last):
  File "/mnt/algorithm/user_dir/zhoudong/workspace/tmp/opencompass/opencompass/tasks/openicl_infer.py", line 161, in <module>
    inferencer.run()
  File "/mnt/algorithm/user_dir/zhoudong/workspace/tmp/opencompass/opencompass/tasks/openicl_infer.py", line 89, in run
    self._inference()
  File "/mnt/algorithm/user_dir/zhoudong/workspace/tmp/opencompass/opencompass/tasks/openicl_infer.py", line 134, in _inference
    inferencer.inference(retriever,
  File "/mnt/algorithm/user_dir/zhoudong/workspace/tmp/opencompass/opencompass/openicl/icl_inferencer/icl_gen_inferencer.py", line 152, in inference
    results = self.model.generate_from_template(
  File "/mnt/algorithm/user_dir/zhoudong/workspace/tmp/opencompass/opencompass/models/base.py", line 201, in generate_from_template
    return self.generate(inputs, max_out_len=max_out_len, **kwargs)
  File "/mnt/algorithm/user_dir/zhoudong/workspace/tmp/opencompass/opencompass/models/huggingface_above_v4_33.py", line 476, in generate
    outputs = self.model.generate(**tokens, **generation_kwargs)
  File "/home/zhoudong/miniconda3/envs/ops/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/home/zhoudong/miniconda3/envs/ops/lib/python3.10/site-packages/transformers/generation/utils.py", line 1689, in generate
    self._validate_model_kwargs(model_kwargs.copy())
  File "/home/zhoudong/miniconda3/envs/ops/lib/python3.10/site-packages/transformers/generation/utils.py", line 1243, in _validate_model_kwargs
    raise ValueError(
ValueError: The following `model_kwargs` are not used by the model: ['token_type_ids'] (note: typos in the generate arguments will also show up in this list)

### Other information

you should modify the file /opencompass/models/huggingface_above_v4_33.py#L435
![image](https://github.com/user-attachments/assets/3dfc8e1e-a449-48f2-b73d-4f5b8aae91b1)
By add this param , you can avoid the error !

Thanks for the report, would you like to create a Pull Request?

> Thanks for the report, would you like to create a Pull Request?

No need, you can directly commit

@MaiziXiao  Please check this issue.
Repository: open-compass/opencompass
Issue: [Bug] mbpp_plus.jsonl 在哪里，下载的zip中没有这个东西
Root cause: Documentation Deficiency

### 先决条件

- [X] 我已经搜索过 [问题](https://github.com/open-compass/opencompass/issues/) 和 [讨论](https://github.com/open-compass/opencompass/discussions) 但未得到预期的帮助。
- [X] 错误在 [最新版本](https://github.com/open-compass/opencompass) 中尚未被修复。

### 问题类型

我正在使用官方支持的任务/模型/数据集进行评估。

### 环境

1

### 重现问题 - 代码/配置示例

1

### 重现问题 - 命令或脚本

1

### 重现问题 - 错误信息

1

### 其他信息

![image](https://github.com/user-attachments/assets/974f79a7-9c2b-4425-bdff-d86897b289e4)


在这个包里，https://github.com/open-compass/opencompass/releases/download/0.2.2.rc1/OpenCompassData-complete-20240207.zip
Repository: open-compass/opencompass
Issue: [Bug] SciCode miss with_background
Root cause: Configuration Error

### Prerequisite

- [X] I have searched [Issues](https://github.com/open-compass/opencompass/issues/) and [Discussions](https://github.com/open-compass/opencompass/discussions) but cannot get the expected help.
- [X] The bug has not been fixed in the [latest version](https://github.com/open-compass/opencompass).

### Type

I'm evaluating with the officially supported tasks/models/datasets.

### Environment

The two json in dataset are same currently. The `with_background.json` needs update.

### Reproduces the problem - code/configuration sample

The two json in dataset are same currently. The `with_background.json` needs update.

### Reproduces the problem - command or script

The two json in dataset are same currently. The `with_background.json` needs update.

### Reproduces the problem - error message

The two json in dataset are same currently. The `with_background.json` needs update.

### Other information

_No response_
Repository: open-compass/opencompass
Issue: [Bug] mtbench101：batch_size设置
Root cause: Documentation Deficiency

### 先决条件

- [X] 我已经搜索过 [问题](https://github.com/open-compass/opencompass/issues/) 和 [讨论](https://github.com/open-compass/opencompass/discussions) 但未得到预期的帮助。
- [X] 错误在 [最新版本](https://github.com/open-compass/opencompass) 中尚未被修复。

### 问题类型

我正在使用官方支持的任务/模型/数据集进行评估。

### 环境

rt

### 重现问题 - 代码/配置示例

mtbench101目前只能一条一条跑，如何设置batchsize

### 重现问题 - 命令或脚本

rt

### 重现问题 - 错误信息

rt

### 其他信息

_No response_

Our model's generate API has supported generation with multi-threading. This implies that the batch size is set through the model's configuration.
Repository: open-compass/opencompass
Issue: [Bug] debug不显示日志
Root cause: Documentation Deficiency

### Prerequisite

- [X] I have searched [Issues](https://github.com/open-compass/opencompass/issues/) and [Discussions](https://github.com/open-compass/opencompass/discussions) but cannot get the expected help.
- [X] The bug has not been fixed in the [latest version](https://github.com/open-compass/opencompass).

### Type

I'm evaluating with the officially supported tasks/models/datasets.

### Environment


![2](https://github.com/user-attachments/assets/1bc76cf5-0913-42d9-857a-8e47f8a43216)
![1](https://github.com/user-attachments/assets/f6a9915f-3577-492c-a220-7aa25bce0821)



### Reproduces the problem - code/configuration sample

无

### Reproduces the problem - command or script

CUDA_VISIBLE_DEVICES=0,1 python run.py --models hf_qwen2_7b_instruct --datasets mmlu_gen cmmlu_gen ceval_gen ARC_c_gen -w outputs/qwen2_7b_instruct_self --debug -r

### Reproduces the problem - error message

![3](https://github.com/user-attachments/assets/de6d8836-d243-4498-98a0-de9decb751a1)


### Other information

_No response_

Please check the logs. In debug mode, the full log will be dumped into `f'tmp/{os.getpid()}_debug.log'`.
Repository: open-compass/opencompass
Issue: [Bug] pid_params.py dumps not successfully.
Root cause: Validation Gap

### Prerequisite

- [X] I have searched [Issues](https://github.com/open-compass/opencompass/issues/) and [Discussions](https://github.com/open-compass/opencompass/discussions) but cannot get the expected help.
- [X] The bug has not been fixed in the [latest version](https://github.com/open-compass/opencompass).

### Type

I'm evaluating with the officially supported tasks/models/datasets.

### Environment

packages/mmengine/config/config.py", line 1661, in _is_lazy_import
    with open(filename, encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/fs-computility/llm/xxxxx/tmp/65336_params.py'
[2024-09-29 05:20:50,168] torch.distributed.elastic.multiprocessing.api: [ERROR] failed (exitcode: 1) local_rank: 0 (pid: 591) of binary: /fs-computility/llm/shared/llmeval/share_envs/oc-v030-ld-v052/bin/python=

### Reproduces the problem - code/configuration sample

None

### Reproduces the problem - command or script

None

### Reproduces the problem - error message

None

### Other information

_No response_
Repository: open-compass/opencompass
Issue: [Bug] The leaderboard is not accessible....
Root cause: Environment Incompatibility

### Prerequisite

- [X] I have searched [Issues](https://github.com/open-compass/opencompass/issues/) and [Discussions](https://github.com/open-compass/opencompass/discussions) but cannot get the expected help.
- [X] The bug has not been fixed in the [latest version](https://github.com/open-compass/opencompass).

### Type

I'm evaluating with the officially supported tasks/models/datasets.

### Environment

No environment...

### Reproduces the problem - code/configuration sample

Paste the link `https://rank.opencompass.org.cn` into any web browser

### Reproduces the problem - command or script

No command

### Reproduces the problem - error message

Then the webpage would load forever whatever browser or network I am using:
<img width="1451" alt="image" src="https://github.com/user-attachments/assets/03abf77c-b331-44e1-841c-dbbe6cc36579">


### Other information

_No response_

It's working on my side, check your proxy maybe
<img width="1396" alt="image" src="https://github.com/user-attachments/assets/3277ad59-91c0-4aa1-a67d-75bd95d67029">
Repository: open-compass/opencompass
Issue: [Bug] hf推理与vllm推理评测结果不一致
Root cause: Interface Contract Mismatch

### Prerequisite

- [X] I have searched [Issues](https://github.com/open-compass/opencompass/issues/) and [Discussions](https://github.com/open-compass/opencompass/discussions) but cannot get the expected help.
- [X] The bug has not been fixed in the [latest version](https://github.com/open-compass/opencompass).

### Type

I'm evaluating with the officially supported tasks/models/datasets.

### Environment

# eval_hf_qwen2_5_0_5b_instruct.py文件内容如下
from mmengine.config import read_base
with read_base():
    from opencompass.configs.datasets.gsm8k.gsm8k_gen_3309bd import gsm8k_datasets
    from opencompass.configs.models.qwen2_5.hf_qwen2_5_0_5b_instruct import models
    from opencompass.configs.summarizers.example import summarizer

datasets = sum([v for k, v in locals().items() if k.endswith('_datasets') or k == 'datasets'], [])
work_dir = './outputs/hf_qwen2_5_0_5b_instruct/'

# eval_vllm_qwen2_5_0_5b_instruct.py文件内容如下
from mmengine.config import read_base
with read_base():
    from opencompass.configs.datasets.gsm8k.gsm8k_gen_3309bd import gsm8k_datasets
    from opencompass.configs.models.qwen2_5.vllm_qwen2_5_0_5b_instruct import models
    from opencompass.configs.summarizers.example import summarizer

datasets = sum([v for k, v in locals().items() if k.endswith('_datasets') or k == 'datasets'], [])
work_dir = './outputs/hf_qwen2_5_0_5b_instruct/'

# hf评测命令
CUDA_VISIBLE_DEVICES=6 python3 run.py configs/eval_hf_qwen2_5_0_5b_instruct.py --debug
# vllm 评测命令
CUDA_VISIBLE_DEVICES=6 python3 run.py configs/eval_vllm_qwen2_5_0_5b_instruct.py --debug

### Reproduces the problem - code/configuration sample

# hf评测命令
CUDA_VISIBLE_DEVICES=6 python3 run.py configs/eval_hf_qwen2_5_0_5b_instruct.py --debug
# vllm 评测命令
CUDA_VISIBLE_DEVICES=6 python3 run.py configs/eval_vllm_qwen2_5_0_5b_instruct.py --debug

### Reproduces the problem - command or script

# hf评测命令
CUDA_VISIBLE_DEVICES=6 python3 run.py configs/eval_hf_qwen2_5_0_5b_instruct.py --debug
# vllm 评测命令
CUDA_VISIBLE_DEVICES=6 python3 run.py configs/eval_vllm_qwen2_5_0_5b_instruct.py --debug

### Reproduces the problem - error message

# hf结果：
dataset,version,metric,mode,qwen2.5-0.5b-instruct-hf
gsm8k,3309bd,accuracy,gen,0.83

# vllm 结果：
dataset,version,metric,mode,qwen2.5-0.5b-instruct-vllm
gsm8k,3309bd,accuracy,gen,1.44

### Other information

_No response_

因为hf测试时，tokenizer会设置tokenize_kwargs['add_special_tokens'] = False，但是vllm不支持类似的功能，所以hf和vllm对不上


> 你的两个配置文件是一样的，不知道是你复制错了，还是测试的时候就是这两个呢？

里面两个models是不一样的，一个是hf_qwen2_5_0_5b_instruct一个是vllm_qwen2_5_0_5b_instruct。
Repository: open-compass/opencompass
Issue: [Feature] need a param to set dlc python path to execute. Currently, conda env python path is used which cannot be specified.
Root cause: Unimplemented Feature Gap

### Describe the feature

need a param to set dlc python path to execute. Currently, conda env python path is used which cannot be specified.

### Will you implement it?

- [ ] I would like to implement this feature and create a PR!

Done in https://github.com/open-compass/opencompass/pull/1604
Repository: open-compass/opencompass
Issue: [Feature] longbench-chat !!!
Root cause: Unimplemented Feature Gap

### 描述该功能

什么时候加上longbench-chat的测试呀

### 是否希望自己实现该功能？

- [ ] 我希望自己来实现这一功能，并向 OpenCompass 贡献代码！

Longbench 已经支持了: https://github.com/open-compass/opencompass/blob/main/opencompass/configs/datasets/longbench/longbench.py

Closed. Reopen if needed.

> Closed. Reopen if needed.

longbench-chat , not longbench 
https://github.com/THUDM/LongAlign?tab=readme-ov-file#longbench-chat-evaluation which is a  long-context align-ability benchmark
Repository: open-compass/opencompass
Issue: [Bug] mbpp的few-shot评测中以BOT身份结束
Root cause: Configuration Error

### 先决条件

- [X] 我已经搜索过 [问题](https://github.com/open-compass/opencompass/issues/) 和 [讨论](https://github.com/open-compass/opencompass/discussions) 但未得到预期的帮助。
- [X] 错误在 [最新版本](https://github.com/open-compass/opencompass) 中尚未被修复。

### 问题类型

我正在使用官方支持的任务/模型/数据集进行评估。

### 环境

无

### 重现问题 - 代码/配置示例

configs/datasets/mbpp/mbpp_gen_830460.py
```
template=dict(
  round=[
      dict(role='HUMAN', prompt='You are an expert Python programmer, and here is your task: Write a function to find the similar elements from the given two tuple lists. Your code should pass these tests:\n\n assert similar_elements((3, 4, 5, 6),(5, 7, 4, 10)) == (4, 5)\nassert similar_elements((1, 2, 3, 4),(5, 4, 3, 7)) == (3, 4) \nassert similar_elements((11, 12, 14, 13),(17, 15, 14, 13)) == (13, 14) \n'),
      dict(role='BOT', prompt="[BEGIN]\n 'def similar_elements(test_tup1, test_tup2):\r\n  res = tuple(set(test_tup1) & set(test_tup2))\r\n  return (res)' \n[DONE] \n\n "),
  
      dict(role='HUMAN', prompt='You are an expert Python programmer, and here is your task: Write a python function to identify non-prime numbers. Your code should pass these tests:\n\n assert is_not_prime(2) == False \nassert is_not_prime(10) == True \nassert is_not_prime(35) == True \n'),
      dict(role='BOT', prompt="[BEGIN]\n 'import math\r\ndef is_not_prime(n):\r\n    result = False\r\n    for i in range(2,int(math.sqrt(n)) + 1):\r\n        if n % i == 0:\r\n            result = True\r\n    return result' \n[DONE] \n\n "),
  
      dict(role='HUMAN', prompt='You are an expert Python programmer, and here is your task: Write a function to find the largest integers from a given list of numbers using heap queue algorithm. Your code should pass these tests:\n\n assert heap_queue_largest( [25, 35, 22, 85, 14, 65, 75, 22, 58],3)==[85, 75, 65] \nassert heap_queue_largest( [25, 35, 22, 85, 14, 65, 75, 22, 58],2)==[85, 75] \nassert heap_queue_largest( [25, 35, 22, 85, 14, 65, 75, 22, 58],5)==[85, 75, 65, 58, 35] \n'),
      dict(role='BOT', prompt="[BEGIN]\n 'import heapq as hq\r\ndef heap_queue_largest(nums,n):\r\n  largest_nums = hq.nlargest(n, nums)\r\n  return largest_nums' \n[DONE] \n\n "),
  
      dict(role='HUMAN', prompt='You are an expert Python programmer, and here is your task: {text} Your code should pass these tests:\n\n {test_list}  \n'),
      dict(role='BOT', prompt='[BEGIN]\n'),
  ],
```


### 重现问题 - 命令或脚本

无

### 重现问题 - 错误信息

mbpp的few-shot最后以BOT身份结束，在使用huggingface model评测时
```
messages = [self.tokenizer.apply_chat_template(m, add_generation_prompt=True, tokenize=False) for m in messages]
```
add_generation_prompt为True，在chat message生成时会在结尾有两个assistant身份。

### 其他信息

_No response_