Showing preview only (2,845K chars total). Download the full file or copy to clipboard to get everything.
Repository: hf-lin/ChatMusician
Branch: main
Commit: 440e65ee6371
Files: 1073
Total size: 2.4 MB
Directory structure:
gitextract_2gq2ldhy/
├── README.md
├── eval/
│ ├── LICENSE
│ ├── README.md
│ ├── configs/
│ │ ├── datasets/
│ │ │ ├── ARC_c/
│ │ │ │ ├── ARC_c_gen.py
│ │ │ │ ├── ARC_c_gen_1e0de5.py
│ │ │ │ ├── ARC_c_ppl.py
│ │ │ │ ├── ARC_c_ppl_2ef631.py
│ │ │ │ ├── ARC_c_ppl_a450bd.py
│ │ │ │ └── ARC_c_ppl_d52a21.py
│ │ │ ├── ARC_e/
│ │ │ │ ├── ARC_e_gen.py
│ │ │ │ ├── ARC_e_gen_1e0de5.py
│ │ │ │ ├── ARC_e_ppl.py
│ │ │ │ ├── ARC_e_ppl_2ef631.py
│ │ │ │ ├── ARC_e_ppl_a450bd.py
│ │ │ │ └── ARC_e_ppl_d52a21.py
│ │ │ ├── CLUE_C3/
│ │ │ │ ├── CLUE_C3_gen.py
│ │ │ │ ├── CLUE_C3_gen_8c358f.py
│ │ │ │ ├── CLUE_C3_ppl.py
│ │ │ │ ├── CLUE_C3_ppl_56b537.py
│ │ │ │ └── CLUE_C3_ppl_e24a31.py
│ │ │ ├── CLUE_CMRC/
│ │ │ │ ├── CLUE_CMRC_gen.py
│ │ │ │ ├── CLUE_CMRC_gen_1bd3c8.py
│ │ │ │ ├── CLUE_CMRC_gen_3749cd.py
│ │ │ │ ├── CLUE_CMRC_gen_8484b9.py
│ │ │ │ └── CLUE_CMRC_gen_941108.py
│ │ │ ├── CLUE_DRCD/
│ │ │ │ ├── CLUE_DRCD_gen.py
│ │ │ │ ├── CLUE_DRCD_gen_1bd3c8.py
│ │ │ │ ├── CLUE_DRCD_gen_3749cd.py
│ │ │ │ ├── CLUE_DRCD_gen_8484b9.py
│ │ │ │ └── CLUE_DRCD_gen_941108.py
│ │ │ ├── CLUE_afqmc/
│ │ │ │ ├── CLUE_afqmc_gen.py
│ │ │ │ ├── CLUE_afqmc_gen_901306.py
│ │ │ │ ├── CLUE_afqmc_ppl.py
│ │ │ │ ├── CLUE_afqmc_ppl_378c5b.py
│ │ │ │ ├── CLUE_afqmc_ppl_6507d7.py
│ │ │ │ └── CLUE_afqmc_ppl_7b0c1e.py
│ │ │ ├── CLUE_cmnli/
│ │ │ │ ├── CLUE_cmnli_gen.py
│ │ │ │ ├── CLUE_cmnli_gen_1abf97.py
│ │ │ │ ├── CLUE_cmnli_gen_51e956.py
│ │ │ │ ├── CLUE_cmnli_ppl.py
│ │ │ │ ├── CLUE_cmnli_ppl_98dd6e.py
│ │ │ │ ├── CLUE_cmnli_ppl_ef69e7.py
│ │ │ │ └── CLUE_cmnli_ppl_fdc6de.py
│ │ │ ├── CLUE_ocnli/
│ │ │ │ ├── CLUE_ocnli_gen.py
│ │ │ │ ├── CLUE_ocnli_gen_51e956.py
│ │ │ │ ├── CLUE_ocnli_gen_c4cb6c.py
│ │ │ │ ├── CLUE_ocnli_ppl.py
│ │ │ │ ├── CLUE_ocnli_ppl_98dd6e.py
│ │ │ │ ├── CLUE_ocnli_ppl_ef69e7.py
│ │ │ │ └── CLUE_ocnli_ppl_fdc6de.py
│ │ │ ├── FewCLUE_bustm/
│ │ │ │ ├── FewCLUE_bustm_gen.py
│ │ │ │ ├── FewCLUE_bustm_gen_634f41.py
│ │ │ │ ├── FewCLUE_bustm_ppl.py
│ │ │ │ ├── FewCLUE_bustm_ppl_4b16c0.py
│ │ │ │ ├── FewCLUE_bustm_ppl_9ef540.py
│ │ │ │ └── FewCLUE_bustm_ppl_e53034.py
│ │ │ ├── FewCLUE_chid/
│ │ │ │ ├── FewCLUE_chid_gen.py
│ │ │ │ ├── FewCLUE_chid_gen_0a29a2.py
│ │ │ │ ├── FewCLUE_chid_ppl.py
│ │ │ │ ├── FewCLUE_chid_ppl_8f2872.py
│ │ │ │ └── FewCLUE_chid_ppl_acccb5.py
│ │ │ ├── FewCLUE_cluewsc/
│ │ │ │ ├── FewCLUE_cluewsc_gen.py
│ │ │ │ ├── FewCLUE_cluewsc_gen_c68933.py
│ │ │ │ ├── FewCLUE_cluewsc_ppl.py
│ │ │ │ ├── FewCLUE_cluewsc_ppl_12e4e0.py
│ │ │ │ ├── FewCLUE_cluewsc_ppl_4284a0.py
│ │ │ │ └── FewCLUE_cluewsc_ppl_868415.py
│ │ │ ├── FewCLUE_csl/
│ │ │ │ ├── FewCLUE_csl_gen.py
│ │ │ │ ├── FewCLUE_csl_gen_28b223.py
│ │ │ │ ├── FewCLUE_csl_gen_87f4a8.py
│ │ │ │ ├── FewCLUE_csl_ppl.py
│ │ │ │ ├── FewCLUE_csl_ppl_769f8d.py
│ │ │ │ └── FewCLUE_csl_ppl_841b62.py
│ │ │ ├── FewCLUE_eprstmt/
│ │ │ │ ├── FewCLUE_eprstmt_gen.py
│ │ │ │ ├── FewCLUE_eprstmt_gen_740ea0.py
│ │ │ │ ├── FewCLUE_eprstmt_ppl.py
│ │ │ │ ├── FewCLUE_eprstmt_ppl_1ce587.py
│ │ │ │ └── FewCLUE_eprstmt_ppl_f1e631.py
│ │ │ ├── FewCLUE_ocnli_fc/
│ │ │ │ ├── FewCLUE_ocnli_fc_gen.py
│ │ │ │ ├── FewCLUE_ocnli_fc_gen_f97a97.py
│ │ │ │ ├── FewCLUE_ocnli_fc_ppl.py
│ │ │ │ ├── FewCLUE_ocnli_fc_ppl_9e8b3d.py
│ │ │ │ └── FewCLUE_ocnli_fc_ppl_c08300.py
│ │ │ ├── FewCLUE_tnews/
│ │ │ │ ├── FewCLUE_tnews_gen.py
│ │ │ │ ├── FewCLUE_tnews_gen_b90e4a.py
│ │ │ │ ├── FewCLUE_tnews_ppl.py
│ │ │ │ ├── FewCLUE_tnews_ppl_7d1c07.py
│ │ │ │ ├── FewCLUE_tnews_ppl_d10e8a.py
│ │ │ │ └── FewCLUE_tnews_ppl_fff486.py
│ │ │ ├── GaokaoBench/
│ │ │ │ ├── GaokaoBench_gen.py
│ │ │ │ ├── GaokaoBench_gen_5cfe9e.py
│ │ │ │ ├── GaokaoBench_mixed.py
│ │ │ │ └── GaokaoBench_mixed_f2038e.py
│ │ │ ├── PJExam/
│ │ │ │ ├── PJExam_gen.py
│ │ │ │ └── PJExam_gen_8cd97c.py
│ │ │ ├── SuperGLUE_AX_b/
│ │ │ │ ├── SuperGLUE_AX_b_gen.py
│ │ │ │ ├── SuperGLUE_AX_b_gen_4dfefa.py
│ │ │ │ ├── SuperGLUE_AX_b_ppl.py
│ │ │ │ ├── SuperGLUE_AX_b_ppl_0748aa.py
│ │ │ │ └── SuperGLUE_AX_b_ppl_6db806.py
│ │ │ ├── SuperGLUE_AX_g/
│ │ │ │ ├── SuperGLUE_AX_g_gen.py
│ │ │ │ ├── SuperGLUE_AX_g_gen_68aac7.py
│ │ │ │ ├── SuperGLUE_AX_g_ppl.py
│ │ │ │ ├── SuperGLUE_AX_g_ppl_50f8f6.py
│ │ │ │ └── SuperGLUE_AX_g_ppl_66caf3.py
│ │ │ ├── SuperGLUE_BoolQ/
│ │ │ │ ├── SuperGLUE_BoolQ_gen.py
│ │ │ │ ├── SuperGLUE_BoolQ_gen_883d50.py
│ │ │ │ ├── SuperGLUE_BoolQ_ppl.py
│ │ │ │ ├── SuperGLUE_BoolQ_ppl_314797.py
│ │ │ │ ├── SuperGLUE_BoolQ_ppl_314b96.py
│ │ │ │ ├── SuperGLUE_BoolQ_ppl_4da4db.py
│ │ │ │ └── SuperGLUE_BoolQ_ppl_9619db.py
│ │ │ ├── SuperGLUE_CB/
│ │ │ │ ├── SuperGLUE_CB_gen.py
│ │ │ │ ├── SuperGLUE_CB_gen_854c6c.py
│ │ │ │ ├── SuperGLUE_CB_ppl.py
│ │ │ │ ├── SuperGLUE_CB_ppl_0143fe.py
│ │ │ │ └── SuperGLUE_CB_ppl_11c175.py
│ │ │ ├── SuperGLUE_COPA/
│ │ │ │ ├── SuperGLUE_COPA_gen.py
│ │ │ │ ├── SuperGLUE_COPA_gen_91ca53.py
│ │ │ │ ├── SuperGLUE_COPA_ppl.py
│ │ │ │ ├── SuperGLUE_COPA_ppl_54058d.py
│ │ │ │ ├── SuperGLUE_COPA_ppl_5c24f1.py
│ │ │ │ └── SuperGLUE_COPA_ppl_9f3618.py
│ │ │ ├── SuperGLUE_MultiRC/
│ │ │ │ ├── SuperGLUE_MultiRC_gen.py
│ │ │ │ ├── SuperGLUE_MultiRC_gen_27071f.py
│ │ │ │ ├── SuperGLUE_MultiRC_ppl.py
│ │ │ │ ├── SuperGLUE_MultiRC_ppl_866273.py
│ │ │ │ └── SuperGLUE_MultiRC_ppl_ced824.py
│ │ │ ├── SuperGLUE_RTE/
│ │ │ │ ├── SuperGLUE_RTE_gen.py
│ │ │ │ ├── SuperGLUE_RTE_gen_68aac7.py
│ │ │ │ ├── SuperGLUE_RTE_ppl.py
│ │ │ │ ├── SuperGLUE_RTE_ppl_50f8f6.py
│ │ │ │ └── SuperGLUE_RTE_ppl_66caf3.py
│ │ │ ├── SuperGLUE_ReCoRD/
│ │ │ │ ├── SuperGLUE_ReCoRD_gen.py
│ │ │ │ ├── SuperGLUE_ReCoRD_gen_0f7784.py
│ │ │ │ ├── SuperGLUE_ReCoRD_gen_30dea0.py
│ │ │ │ └── SuperGLUE_ReCoRD_gen_a69961.py
│ │ │ ├── SuperGLUE_WSC/
│ │ │ │ ├── SuperGLUE_WSC_gen.py
│ │ │ │ ├── SuperGLUE_WSC_gen_6dc406.py
│ │ │ │ ├── SuperGLUE_WSC_gen_8a881c.py
│ │ │ │ ├── SuperGLUE_WSC_ppl.py
│ │ │ │ ├── SuperGLUE_WSC_ppl_003529.py
│ │ │ │ ├── SuperGLUE_WSC_ppl_cbf31c.py
│ │ │ │ ├── SuperGLUE_WSC_ppl_d0f531.py
│ │ │ │ └── SuperGLUE_WSC_ppl_f37e78.py
│ │ │ ├── SuperGLUE_WiC/
│ │ │ │ ├── SuperGLUE_WiC_gen.py
│ │ │ │ ├── SuperGLUE_WiC_gen_d06864.py
│ │ │ │ ├── SuperGLUE_WiC_ppl.py
│ │ │ │ ├── SuperGLUE_WiC_ppl_312de9.py
│ │ │ │ ├── SuperGLUE_WiC_ppl_3fb6fd.py
│ │ │ │ └── SuperGLUE_WiC_ppl_c926be.py
│ │ │ ├── TheoremQA/
│ │ │ │ ├── TheoremQA_gen.py
│ │ │ │ ├── TheoremQA_gen_424e0a.py
│ │ │ │ ├── TheoremQA_gen_7009de.py
│ │ │ │ └── TheoremQA_gen_ef26ca.py
│ │ │ ├── XCOPA/
│ │ │ │ ├── XCOPA_ppl.py
│ │ │ │ └── XCOPA_ppl_54058d.py
│ │ │ ├── XLSum/
│ │ │ │ ├── XLSum_gen.py
│ │ │ │ └── XLSum_gen_2bb71c.py
│ │ │ ├── Xsum/
│ │ │ │ ├── Xsum_gen.py
│ │ │ │ ├── Xsum_gen_31397e.py
│ │ │ │ └── Xsum_gen_8ea5f8.py
│ │ │ ├── adv_glue/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── adv_glue_mnli/
│ │ │ │ │ ├── adv_glue_mnli_gen.py
│ │ │ │ │ └── adv_glue_mnli_gen_bd8ef0.py
│ │ │ │ ├── adv_glue_mnli_mm/
│ │ │ │ │ ├── adv_glue_mnli_mm_gen.py
│ │ │ │ │ └── adv_glue_mnli_mm_gen_bd8ef0.py
│ │ │ │ ├── adv_glue_qnli/
│ │ │ │ │ ├── adv_glue_qnli_gen.py
│ │ │ │ │ └── adv_glue_qnli_gen_0b7326.py
│ │ │ │ ├── adv_glue_qqp/
│ │ │ │ │ ├── adv_glue_qqp_gen.py
│ │ │ │ │ └── adv_glue_qqp_gen_cdc277.py
│ │ │ │ ├── adv_glue_rte/
│ │ │ │ │ ├── adv_glue_rte_gen.py
│ │ │ │ │ └── adv_glue_rte_gen_8cc547.py
│ │ │ │ └── adv_glue_sst2/
│ │ │ │ ├── adv_glue_sst2_gen.py
│ │ │ │ └── adv_glue_sst2_gen_ee8d3b.py
│ │ │ ├── agieval/
│ │ │ │ ├── agieval_gen.py
│ │ │ │ ├── agieval_gen_64afd3.py
│ │ │ │ ├── agieval_gen_a0c741.py
│ │ │ │ ├── agieval_mixed.py
│ │ │ │ └── agieval_mixed_2f14ad.py
│ │ │ ├── anli/
│ │ │ │ ├── anli_gen.py
│ │ │ │ ├── anli_gen_fc7328.py
│ │ │ │ ├── anli_ppl.py
│ │ │ │ └── anli_ppl_1d290e.py
│ │ │ ├── apps/
│ │ │ │ ├── apps_gen.py
│ │ │ │ ├── apps_gen_5b4254.py
│ │ │ │ ├── apps_gen_7fbb95.py
│ │ │ │ └── apps_gen_b4dee3.py
│ │ │ ├── bbh/
│ │ │ │ ├── bbh_gen.py
│ │ │ │ ├── bbh_gen_5b92b0.py
│ │ │ │ ├── bbh_gen_5bf00b.py
│ │ │ │ └── lib_prompt/
│ │ │ │ ├── boolean_expressions.txt
│ │ │ │ ├── causal_judgement.txt
│ │ │ │ ├── date_understanding.txt
│ │ │ │ ├── disambiguation_qa.txt
│ │ │ │ ├── dyck_languages.txt
│ │ │ │ ├── formal_fallacies.txt
│ │ │ │ ├── geometric_shapes.txt
│ │ │ │ ├── hyperbaton.txt
│ │ │ │ ├── logical_deduction_five_objects.txt
│ │ │ │ ├── logical_deduction_seven_objects.txt
│ │ │ │ ├── logical_deduction_three_objects.txt
│ │ │ │ ├── movie_recommendation.txt
│ │ │ │ ├── multistep_arithmetic_two.txt
│ │ │ │ ├── navigate.txt
│ │ │ │ ├── object_counting.txt
│ │ │ │ ├── penguins_in_a_table.txt
│ │ │ │ ├── reasoning_about_colored_objects.txt
│ │ │ │ ├── ruin_names.txt
│ │ │ │ ├── salient_translation_error_detection.txt
│ │ │ │ ├── snarks.txt
│ │ │ │ ├── sports_understanding.txt
│ │ │ │ ├── temporal_sequences.txt
│ │ │ │ ├── tracking_shuffled_objects_five_objects.txt
│ │ │ │ ├── tracking_shuffled_objects_seven_objects.txt
│ │ │ │ ├── tracking_shuffled_objects_three_objects.txt
│ │ │ │ ├── web_of_lies.txt
│ │ │ │ └── word_sorting.txt
│ │ │ ├── ceval/
│ │ │ │ ├── ceval_gen.py
│ │ │ │ ├── ceval_gen_2daf24.py
│ │ │ │ ├── ceval_gen_5f30c7.py
│ │ │ │ ├── ceval_ppl.py
│ │ │ │ ├── ceval_ppl_578f8d.py
│ │ │ │ └── ceval_ppl_93e5ce.py
│ │ │ ├── civilcomments/
│ │ │ │ ├── civilcomments_clp.py
│ │ │ │ ├── civilcomments_clp_6a2561.py
│ │ │ │ └── civilcomments_clp_a3c5fd.py
│ │ │ ├── cmb/
│ │ │ │ ├── cmb_gen.py
│ │ │ │ └── cmb_gen_72cbb7.py
│ │ │ ├── cmmlu/
│ │ │ │ ├── cmmlu_gen.py
│ │ │ │ ├── cmmlu_gen_c13365.py
│ │ │ │ ├── cmmlu_ppl.py
│ │ │ │ └── cmmlu_ppl_8b9c76.py
│ │ │ ├── collections/
│ │ │ │ ├── base_medium.py
│ │ │ │ ├── base_medium_llama.py
│ │ │ │ ├── base_small.py
│ │ │ │ ├── chat_medium.py
│ │ │ │ ├── chat_small.py
│ │ │ │ ├── example.py
│ │ │ │ └── leaderboard/
│ │ │ │ ├── qwen.py
│ │ │ │ └── qwen_chat.py
│ │ │ ├── commonsenseqa/
│ │ │ │ ├── commonsenseqa_gen.py
│ │ │ │ ├── commonsenseqa_gen_c946f2.py
│ │ │ │ ├── commonsenseqa_ppl.py
│ │ │ │ ├── commonsenseqa_ppl_3e9f2d.py
│ │ │ │ ├── commonsenseqa_ppl_5545e2.py
│ │ │ │ └── commonsenseqa_ppl_716f78.py
│ │ │ ├── crowspairs/
│ │ │ │ ├── crowspairs_gen.py
│ │ │ │ ├── crowspairs_gen_02b6c1.py
│ │ │ │ ├── crowspairs_gen_381af0.py
│ │ │ │ ├── crowspairs_ppl.py
│ │ │ │ ├── crowspairs_ppl_47f211.py
│ │ │ │ └── crowspairs_ppl_e811e1.py
│ │ │ ├── cvalues/
│ │ │ │ ├── cvalues_responsibility_gen.py
│ │ │ │ └── cvalues_responsibility_gen_543378.py
│ │ │ ├── drop/
│ │ │ │ ├── drop_gen.py
│ │ │ │ └── drop_gen_599f07.py
│ │ │ ├── ds1000/
│ │ │ │ └── ds1000_gen_cbc84f.py
│ │ │ ├── flores/
│ │ │ │ ├── flores_gen.py
│ │ │ │ ├── flores_gen_806ede.py
│ │ │ │ └── flores_gen_aad4fd.py
│ │ │ ├── game24/
│ │ │ │ ├── game24_gen.py
│ │ │ │ └── game24_gen_52a460.py
│ │ │ ├── govrepcrs/
│ │ │ │ ├── govrepcrs_gen.py
│ │ │ │ ├── govrepcrs_gen_aa5eb3.py
│ │ │ │ └── govrepcrs_gen_db7930.py
│ │ │ ├── gsm8k/
│ │ │ │ ├── gsm8k_gen.py
│ │ │ │ ├── gsm8k_gen_1d7fe4.py
│ │ │ │ ├── gsm8k_gen_1dce88.py
│ │ │ │ ├── gsm8k_gen_a3e34a.py
│ │ │ │ └── gsm8k_gen_e9e91e.py
│ │ │ ├── hellaswag/
│ │ │ │ ├── hellaswag_gen.py
│ │ │ │ ├── hellaswag_gen_6faab5.py
│ │ │ │ ├── hellaswag_ppl.py
│ │ │ │ ├── hellaswag_ppl_47bff9.py
│ │ │ │ ├── hellaswag_ppl_9dbb12.py
│ │ │ │ └── hellaswag_ppl_a6e128.py
│ │ │ ├── humaneval/
│ │ │ │ ├── humaneval_gen.py
│ │ │ │ ├── humaneval_gen_6f294d.py
│ │ │ │ ├── humaneval_gen_8e312c.py
│ │ │ │ ├── humaneval_gen_a82cae.py
│ │ │ │ ├── humaneval_gen_fd5822.py
│ │ │ │ └── humaneval_gen_ff7054.py
│ │ │ ├── humanevalx/
│ │ │ │ ├── humanevalx_gen.py
│ │ │ │ ├── humanevalx_gen_0af626.py
│ │ │ │ └── humanevalx_gen_620cfa.py
│ │ │ ├── iwslt2017/
│ │ │ │ ├── iwslt2017_gen.py
│ │ │ │ ├── iwslt2017_gen_69ce16.py
│ │ │ │ ├── iwslt2017_gen_b4a814.py
│ │ │ │ └── iwslt2017_gen_d0ebd1.py
│ │ │ ├── jigsawmultilingual/
│ │ │ │ ├── jigsawmultilingual_clp.py
│ │ │ │ ├── jigsawmultilingual_clp_1af0ae.py
│ │ │ │ └── jigsawmultilingual_clp_fe50d8.py
│ │ │ ├── lambada/
│ │ │ │ ├── lambada_gen.py
│ │ │ │ ├── lambada_gen_217e11.py
│ │ │ │ └── lambada_gen_8b48a5.py
│ │ │ ├── lcsts/
│ │ │ │ ├── lcsts_gen.py
│ │ │ │ ├── lcsts_gen_8ee1fe.py
│ │ │ │ └── lcsts_gen_9b0b89.py
│ │ │ ├── leval/
│ │ │ │ ├── leval.py
│ │ │ │ ├── levalcoursera/
│ │ │ │ │ ├── leval_coursera_gen.py
│ │ │ │ │ └── leval_coursera_gen_36a006.py
│ │ │ │ ├── levalfinancialqa/
│ │ │ │ │ ├── leval_financialqa_gen.py
│ │ │ │ │ └── leval_financialqa_gen_b03798.py
│ │ │ │ ├── levalgovreportsumm/
│ │ │ │ │ ├── leval_gov_report_summ_gen.py
│ │ │ │ │ └── leval_gov_report_summ_gen_b03798.py
│ │ │ │ ├── levalgsm100/
│ │ │ │ │ ├── leval_gsm100_gen.py
│ │ │ │ │ └── leval_gsm100_gen_77dd94.py
│ │ │ │ ├── levallegalcontractqa/
│ │ │ │ │ ├── leval_legalcontractqa_gen.py
│ │ │ │ │ └── leval_legalcontractqa_gen_68a2ac.py
│ │ │ │ ├── levalmeetingsumm/
│ │ │ │ │ ├── leval_meetingsumm_gen.py
│ │ │ │ │ └── leval_meetingsumm_gen_b03798.py
│ │ │ │ ├── levalmultidocqa/
│ │ │ │ │ ├── leval_multidocqa_gen.py
│ │ │ │ │ └── leval_multidocqa_gen_96bf3f.py
│ │ │ │ ├── levalnarrativeqa/
│ │ │ │ │ ├── leval_narrativeqa_gen.py
│ │ │ │ │ └── leval_narrativeqa_gen_766dd0.py
│ │ │ │ ├── levalnaturalquestion/
│ │ │ │ │ ├── leval_naturalquestion_gen.py
│ │ │ │ │ └── leval_naturalquestion_gen_52c33f.py
│ │ │ │ ├── levalnewssumm/
│ │ │ │ │ ├── leval_newssumm_gen.py
│ │ │ │ │ └── leval_newssumm_gen_b03798.py
│ │ │ │ ├── levalpaperassistant/
│ │ │ │ │ ├── leval_paper_assistant_gen.py
│ │ │ │ │ └── leval_paper_assistant_gen_b03798.py
│ │ │ │ ├── levalpatentsumm/
│ │ │ │ │ ├── leval_patent_summ_gen.py
│ │ │ │ │ └── leval_patent_summ_gen_b03798.py
│ │ │ │ ├── levalquality/
│ │ │ │ │ ├── leval_quality_gen.py
│ │ │ │ │ └── leval_quality_gen_36a006.py
│ │ │ │ ├── levalreviewsumm/
│ │ │ │ │ ├── leval_review_summ_gen.py
│ │ │ │ │ └── leval_review_summ_gen_b03798.py
│ │ │ │ ├── levalscientificqa/
│ │ │ │ │ ├── leval_scientificqa_gen.py
│ │ │ │ │ └── leval_scientificqa_gen_96bf3f.py
│ │ │ │ ├── levaltopicretrieval/
│ │ │ │ │ ├── leval_topic_retrieval_gen.py
│ │ │ │ │ └── leval_topic_retrieval_gen_bf433f.py
│ │ │ │ ├── levaltpo/
│ │ │ │ │ ├── leval_tpo_gen.py
│ │ │ │ │ └── leval_tpo_gen_36a006.py
│ │ │ │ └── levaltvshowsumm/
│ │ │ │ ├── leval_tvshow_summ_gen.py
│ │ │ │ └── leval_tvshow_summ_gen_b03798.py
│ │ │ ├── longbench/
│ │ │ │ ├── longbench.py
│ │ │ │ ├── longbench2wikimqa/
│ │ │ │ │ ├── longbench_2wikimqa_gen.py
│ │ │ │ │ └── longbench_2wikimqa_gen_6b3efc.py
│ │ │ │ ├── longbenchdureader/
│ │ │ │ │ ├── longbench_dureader_gen.py
│ │ │ │ │ └── longbench_dureader_gen_c6c7e4.py
│ │ │ │ ├── longbenchgov_report/
│ │ │ │ │ ├── longbench_gov_report_gen.py
│ │ │ │ │ └── longbench_gov_report_gen_54c5b0.py
│ │ │ │ ├── longbenchhotpotqa/
│ │ │ │ │ ├── longbench_hotpotqa_gen.py
│ │ │ │ │ └── longbench_hotpotqa_gen_6b3efc.py
│ │ │ │ ├── longbenchlcc/
│ │ │ │ │ ├── longbench_lcc_gen.py
│ │ │ │ │ └── longbench_lcc_gen_6ba507.py
│ │ │ │ ├── longbenchlsht/
│ │ │ │ │ ├── longbench_lsht_gen.py
│ │ │ │ │ └── longbench_lsht_gen_e8a339.py
│ │ │ │ ├── longbenchmultifieldqa_en/
│ │ │ │ │ ├── longbench_multifieldqa_en_gen.py
│ │ │ │ │ └── longbench_multifieldqa_en_gen_d3838e.py
│ │ │ │ ├── longbenchmultifieldqa_zh/
│ │ │ │ │ ├── longbench_multifieldqa_zh_gen.py
│ │ │ │ │ └── longbench_multifieldqa_zh_gen_e9a7ef.py
│ │ │ │ ├── longbenchmusique/
│ │ │ │ │ ├── longbench_musique_gen.py
│ │ │ │ │ └── longbench_musique_gen_6b3efc.py
│ │ │ │ ├── longbenchnarrativeqa/
│ │ │ │ │ ├── longbench_narrativeqa_gen.py
│ │ │ │ │ └── longbench_narrativeqa_gen_a68305.py
│ │ │ │ ├── longbenchnq/
│ │ │ │ │ ├── longbench_nq_gen.py
│ │ │ │ │ └── longbench_nq_gen_d30cb9.py
│ │ │ │ ├── longbenchpassage_count/
│ │ │ │ │ ├── longbench_passage_count_gen.py
│ │ │ │ │ └── longbench_passage_count_gen_dcdaab.py
│ │ │ │ ├── longbenchpassage_retrieval_en/
│ │ │ │ │ ├── longbench_passage_retrieval_en_gen.py
│ │ │ │ │ └── longbench_passage_retrieval_en_gen_734db5.py
│ │ │ │ ├── longbenchpassage_retrieval_zh/
│ │ │ │ │ ├── longbench_passage_retrieval_zh_gen.py
│ │ │ │ │ └── longbench_passage_retrieval_zh_gen_01cca2.py
│ │ │ │ ├── longbenchqasper/
│ │ │ │ │ ├── longbench_qasper_gen.py
│ │ │ │ │ └── longbench_qasper_gen_6b3efc.py
│ │ │ │ ├── longbenchqmsum/
│ │ │ │ │ ├── longbench_qmsum_gen.py
│ │ │ │ │ └── longbench_qmsum_gen_d33331.py
│ │ │ │ ├── longbenchrepobench/
│ │ │ │ │ ├── longbench_repobench_gen.py
│ │ │ │ │ └── longbench_repobench_gen_6df953.py
│ │ │ │ ├── longbenchtrec/
│ │ │ │ │ ├── longbench_trec_gen.py
│ │ │ │ │ └── longbench_trec_gen_824187.py
│ │ │ │ ├── longbenchtriviaqa/
│ │ │ │ │ ├── longbench_triviaqa_gen.py
│ │ │ │ │ └── longbench_triviaqa_gen_d30cb9.py
│ │ │ │ └── longbenchvcsum/
│ │ │ │ ├── longbench_vcsum_gen.py
│ │ │ │ └── longbench_vcsum_gen_f7a8ac.py
│ │ │ ├── math/
│ │ │ │ ├── math_gen.py
│ │ │ │ ├── math_gen_265cce.py
│ │ │ │ ├── math_gen_559593.py
│ │ │ │ └── math_gen_5e8458.py
│ │ │ ├── mbpp/
│ │ │ │ ├── mbpp_gen.py
│ │ │ │ ├── mbpp_gen_1e1056.py
│ │ │ │ ├── mbpp_gen_5d6316.py
│ │ │ │ ├── mbpp_gen_6590b0.py
│ │ │ │ └── mbpp_gen_78c1bc.py
│ │ │ ├── mmlu/
│ │ │ │ ├── mmlu_gen.py
│ │ │ │ ├── mmlu_gen_23a9a9.py
│ │ │ │ ├── mmlu_gen_5d1409.py
│ │ │ │ ├── mmlu_gen_79e572.py
│ │ │ │ ├── mmlu_gen_a484b3.py
│ │ │ │ ├── mmlu_ppl.py
│ │ │ │ └── mmlu_ppl_ac766d.py
│ │ │ ├── music_theory_bench/
│ │ │ │ ├── music_theory_bench_ppl_few_shot.py
│ │ │ │ └── music_theory_bench_ppl_zero_shot.py
│ │ │ ├── narrativeqa/
│ │ │ │ ├── narrativeqa_gen.py
│ │ │ │ ├── narrativeqa_gen_a2d88a.py
│ │ │ │ └── narrativeqa_gen_db6413.py
│ │ │ ├── nq/
│ │ │ │ ├── nq_gen.py
│ │ │ │ ├── nq_gen_0356ec.py
│ │ │ │ ├── nq_gen_2463e2.py
│ │ │ │ ├── nq_gen_3dcea1.py
│ │ │ │ ├── nq_gen_68c1c6.py
│ │ │ │ └── nq_gen_c788f6.py
│ │ │ ├── obqa/
│ │ │ │ ├── obqa_gen.py
│ │ │ │ ├── obqa_gen_9069e4.py
│ │ │ │ ├── obqa_ppl.py
│ │ │ │ ├── obqa_ppl_1defe8.py
│ │ │ │ ├── obqa_ppl_6aac9e.py
│ │ │ │ └── obqa_ppl_c7c154.py
│ │ │ ├── piqa/
│ │ │ │ ├── piqa_gen.py
│ │ │ │ ├── piqa_gen_1194eb.py
│ │ │ │ ├── piqa_ppl.py
│ │ │ │ ├── piqa_ppl_0cfff2.py
│ │ │ │ ├── piqa_ppl_1cf9f0.py
│ │ │ │ └── piqa_ppl_3431ea.py
│ │ │ ├── promptbench/
│ │ │ │ ├── promptbench_iwslt2017_gen_cbb8c8.py
│ │ │ │ ├── promptbench_math_gen_abf776.py
│ │ │ │ ├── promptbench_squad20_gen_b15d1c.py
│ │ │ │ └── promptbench_wnli_gen_50662f.py
│ │ │ ├── qabench/
│ │ │ │ ├── qabench_gen.py
│ │ │ │ └── qabench_gen_353ae7.py
│ │ │ ├── qasper/
│ │ │ │ ├── qasper_gen.py
│ │ │ │ ├── qasper_gen_a2d88a.py
│ │ │ │ └── qasper_gen_db6413.py
│ │ │ ├── qaspercut/
│ │ │ │ ├── qaspercut_gen.py
│ │ │ │ ├── qaspercut_gen_a2d88a.py
│ │ │ │ └── qaspercut_gen_db6413.py
│ │ │ ├── race/
│ │ │ │ ├── race_gen.py
│ │ │ │ ├── race_gen_69ee4f.py
│ │ │ │ ├── race_gen_9302a5.py
│ │ │ │ ├── race_ppl.py
│ │ │ │ ├── race_ppl_5831a0.py
│ │ │ │ ├── race_ppl_a138cd.py
│ │ │ │ └── race_ppl_abed12.py
│ │ │ ├── realtoxicprompts/
│ │ │ │ ├── realtoxicprompts_gen.py
│ │ │ │ ├── realtoxicprompts_gen_7605e4.py
│ │ │ │ └── realtoxicprompts_gen_ac723c.py
│ │ │ ├── safety/
│ │ │ │ ├── safety_gen.py
│ │ │ │ └── safety_gen_7ce197.py
│ │ │ ├── siqa/
│ │ │ │ ├── siqa_gen.py
│ │ │ │ ├── siqa_gen_e78df3.py
│ │ │ │ ├── siqa_ppl.py
│ │ │ │ ├── siqa_ppl_42bc6e.py
│ │ │ │ ├── siqa_ppl_7845b0.py
│ │ │ │ ├── siqa_ppl_ced5f6.py
│ │ │ │ └── siqa_ppl_e8d8c5.py
│ │ │ ├── squad20/
│ │ │ │ ├── squad20_gen.py
│ │ │ │ └── squad20_gen_1710bc.py
│ │ │ ├── storycloze/
│ │ │ │ ├── storycloze_gen.py
│ │ │ │ ├── storycloze_gen_7f656a.py
│ │ │ │ ├── storycloze_ppl.py
│ │ │ │ ├── storycloze_ppl_496661.py
│ │ │ │ └── storycloze_ppl_afd16f.py
│ │ │ ├── strategyqa/
│ │ │ │ ├── strategyqa_gen.py
│ │ │ │ ├── strategyqa_gen_1180a7.py
│ │ │ │ └── strategyqa_gen_934441.py
│ │ │ ├── summedits/
│ │ │ │ ├── summedits_gen.py
│ │ │ │ ├── summedits_gen_315438.py
│ │ │ │ ├── summedits_gen_4fb38b.py
│ │ │ │ ├── summedits_ppl.py
│ │ │ │ ├── summedits_ppl_1fbeb6.py
│ │ │ │ ├── summedits_ppl_3c30d0.py
│ │ │ │ └── summedits_ppl_fa58ba.py
│ │ │ ├── summscreen/
│ │ │ │ ├── summscreen_gen.py
│ │ │ │ ├── summscreen_gen_653185.py
│ │ │ │ └── summscreen_gen_aa5eb3.py
│ │ │ ├── triviaqa/
│ │ │ │ ├── triviaqa_gen.py
│ │ │ │ ├── triviaqa_gen_0356ec.py
│ │ │ │ ├── triviaqa_gen_2121ce.py
│ │ │ │ ├── triviaqa_gen_3e39a5.py
│ │ │ │ ├── triviaqa_gen_429db5.py
│ │ │ │ └── triviaqa_gen_d297bb.py
│ │ │ ├── triviaqarc/
│ │ │ │ ├── triviaqarc_gen.py
│ │ │ │ ├── triviaqarc_gen_a2d88a.py
│ │ │ │ └── triviaqarc_gen_db6413.py
│ │ │ ├── truthfulqa/
│ │ │ │ ├── truthfulqa_gen.py
│ │ │ │ ├── truthfulqa_gen_1e7d8d.py
│ │ │ │ └── truthfulqa_gen_5ddc62.py
│ │ │ ├── tydiqa/
│ │ │ │ ├── tydiqa_gen.py
│ │ │ │ └── tydiqa_gen_978d2a.py
│ │ │ ├── winograd/
│ │ │ │ ├── winograd_ppl.py
│ │ │ │ ├── winograd_ppl_8f3049.py
│ │ │ │ └── winograd_ppl_b6c7ed.py
│ │ │ ├── winogrande/
│ │ │ │ ├── winogrande_gen.py
│ │ │ │ ├── winogrande_gen_a9ede5.py
│ │ │ │ ├── winogrande_ppl.py
│ │ │ │ ├── winogrande_ppl_55a66e.py
│ │ │ │ └── winogrande_ppl_9307fd.py
│ │ │ ├── xiezhi/
│ │ │ │ ├── xiezhi_gen.py
│ │ │ │ ├── xiezhi_gen_b86cf5.py
│ │ │ │ ├── xiezhi_ppl.py
│ │ │ │ └── xiezhi_ppl_ea6bd7.py
│ │ │ └── z_bench/
│ │ │ ├── z_bench_gen.py
│ │ │ ├── z_bench_gen_52ba2f.py
│ │ │ └── z_bench_gen_d8c84c.py
│ │ ├── eval_attack.py
│ │ ├── eval_chat_musician_7b.py
│ │ ├── eval_claude.py
│ │ ├── eval_codegeex2.py
│ │ ├── eval_demo.py
│ │ ├── eval_gpt3.5.py
│ │ ├── eval_gpt4.py
│ │ ├── eval_hf_llama_7b.py
│ │ ├── eval_internLM.py
│ │ ├── eval_internlm_7b.py
│ │ ├── eval_internlm_chat_7b_turbomind.py
│ │ ├── eval_llama2_7b.py
│ │ ├── eval_qwen_7b.py
│ │ ├── eval_qwen_7b_chat.py
│ │ ├── models/
│ │ │ ├── chat_musician/
│ │ │ │ └── hf_chat_musician.py
│ │ │ ├── hf_llama/
│ │ │ │ ├── hf_llama2_13b.py
│ │ │ │ ├── hf_llama2_70b.py
│ │ │ │ ├── hf_llama2_7b.py
│ │ │ │ ├── hf_llama_13b.py
│ │ │ │ ├── hf_llama_30b.py
│ │ │ │ ├── hf_llama_65b.py
│ │ │ │ └── hf_llama_7b.py
│ │ │ ├── llama/
│ │ │ │ ├── llama2_13b.py
│ │ │ │ ├── llama2_13b_chat.py
│ │ │ │ ├── llama2_70b.py
│ │ │ │ ├── llama2_70b_chat.py
│ │ │ │ ├── llama2_7b.py
│ │ │ │ ├── llama2_7b_chat.py
│ │ │ │ ├── llama_13b.py
│ │ │ │ ├── llama_30b.py
│ │ │ │ ├── llama_65b.py
│ │ │ │ └── llama_7b.py
│ │ │ └── yi/
│ │ │ ├── hf_yi_34b.py
│ │ │ └── hf_yi_6b.py
│ │ ├── multimodal/
│ │ │ ├── instructblip/
│ │ │ │ ├── README.md
│ │ │ │ ├── instructblip_coco_caption.py
│ │ │ │ ├── instructblip_flickr30k.py
│ │ │ │ ├── instructblip_gqa.py
│ │ │ │ ├── instructblip_mmbench.py
│ │ │ │ ├── instructblip_ocr_vqa.py
│ │ │ │ ├── instructblip_ok_vqa.py
│ │ │ │ ├── instructblip_scienceqa.py
│ │ │ │ ├── instructblip_textvqa.py
│ │ │ │ ├── instructblip_vizwiz.py
│ │ │ │ ├── instructblip_vqav2.py
│ │ │ │ └── instructblip_vsr.py
│ │ │ ├── llama_adapter_v2_multimodal/
│ │ │ │ ├── README.md
│ │ │ │ └── llama_adapter_v2_mm_7b_mmbench.py
│ │ │ ├── llava/
│ │ │ │ ├── README.md
│ │ │ │ ├── llava_7b_coco_caption.py
│ │ │ │ ├── llava_7b_flickr30k.py
│ │ │ │ ├── llava_7b_gqa.py
│ │ │ │ ├── llava_7b_mmbench.py
│ │ │ │ ├── llava_7b_ocr_vqa.py
│ │ │ │ ├── llava_7b_ok_vqa.py
│ │ │ │ ├── llava_7b_scienceqa.py
│ │ │ │ ├── llava_7b_textvqa.py
│ │ │ │ ├── llava_7b_vizwiz.py
│ │ │ │ ├── llava_7b_vqav2.py
│ │ │ │ └── llava_7b_vsr.py
│ │ │ ├── minigpt_4/
│ │ │ │ ├── README.md
│ │ │ │ ├── minigpt_4_7b_coco_caption.py
│ │ │ │ ├── minigpt_4_7b_flickr30k.py
│ │ │ │ ├── minigpt_4_7b_gqa.py
│ │ │ │ ├── minigpt_4_7b_mmbench.py
│ │ │ │ ├── minigpt_4_7b_mme.py
│ │ │ │ ├── minigpt_4_7b_ocr_vqa.py
│ │ │ │ ├── minigpt_4_7b_ok_vqa.py
│ │ │ │ ├── minigpt_4_7b_scienceqa.py
│ │ │ │ ├── minigpt_4_7b_seedbench.py
│ │ │ │ ├── minigpt_4_7b_textvqa.py
│ │ │ │ ├── minigpt_4_7b_vizwiz.py
│ │ │ │ ├── minigpt_4_7b_vqav2.py
│ │ │ │ └── minigpt_4_7b_vsr.py
│ │ │ ├── mplug_owl/
│ │ │ │ ├── README.md
│ │ │ │ └── mplug_owl-7b-mmbench.py
│ │ │ ├── openflamingo/
│ │ │ │ ├── README.md
│ │ │ │ └── openflamingo_mmbench.py
│ │ │ ├── otter/
│ │ │ │ ├── README.md
│ │ │ │ └── otter_9b_mmbench.py
│ │ │ ├── qwen/
│ │ │ │ ├── qwenvl_base_7b_mmbench.py
│ │ │ │ └── qwenvl_chat_7b_mmbench.py
│ │ │ ├── tasks.py
│ │ │ └── visualglm/
│ │ │ ├── visualglm_6b_coco_caption.py
│ │ │ ├── visualglm_6b_flickr30k.py
│ │ │ ├── visualglm_6b_gqa.py
│ │ │ ├── visualglm_6b_mmbench.py
│ │ │ ├── visualglm_6b_ocr_vqa.py
│ │ │ ├── visualglm_6b_ok_vqa.py
│ │ │ ├── visualglm_6b_scienceqa.py
│ │ │ ├── visualglm_6b_textvqa.py
│ │ │ ├── visualglm_6b_vizwiz.py
│ │ │ ├── visualglm_6b_vqav2.py
│ │ │ └── visualglm_6b_vsr.py
│ │ └── summarizers/
│ │ ├── example.py
│ │ ├── groups/
│ │ │ ├── GaokaoBench.py
│ │ │ ├── agieval.py
│ │ │ ├── bbh.py
│ │ │ ├── ceval.py
│ │ │ ├── cmmlu.py
│ │ │ ├── flores.py
│ │ │ ├── jigsaw_multilingual.py
│ │ │ ├── mmlu.py
│ │ │ ├── tydiqa.py
│ │ │ └── xiezhi.py
│ │ ├── leaderboard.py
│ │ ├── leval.py
│ │ ├── longbench.py
│ │ ├── medium.py
│ │ └── small.py
│ ├── docs/
│ │ ├── en/
│ │ │ ├── MMBench.md
│ │ │ ├── Makefile
│ │ │ ├── _static/
│ │ │ │ ├── css/
│ │ │ │ │ └── readthedocs.css
│ │ │ │ └── js/
│ │ │ │ └── custom.js
│ │ │ ├── _templates/
│ │ │ │ ├── 404.html
│ │ │ │ ├── autosummary/
│ │ │ │ │ └── class.rst
│ │ │ │ └── callable.rst
│ │ │ ├── advanced_guides/
│ │ │ │ ├── code_eval_service.md
│ │ │ │ ├── evaluation_turbomind.md
│ │ │ │ ├── longeval.md
│ │ │ │ ├── new_dataset.md
│ │ │ │ ├── new_model.md
│ │ │ │ └── prompt_attack.md
│ │ │ ├── conf.py
│ │ │ ├── docutils.conf
│ │ │ ├── faq.md
│ │ │ ├── get_started.md
│ │ │ ├── index.rst
│ │ │ ├── notes/
│ │ │ │ ├── contribution_guide.md
│ │ │ │ └── news.md
│ │ │ ├── prompt/
│ │ │ │ ├── chain_of_thought.md
│ │ │ │ ├── meta_template.md
│ │ │ │ ├── overview.md
│ │ │ │ └── prompt_template.md
│ │ │ ├── tools.md
│ │ │ └── user_guides/
│ │ │ ├── config.md
│ │ │ ├── datasets.md
│ │ │ ├── evaluation.md
│ │ │ ├── experimentation.md
│ │ │ ├── framework_overview.md
│ │ │ ├── metrics.md
│ │ │ ├── models.md
│ │ │ └── summarizer.md
│ │ └── zh_cn/
│ │ ├── Makefile
│ │ ├── _static/
│ │ │ ├── css/
│ │ │ │ └── readthedocs.css
│ │ │ └── js/
│ │ │ └── custom.js
│ │ ├── _templates/
│ │ │ ├── 404.html
│ │ │ ├── autosummary/
│ │ │ │ └── class.rst
│ │ │ └── callable.rst
│ │ ├── advanced_guides/
│ │ │ ├── code_eval_service.md
│ │ │ ├── evaluation_turbomind.md
│ │ │ ├── longeval.md
│ │ │ ├── new_dataset.md
│ │ │ ├── new_model.md
│ │ │ └── prompt_attack.md
│ │ ├── conf.py
│ │ ├── cp_origin_docs.sh
│ │ ├── docutils.conf
│ │ ├── get_started.md
│ │ ├── index.rst
│ │ ├── notes/
│ │ │ ├── contribution_guide.md
│ │ │ └── news.md
│ │ ├── prompt/
│ │ │ ├── chain_of_thought.md
│ │ │ ├── meta_template.md
│ │ │ ├── overview.md
│ │ │ └── prompt_template.md
│ │ ├── tools.md
│ │ └── user_guides/
│ │ ├── config.md
│ │ ├── datasets.md
│ │ ├── evaluation.md
│ │ ├── experimentation.md
│ │ ├── framework_overview.md
│ │ ├── metrics.md
│ │ ├── models.md
│ │ └── summarizer.md
│ ├── opencompass/
│ │ ├── __init__.py
│ │ ├── datasets/
│ │ │ ├── GaokaoBench.py
│ │ │ ├── TheoremQA.py
│ │ │ ├── __init__.py
│ │ │ ├── advglue.py
│ │ │ ├── afqmcd.py
│ │ │ ├── agieval/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── agieval.py
│ │ │ │ ├── constructions.py
│ │ │ │ ├── dataset_loader.py
│ │ │ │ ├── evaluation.py
│ │ │ │ ├── math_equivalence.py
│ │ │ │ ├── post_process.py
│ │ │ │ └── utils.py
│ │ │ ├── anli.py
│ │ │ ├── arc.py
│ │ │ ├── ax.py
│ │ │ ├── base.py
│ │ │ ├── bbh.py
│ │ │ ├── boolq.py
│ │ │ ├── bustum.py
│ │ │ ├── c3.py
│ │ │ ├── cb.py
│ │ │ ├── ceval.py
│ │ │ ├── chid.py
│ │ │ ├── civilcomments.py
│ │ │ ├── cluewsc.py
│ │ │ ├── cmb.py
│ │ │ ├── cmmlu.py
│ │ │ ├── cmnli.py
│ │ │ ├── cmrc.py
│ │ │ ├── commonsenseqa.py
│ │ │ ├── copa.py
│ │ │ ├── crowspairs.py
│ │ │ ├── csl.py
│ │ │ ├── cvalues.py
│ │ │ ├── drcd.py
│ │ │ ├── drop.py
│ │ │ ├── ds1000.py
│ │ │ ├── eprstmt.py
│ │ │ ├── flores.py
│ │ │ ├── game24.py
│ │ │ ├── govrepcrs.py
│ │ │ ├── gsm8k.py
│ │ │ ├── hellaswag.py
│ │ │ ├── huggingface.py
│ │ │ ├── humaneval.py
│ │ │ ├── humanevalx.py
│ │ │ ├── iwslt2017.py
│ │ │ ├── jigsawmultilingual.py
│ │ │ ├── lambada.py
│ │ │ ├── lcsts.py
│ │ │ ├── leval/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── claude-100k.pred.jsonl
│ │ │ │ ├── evaluators.py
│ │ │ │ ├── leval_coursera.py
│ │ │ │ ├── leval_financial_qa.py
│ │ │ │ ├── leval_gov_report_summ.py
│ │ │ │ ├── leval_gsm100.py
│ │ │ │ ├── leval_legal_contract_qa.py
│ │ │ │ ├── leval_meeting_summ.py
│ │ │ │ ├── leval_multidoc_qa.py
│ │ │ │ ├── leval_narrattive_qa.py
│ │ │ │ ├── leval_natural_question.py
│ │ │ │ ├── leval_news_summ.py
│ │ │ │ ├── leval_paper_assistant.py
│ │ │ │ ├── leval_patent_summ.py
│ │ │ │ ├── leval_quality.py
│ │ │ │ ├── leval_review_summ.py
│ │ │ │ ├── leval_scientific_qa.py
│ │ │ │ ├── leval_topic_retrieval.py
│ │ │ │ ├── leval_tpo.py
│ │ │ │ ├── leval_tvshow_summ.py
│ │ │ │ └── turbo-16k-0613.pred.jsonl
│ │ │ ├── longbench/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── evaluators.py
│ │ │ │ ├── longbench_2wikim_qa.py
│ │ │ │ ├── longbench_dureader.py
│ │ │ │ ├── longbench_gov_report.py
│ │ │ │ ├── longbench_hotpot_qa.py
│ │ │ │ ├── longbench_lcc.py
│ │ │ │ ├── longbench_lsht.py
│ │ │ │ ├── longbench_multifieldqa_en.py
│ │ │ │ ├── longbench_multifieldqa_zh.py
│ │ │ │ ├── longbench_musique.py
│ │ │ │ ├── longbench_narrative_qa.py
│ │ │ │ ├── longbench_nq.py
│ │ │ │ ├── longbench_passage_count.py
│ │ │ │ ├── longbench_passage_retrieval_en.py
│ │ │ │ ├── longbench_passage_retrieval_zh.py
│ │ │ │ ├── longbench_qasper.py
│ │ │ │ ├── longbench_qmsum.py
│ │ │ │ ├── longbench_repobench.py
│ │ │ │ ├── longbench_trec.py
│ │ │ │ ├── longbench_trivia_qa.py
│ │ │ │ └── longbench_vcsum.py
│ │ │ ├── math.py
│ │ │ ├── mbpp.py
│ │ │ ├── mmlu.py
│ │ │ ├── multirc.py
│ │ │ ├── music_theory_bench.py
│ │ │ ├── narrativeqa.py
│ │ │ ├── natural_question.py
│ │ │ ├── obqa.py
│ │ │ ├── piqa.py
│ │ │ ├── qasper.py
│ │ │ ├── qaspercut.py
│ │ │ ├── race.py
│ │ │ ├── realtoxicprompts.py
│ │ │ ├── record.py
│ │ │ ├── safety.py
│ │ │ ├── siqa.py
│ │ │ ├── squad20.py
│ │ │ ├── storycloze.py
│ │ │ ├── strategyqa.py
│ │ │ ├── summedits.py
│ │ │ ├── summscreen.py
│ │ │ ├── tnews.py
│ │ │ ├── triviaqa.py
│ │ │ ├── triviaqarc.py
│ │ │ ├── truthfulqa.py
│ │ │ ├── tydiqa.py
│ │ │ ├── wic.py
│ │ │ ├── winograd.py
│ │ │ ├── winogrande.py
│ │ │ ├── wnli.py
│ │ │ ├── wsc.py
│ │ │ ├── xcopa.py
│ │ │ ├── xiezhi.py
│ │ │ ├── xlsum.py
│ │ │ └── xsum.py
│ │ ├── metrics/
│ │ │ ├── __init__.py
│ │ │ ├── dump_results.py
│ │ │ ├── mme_score.py
│ │ │ └── seedbench.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── base_api.py
│ │ │ ├── claude_api/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── claude_api.py
│ │ │ │ └── postprocessors.py
│ │ │ ├── glm.py
│ │ │ ├── huggingface.py
│ │ │ ├── intern_model.py
│ │ │ ├── llama2.py
│ │ │ ├── openai_api.py
│ │ │ └── turbomind.py
│ │ ├── multimodal/
│ │ │ ├── datasets/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── mmbench.py
│ │ │ │ ├── mme.py
│ │ │ │ └── seedbench.py
│ │ │ └── models/
│ │ │ ├── __init__.py
│ │ │ ├── instructblip/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── blip2_vicuna_instruct.py
│ │ │ │ ├── post_processor.py
│ │ │ │ └── prompt_constructor.py
│ │ │ ├── llama_adapter_v2_multimodal/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── llama_adapter.py
│ │ │ │ ├── post_processor.py
│ │ │ │ └── prompt_constructor.py
│ │ │ ├── llava/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── llava.py
│ │ │ │ ├── post_processor.py
│ │ │ │ └── prompt_constructor.py
│ │ │ ├── minigpt_4/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── minigpt_4.py
│ │ │ │ ├── post_processor.py
│ │ │ │ ├── prompt_constructor.py
│ │ │ │ └── utils.py
│ │ │ ├── mplug_owl/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── mplug_owl.py
│ │ │ │ ├── post_processor.py
│ │ │ │ └── prompt_constructor.py
│ │ │ ├── openflamingo/
│ │ │ │ ├── __init__.py
│ │ │ │ └── openflamingo.py
│ │ │ ├── otter/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── otter.py
│ │ │ │ ├── post_processor.py
│ │ │ │ └── prompt_constructor.py
│ │ │ ├── qwen/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── generation_utils.py
│ │ │ │ ├── post_processor.py
│ │ │ │ ├── prompt_constructor.py
│ │ │ │ └── qwen.py
│ │ │ └── visualglm/
│ │ │ ├── __init__.py
│ │ │ ├── post_processor.py
│ │ │ ├── prompt_constructor.py
│ │ │ └── visualglm.py
│ │ ├── openicl/
│ │ │ ├── __init__.py
│ │ │ ├── icl_dataset_reader.py
│ │ │ ├── icl_evaluator/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── icl_aucroc_evaluator.py
│ │ │ │ ├── icl_base_evaluator.py
│ │ │ │ ├── icl_em_evaluator.py
│ │ │ │ ├── icl_hf_evaluator.py
│ │ │ │ └── icl_toxic_evaluator.py
│ │ │ ├── icl_inferencer/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── icl_attack_inferencer.py
│ │ │ │ ├── icl_base_inferencer.py
│ │ │ │ ├── icl_clp_inferencer.py
│ │ │ │ ├── icl_gen_inferencer.py
│ │ │ │ ├── icl_ppl_inferencer.py
│ │ │ │ ├── icl_sc_inferencer.py
│ │ │ │ └── icl_tot_inferencer.py
│ │ │ ├── icl_prompt_template.py
│ │ │ ├── icl_retriever/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── icl_base_retriever.py
│ │ │ │ ├── icl_bm25_retriever.py
│ │ │ │ ├── icl_dpp_retriever.py
│ │ │ │ ├── icl_fix_k_retriever.py
│ │ │ │ ├── icl_mdl_retriever.py
│ │ │ │ ├── icl_random_retriever.py
│ │ │ │ ├── icl_topk_retriever.py
│ │ │ │ ├── icl_votek_retriever.py
│ │ │ │ └── icl_zero_retriever.py
│ │ │ └── utils/
│ │ │ ├── __init__.py
│ │ │ └── logging.py
│ │ ├── partitioners/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── mm_naive.py
│ │ │ ├── naive.py
│ │ │ └── size.py
│ │ ├── registry.py
│ │ ├── runners/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── dlc.py
│ │ │ ├── local.py
│ │ │ └── slurm.py
│ │ ├── tasks/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── llm_eval.py
│ │ │ ├── mm_infer.py
│ │ │ ├── openicl_attack.py
│ │ │ ├── openicl_eval.py
│ │ │ └── openicl_infer.py
│ │ └── utils/
│ │ ├── __init__.py
│ │ ├── abbr.py
│ │ ├── build.py
│ │ ├── collect_env.py
│ │ ├── dependency.py
│ │ ├── file.py
│ │ ├── fileio.py
│ │ ├── lark.py
│ │ ├── logging.py
│ │ ├── menu.py
│ │ ├── prompt.py
│ │ ├── run.py
│ │ ├── summarizer.py
│ │ ├── text_postprocessors.py
│ │ └── types.py
│ ├── requirements/
│ │ ├── docs.txt
│ │ └── runtime.txt
│ ├── requirements.txt
│ ├── run.py
│ ├── setup.py
│ ├── tests/
│ │ ├── dataset/
│ │ │ └── test_humaneval.py
│ │ ├── openicl/
│ │ │ └── test_prompt_template.py
│ │ └── prompt/
│ │ ├── test_api_template_parser.py
│ │ ├── test_lm_template_parser.py
│ │ └── test_prompt_list.py
│ ├── tmp/
│ │ ├── 105473_13_params.py
│ │ ├── 105473_14_params.py
│ │ ├── 105473_15_params.py
│ │ ├── 105473_16_params.py
│ │ ├── 105473_17_params.py
│ │ ├── 1109939_0_params.py
│ │ ├── 1109939_1_params.py
│ │ ├── 1109939_2_params.py
│ │ ├── 1109939_3_params.py
│ │ ├── 1109939_4_params.py
│ │ ├── 1109939_5_params.py
│ │ ├── 1109939_6_params.py
│ │ ├── 1140448_0_params.py
│ │ ├── 1140448_1_params.py
│ │ ├── 1140448_2_params.py
│ │ ├── 1140448_3_params.py
│ │ ├── 1140448_4_params.py
│ │ ├── 1140448_5_params.py
│ │ ├── 1140448_6_params.py
│ │ ├── 1140448_7_params.py
│ │ ├── 1155198_0_params.py
│ │ ├── 1155198_1_params.py
│ │ ├── 1155198_3_params.py
│ │ ├── 1155198_4_params.py
│ │ ├── 1155198_5_params.py
│ │ ├── 1155198_6_params.py
│ │ ├── 1155198_8_params.py
│ │ ├── 1271622_0_params.py
│ │ ├── 1271622_1_params.py
│ │ ├── 1271622_2_params.py
│ │ ├── 1271622_3_params.py
│ │ ├── 1271622_4_params.py
│ │ ├── 1271622_5_params.py
│ │ ├── 1271622_6_params.py
│ │ ├── 1271622_7_params.py
│ │ ├── 1422987_36_params.py
│ │ ├── 1422987_50_params.py
│ │ ├── 1422987_52_params.py
│ │ ├── 1422987_60_params.py
│ │ ├── 1422987_62_params.py
│ │ ├── 1422987_63_params.py
│ │ ├── 1422987_64_params.py
│ │ ├── 1422987_65_params.py
│ │ ├── 1469199_10_params.py
│ │ ├── 1469199_11_params.py
│ │ ├── 1469199_8_params.py
│ │ ├── 1469199_9_params.py
│ │ ├── 1621481_0_params.py
│ │ ├── 1621481_1_params.py
│ │ ├── 1621481_2_params.py
│ │ ├── 1621481_3_params.py
│ │ ├── 1621481_4_params.py
│ │ ├── 1621481_5_params.py
│ │ ├── 1740358_10_params.py
│ │ ├── 1740358_12_params.py
│ │ ├── 1740358_13_params.py
│ │ ├── 1740358_14_params.py
│ │ ├── 1849911_0_params.py
│ │ ├── 1849911_1_params.py
│ │ ├── 1883132_params.py
│ │ ├── 2182207_0_params.py
│ │ ├── 2182207_1_params.py
│ │ ├── 2182207_2_params.py
│ │ ├── 2182207_3_params.py
│ │ ├── 2182207_4_params.py
│ │ ├── 2182207_5_params.py
│ │ ├── 2182207_6_params.py
│ │ ├── 2182207_7_params.py
│ │ ├── 2182942_0_params.py
│ │ ├── 2182942_1_params.py
│ │ ├── 2182942_2_params.py
│ │ ├── 2182942_3_params.py
│ │ ├── 2182942_4_params.py
│ │ ├── 2182942_5_params.py
│ │ ├── 2182942_6_params.py
│ │ ├── 2182942_7_params.py
│ │ ├── 2672666_0_params.py
│ │ ├── 2672666_1_params.py
│ │ ├── 2672666_4_params.py
│ │ ├── 2672666_5_params.py
│ │ ├── 2672666_6_params.py
│ │ ├── 2673085_6_params.py
│ │ ├── 323384_0_params.py
│ │ ├── 323384_3_params.py
│ │ ├── 323384_6_params.py
│ │ ├── 323384_7_params.py
│ │ ├── 323384_8_params.py
│ │ ├── 323384_9_params.py
│ │ ├── 3524116_6_params.py
│ │ ├── 3524116_7_params.py
│ │ ├── 3689512_0_params.py
│ │ ├── 3689512_1_params.py
│ │ ├── 3689512_2_params.py
│ │ ├── 3689512_3_params.py
│ │ ├── 3689512_4_params.py
│ │ ├── 3689512_5_params.py
│ │ ├── 3689512_6_params.py
│ │ ├── 3689512_7_params.py
│ │ ├── 3961154_0_params.py
│ │ ├── 3961154_1_params.py
│ │ ├── 3961154_2_params.py
│ │ ├── 3961154_3_params.py
│ │ ├── 3961154_4_params.py
│ │ ├── 3961154_5_params.py
│ │ ├── 3961154_6_params.py
│ │ ├── 3961154_7_params.py
│ │ ├── 433934_0_params.py
│ │ ├── 433934_1_params.py
│ │ ├── 433934_2_params.py
│ │ ├── 433934_3_params.py
│ │ ├── 539674_params.py
│ │ ├── 544085_params.py
│ │ ├── 544730_params.py
│ │ ├── 627109_4_params.py
│ │ ├── 627109_5_params.py
│ │ ├── 688954_4_params.py
│ │ ├── 688954_5_params.py
│ │ ├── 688954_6_params.py
│ │ └── 688954_7_params.py
│ └── tools/
│ ├── case_analyzer.py
│ ├── collect_code_preds.py
│ ├── eval_mmbench.py
│ ├── list_configs.py
│ ├── prediction_merger.py
│ ├── prompt_viewer.py
│ ├── test_api_model.py
│ └── update_dataset_suffix.py
├── model/
│ ├── infer/
│ │ ├── chatmusician_web_demo.py
│ │ └── predict.py
│ └── train/
│ ├── config/
│ │ ├── ds_zero2_no_offload.json
│ │ └── ds_zero3_offload.json
│ ├── data_preprocess.py
│ ├── llama/
│ │ ├── configuration_llama.py
│ │ ├── convert_llama_weights_to_hf.py
│ │ ├── modeling_llama.py
│ │ └── tokenization_llama.py
│ ├── merge.py
│ ├── model.py
│ ├── scripts/
│ │ └── train.sh
│ ├── train.py
│ └── utils.py
└── requirements.txt
================================================
FILE CONTENTS
================================================
================================================
FILE: README.md
================================================
# 🎼 ChatMusician: Understanding and Generating Music Intrinsically with LLM
[**🌐 DemoPage**](https://ezmonyi.github.io/ChatMusician/) | [**🤗 Pretrain Dataset**](https://huggingface.co/datasets/m-a-p/MusicPile) | [**🤗 SFT Dataset**](https://huggingface.co/datasets/m-a-p/MusicPile-sft) | [**🤗 Benchmark**](https://huggingface.co/datasets/m-a-p/MusicTheoryBench) | [**📖 arXiv**](http://arxiv.org/abs/2402.16153) | [💻 **Code**](https://github.com/hf-lin/ChatMusician) | [**🤖 Chat Model**](https://huggingface.co/m-a-p/ChatMusician) | [**🤖 Base Model**](https://huggingface.co/m-a-p/ChatMusician-Base)
## 🔔News
- **🔥[2023-12-10]: The release of ChatMusician's demo, code, model, data, and benchmark. 😆**
- [2023-11-30]: Checkout another awesome project [MMMU](https://huggingface.co/datasets/MMMU/MMMU/) that includes multimodal music reasoning.
## Introduction
While Large Language Models (LLMs) demonstrate impressive capabilities in text generation,
we find that their ability has yet to be generalized to music, humanity’s creative language.
We introduce **ChatMusician**, **an open-source LLM that integrates intrinsic musical abilities**.
It is based on continual pre-training and finetuning LLaMA2 on a text-compatible music representation, ABC notation, and the music is treated as a second language. ChatMusician can understand and generate music with a pure text tokenizer without any external multi-modal neural structures or tokenizers. Interestingly, endowing musical abilities does not harm language abilities, even achieving a slightly higher MMLU score. Our model is capable of composing well-structured, full-length music, conditioned on texts, chords, melodies, motifs, musical forms, etc, surpassing GPT-4 baseline. On our meticulously curated college-level music understanding benchmark, MusicTheoryBench, ChatMusician surpasses LLaMA2 and GPT-3.5 on zero-shot setting by a noticeable
margin. Our work reveals that LLMs can be an excellent compressor for music, but there remains significant territory to be conquered. Code, data, model, and benchmark are open-sourced.
## Training Data
ChatMusician is pretrained on the 🤗 [MusicPile](https://huggingface.co/datasets/m-a-p/MusicPile), which is the first pretraining corpus for **developing musical abilities** in large language models. Check out the dataset card for more details.
And supervised finetuned on 1.1M samples(2:1 ratio between music knowledge & music summary data and music scores) from MusicPile. Check our [paper](http://arxiv.org/abs/2402.16153) for more details.
## Training Procedure
We initialized a fp16-precision ChatMusician-Base from the LLaMA2-7B-Base weights, and applied a continual pre-training plus fine-tuning pipeline. LoRA adapters were integrated into the attention and MLP layers, with additional training on embeddings and all linear layers. The maximum sequence length
was 2048. We utilized 16 80GB-A800 GPUs for one epoch pre-training and 8 32GB-V100 GPUs for two epoch fine-tuning. DeepSpeed was employed for memory efficiency, and the AdamW optimizer was used with a 1e-4 learning rate and a 5% warmup cosine scheduler. Gradient clipping was set at 1.0. The LoRA parameters dimension, alpha, and
dropout were set to 64, 16, and 0.1, with a batch size of 8.
## Evaluation
1. Music understanding abilities are evaluated on the [MusicTheoryBench](https://huggingface.co/datasets/m-a-p/MusicTheoryBench). Check out `eval` folder for more details.
2. General language abilities of ChatMusician are evaluated on the [Massive Multitask Language Understanding (MMLU) dataset](https://huggingface.co/datasets/lukaemon/mmlu).
## Requirements
- Python 3.8 and above
- Pytorch 2.0 and above are recommended
- CUDA 11.4 and above are recommended
- Deepspeed 0.10 and above are recommended
Python dependency installation:
```
pip install -r requirements.txt
```
## Inference
### web demo (with audio)
To render audio in real-time, you must install abcmidi and MuseScore.
1. Install abc2midi.
```
sudo apt-get update
sudo apt-get install abcmidi
```
2. Install MuseScore([on Linux](https://musescore.org/en/handbook/3/install-linux), [on Mac](https://musescore.org/en/handbook/3/install-macos), [on Windows](https://musescore.org/en/handbook/3/install-windows)).
Then launch a gradio demo:
```bash
cd ChatMusician/
python model/infer/chatmusician_web_demo.py -c "m-a-p/ChatMusician" --server_port 8888
```
Prompt example:
```
Using ABC notation, recreate the given text as a musical score.
Meter C
Notes The parts are commonly interchanged.
Transcription 1997 by John Chambers
Key D
Note Length 1/8
Rhythm reel
```

### inference locally
```bash
cd Chat-Musician/
python model/infer/predict.py --base_model {merged_model_path} --with_prompt --interactive
```
Note: with `--with_prompt`, input text will be converted to chat format.
## Start an Experiment
### SFT Data Format
Our SFT dataset comprises data points structured with three main features: `instruction`, `input`, and `output`. Each data point resembles a conversation between a human and an assistant, formatted as follows: `Human: {...} </s> Assistant: {...} </s>. `
For example,
{
"instruction": "Construct melodies by blending the designated musical pattern with the supplied motif.",
"input": "['Binary', 'Sectional: Verse/Chorus'];X:1 L:1/16 M:2/4 K:G ['G2BG A2cA B2dB', '(gf)(ge) (ed)(cB)' </s> ",
"output": "Assistant: X:1 L:1/16 M:2/4 K:G G2BG A2cA | B2dB G2B2 | c2ec B2dB | ABAG (GF)(ED) | G2BG A2cA | B2dB c2ec | cBAG D2f2 | g2d2B2G2 || (gf)(ge) (ed)(cB) | (gf)(ge) (ed)(cB) | ca2c Bg2B | ABAG GFED | G2BG A2cA | cBAG d2f2 | g2d2B2G2 || </s> "
}
You can explore more samples at [MusicPile-sft](https://huggingface.co/datasets/m-a-p/MusicPile-sft). We recommend structuring your data in a similar format for fine-tuning based on ChatMusician-Base.
### Data Preprocessing
Data preprocessing involves converting texts into token IDs, which helps save GPU memory compared to runtime tokenization.
```bash
cd ChatMusician
## specify `--tokenize_fn pt` for preprocessing continual pretrain data
## specify `--tokenize_fn sft` for preprocessing sft data
python model/train/data_preprocess.py \
-t $TOKENIZER_PATH \
-i $DATA_FILE \
-o $OUTPUT_DIR
```
For example, if you're using `m-a-p/ChatMusician-Base` and the dataset `m-a-p/MusicPile-sft` for supervised fine-tuning, and want to save preprocessed data in the `datasets` directory:
```bash
python model/train/data_preprocess.py \
-t m-a-p/ChatMusician-Base \
-i m-a-p/MusicPile-sft \
-o datasets \
--tokenize_fn sft
```
### Pretraining or Supervised Fine-tuning
run `model/train/scripts/train.sh $PREPROCESSED_DATASET_PATH $YOUR_MODEL_PATH`
For example, if you're fine-tuning based on `m-a-p/ChatMusician-Base` for supervised fine-tuning and your data file has been preprocessed in the `datasets` directory:
```bash
./model/train/scripts/train.sh datasets m-a-p/ChatMusician-Base
```
You can then find the tensorboard log in the `runs` directory.
## Merge Peft Model
After finetuning, you can merge the LoRa checkpoint with the original checkpoint using the following script:
```bash
cd ChatMusician/
python model/train/merge.py --ori_model_dir $BASE_MODEL --model_dir $LORA_CKPT_PATH --output_dir $OUTPUT_PATH
```
## Need Help?
If you find yourself confused or encountering any issues, feel free to create an issue on our repository for assistance.
## Limitations
- ChatMusician currently only supports strict format and close-ended instructions for the music tasks. If we have more funding, we plan to create a more diverse multi-turn music instruction chat data for better generalization.
- ChatMusician suffers from hallucinations, and shouldn't be used for music education. It could be improved by feeding more music textbooks, blogs, etc. And RLHF may help, too.
- A large portion of the training data is in the style of Irish music. If possible, the community should develop a converter between performance midi and ABC scores, so that we can include more established midi datasets.
- The MusicThoeryBench results reported in the paper are obtained with perplexity mode. Direct generation may result in a worse performance.
- We observe that using the current version of training data, ChatMusician presents a weak in-context-learning and chain-of-thoughts ability. The community should work on improving the music data quality.
## Citation
If you find our work helpful, feel free to give us a cite.
```
@misc{yuan2024chatmusician,
title={ChatMusician: Understanding and Generating Music Intrinsically with LLM},
author={Ruibin Yuan and Hanfeng Lin and Yi Wang and Zeyue Tian and Shangda Wu and Tianhao Shen and Ge Zhang and Yuhang Wu and Cong Liu and Ziya Zhou and Ziyang Ma and Liumeng Xue and Ziyu Wang and Qin Liu and Tianyu Zheng and Yizhi Li and Yinghao Ma and Yiming Liang and Xiaowei Chi and Ruibo Liu and Zili Wang and Pengfei Li and Jingcheng Wu and Chenghua Lin and Qifeng Liu and Tao Jiang and Wenhao Huang and Wenhu Chen and Emmanouil Benetos and Jie Fu and Gus Xia and Roger Dannenberg and Wei Xue and Shiyin Kang and Yike Guo},
year={2024},
eprint={2402.16153},
archivePrefix={arXiv},
primaryClass={cs.SD}
}
```
================================================
FILE: eval/LICENSE
================================================
Copyright 2020 OpenCompass Authors. All rights reserved.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2020 OpenCompass Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: eval/README.md
================================================
# Evaluation with Massive Multitask Language Understanding (MMLU) Benchmark and MusicTheoryBench
## Installation
Below are the steps for quick installation and datasets preparation.
```Python
conda create --name opencompass python=3.10 pytorch torchvision pytorch-cuda -c nvidia -c pytorch -y
conda activate opencompass
pip install -e .
# Download dataset to data/ folder
wget https://github.com/open-compass/opencompass/releases/download/0.2.2.rc1/OpenCompassData-core-20240207.zip
unzip OpenCompassData-core-20240207.zip
```
## ️Evaluation
After ensuring that OpenCompass is installed correctly according to the above steps and the datasets are prepared, you can evaluate the performance of our ChatMusician model on the MMLU and MusicTheoryBench datasets using the following command:
```bash
python run.py configs/eval_chat_musician_7b.py
```
================================================
FILE: eval/configs/datasets/ARC_c/ARC_c_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .ARC_c_gen_1e0de5 import ARC_c_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/ARC_c/ARC_c_gen_1e0de5.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import ARCDataset
from opencompass.utils.text_postprocessors import first_option_postprocess
ARC_c_reader_cfg = dict(
input_columns=["question", "textA", "textB", "textC", "textD"],
output_column="answerKey")
ARC_c_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(
round=[
dict(
role="HUMAN",
prompt=
"Question: {question}\nA. {textA}\nB. {textB}\nC. {textC}\nD. {textD}\nAnswer:"
)
], ),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
ARC_c_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_option_postprocess, options='ABCD'),
)
ARC_c_datasets = [
dict(
abbr="ARC-c",
type=ARCDataset,
path="./data/ARC/ARC-c/ARC-Challenge-Dev.jsonl",
reader_cfg=ARC_c_reader_cfg,
infer_cfg=ARC_c_infer_cfg,
eval_cfg=ARC_c_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/ARC_c/ARC_c_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .ARC_c_ppl_a450bd import ARC_c_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/ARC_c/ARC_c_ppl_2ef631.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import ARCDataset
ARC_c_reader_cfg = dict(
input_columns=['question', 'textA', 'textB', 'textC', 'textD'],
output_column='answerKey')
ARC_c_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
opt: dict(
round=[
dict(role="HUMAN", prompt=f"{{question}}\nA. {{textA}}\nB. {{textB}}\nC. {{textC}}\nD. {{textD}}"),
dict(role="BOT", prompt=f"Answer: {opt}"),
]
) for opt in ["A", "B", "C", "D"]
},
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
ARC_c_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
ARC_c_datasets = [
dict(
type=ARCDataset,
abbr='ARC-c',
path='./data/ARC/ARC-c/ARC-Challenge-Dev.jsonl',
reader_cfg=ARC_c_reader_cfg,
infer_cfg=ARC_c_infer_cfg,
eval_cfg=ARC_c_eval_cfg)
]
================================================
FILE: eval/configs/datasets/ARC_c/ARC_c_ppl_a450bd.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import ARCDataset
ARC_c_reader_cfg = dict(
input_columns=['question', 'textA', 'textB', 'textC', 'textD'],
output_column='answerKey')
ARC_c_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
"A":
dict(
round=[
dict(role="HUMAN", prompt="Question: {question}\nAnswer: "),
dict(role="BOT", prompt="{textA}")
], ),
"B":
dict(
round=[
dict(role="HUMAN", prompt="Question: {question}\nAnswer: "),
dict(role="BOT", prompt="{textB}")
], ),
"C":
dict(
round=[
dict(role="HUMAN", prompt="Question: {question}\nAnswer: "),
dict(role="BOT", prompt="{textC}")
], ),
"D":
dict(
round=[
dict(role="HUMAN", prompt="Question: {question}\nAnswer: "),
dict(role="BOT", prompt="{textD}")
], ),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
ARC_c_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
ARC_c_datasets = [
dict(
type=ARCDataset,
abbr='ARC-c',
path='./data/ARC/ARC-c/ARC-Challenge-Dev.jsonl',
reader_cfg=ARC_c_reader_cfg,
infer_cfg=ARC_c_infer_cfg,
eval_cfg=ARC_c_eval_cfg)
]
================================================
FILE: eval/configs/datasets/ARC_c/ARC_c_ppl_d52a21.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import ARCDataset
ARC_c_reader_cfg = dict(
input_columns=['question', 'textA', 'textB', 'textC', 'textD'],
output_column='answerKey')
ARC_c_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
"A": "Question: {question}\nAnswer: {textA}",
"B": "Question: {question}\nAnswer: {textB}",
"C": "Question: {question}\nAnswer: {textC}",
"D": "Question: {question}\nAnswer: {textD}"
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
ARC_c_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
ARC_c_datasets = [
dict(
type=ARCDataset,
abbr='ARC-c',
path='./data/ARC/ARC-c/ARC-Challenge-Dev.jsonl',
reader_cfg=ARC_c_reader_cfg,
infer_cfg=ARC_c_infer_cfg,
eval_cfg=ARC_c_eval_cfg)
]
================================================
FILE: eval/configs/datasets/ARC_e/ARC_e_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .ARC_e_gen_1e0de5 import ARC_e_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/ARC_e/ARC_e_gen_1e0de5.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import ARCDataset
from opencompass.utils.text_postprocessors import first_option_postprocess
ARC_e_reader_cfg = dict(
input_columns=["question", "textA", "textB", "textC", "textD"],
output_column="answerKey")
ARC_e_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(
round=[
dict(
role="HUMAN",
prompt=
"Question: {question}\nA. {textA}\nB. {textB}\nC. {textC}\nD. {textD}\nAnswer:"
)
], ),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
ARC_e_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_option_postprocess, options='ABCD'),
)
ARC_e_datasets = [
dict(
abbr="ARC-e",
type=ARCDataset,
path="./data/ARC/ARC-e/ARC-Easy-Dev.jsonl",
reader_cfg=ARC_e_reader_cfg,
infer_cfg=ARC_e_infer_cfg,
eval_cfg=ARC_e_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/ARC_e/ARC_e_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .ARC_e_ppl_a450bd import ARC_e_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/ARC_e/ARC_e_ppl_2ef631.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import ARCDataset
ARC_e_reader_cfg = dict(
input_columns=['question', 'textA', 'textB', 'textC', 'textD'],
output_column='answerKey')
ARC_e_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
opt: dict(
round=[
dict(role="HUMAN", prompt=f"{{question}}\nA. {{textA}}\nB. {{textB}}\nC. {{textC}}\nD. {{textD}}"),
dict(role="BOT", prompt=f"Answer: {opt}"),
]
) for opt in ["A", "B", "C", "D"]
},
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
ARC_e_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
ARC_e_datasets = [
dict(
type=ARCDataset,
abbr='ARC-e',
path='./data/ARC/ARC-e/ARC-Easy-Dev.jsonl',
reader_cfg=ARC_e_reader_cfg,
infer_cfg=ARC_e_infer_cfg,
eval_cfg=ARC_e_eval_cfg)
]
================================================
FILE: eval/configs/datasets/ARC_e/ARC_e_ppl_a450bd.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import ARCDataset
ARC_e_reader_cfg = dict(
input_columns=['question', 'textA', 'textB', 'textC', 'textD'],
output_column='answerKey')
ARC_e_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
"A":
dict(
round=[
dict(role="HUMAN", prompt="Question: {question}\nAnswer: "),
dict(role="BOT", prompt="{textA}")
], ),
"B":
dict(
round=[
dict(role="HUMAN", prompt="Question: {question}\nAnswer: "),
dict(role="BOT", prompt="{textB}")
], ),
"C":
dict(
round=[
dict(role="HUMAN", prompt="Question: {question}\nAnswer: "),
dict(role="BOT", prompt="{textC}")
], ),
"D":
dict(
round=[
dict(role="HUMAN", prompt="Question: {question}\nAnswer: "),
dict(role="BOT", prompt="{textD}")
], ),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
ARC_e_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
ARC_e_datasets = [
dict(
type=ARCDataset,
abbr='ARC-e',
path='./data/ARC/ARC-e/ARC-Easy-Dev.jsonl',
reader_cfg=ARC_e_reader_cfg,
infer_cfg=ARC_e_infer_cfg,
eval_cfg=ARC_e_eval_cfg)
]
================================================
FILE: eval/configs/datasets/ARC_e/ARC_e_ppl_d52a21.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import ARCDataset
ARC_e_reader_cfg = dict(
input_columns=['question', 'textA', 'textB', 'textC', 'textD'],
output_column='answerKey')
ARC_e_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
"A": "Question: {question}\nAnswer: {textA}",
"B": "Question: {question}\nAnswer: {textB}",
"C": "Question: {question}\nAnswer: {textC}",
"D": "Question: {question}\nAnswer: {textD}"
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
ARC_e_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
ARC_e_datasets = [
dict(
type=ARCDataset,
abbr='ARC-e',
path='./data/ARC/ARC-e/ARC-Easy-Dev.jsonl',
reader_cfg=ARC_e_reader_cfg,
infer_cfg=ARC_e_infer_cfg,
eval_cfg=ARC_e_eval_cfg)
]
================================================
FILE: eval/configs/datasets/CLUE_C3/CLUE_C3_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .CLUE_C3_gen_8c358f import C3_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/CLUE_C3/CLUE_C3_gen_8c358f.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import C3Dataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
C3_reader_cfg = dict(
input_columns=[
"question",
"content",
"choice0",
"choice1",
"choice2",
"choice3",
"choices",
],
output_column="label",
)
C3_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"{content}\n问:{question}\nA. {choice0}\nB. {choice1}\nC. {choice2}\nD. {choice3}\n请从“A”,“B”,“C”,“D”中进行选择。\n答:",
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
C3_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
C3_datasets = [
dict(
abbr="C3",
type=C3Dataset_V2,
path="./data/CLUE/C3/dev_0.json",
reader_cfg=C3_reader_cfg,
infer_cfg=C3_infer_cfg,
eval_cfg=C3_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/CLUE_C3/CLUE_C3_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .CLUE_C3_ppl_e24a31 import C3_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/CLUE_C3/CLUE_C3_ppl_56b537.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import C3Dataset
C3_reader_cfg = dict(
input_columns=[
'question', 'content', 'choice0', 'choice1', 'choice2', 'choice3',
'choices'
],
output_column='label')
C3_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0: "文章:{content}\n问题:{question}\n答案:{choice0}",
1: "文章:{content}\n问题:{question}\n答案:{choice1}",
2: "文章:{content}\n问题:{question}\n答案:{choice2}",
3: "文章:{content}\n问题:{question}\n答案:{choice3}"
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
C3_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
C3_datasets = [
dict(
type=C3Dataset,
abbr='C3',
path='./data/CLUE/C3/dev_0.json',
reader_cfg=C3_reader_cfg,
infer_cfg=C3_infer_cfg,
eval_cfg=C3_eval_cfg)
]
================================================
FILE: eval/configs/datasets/CLUE_C3/CLUE_C3_ppl_e24a31.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import C3Dataset
C3_reader_cfg = dict(
input_columns=[
'question', 'content', 'choice0', 'choice1', 'choice2', 'choice3',
'choices'
],
output_column='label')
C3_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
i: dict(round=[
dict(role="HUMAN", prompt="文章:{content}\n问题:{question}"),
dict(role="BOT", prompt=f"答案:{{choice{i}}}")
])
for i in range(4)
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
C3_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
C3_datasets = [
dict(
type=C3Dataset,
abbr='C3',
path='./data/CLUE/C3/dev_0.json',
reader_cfg=C3_reader_cfg,
infer_cfg=C3_infer_cfg,
eval_cfg=C3_eval_cfg)
]
================================================
FILE: eval/configs/datasets/CLUE_CMRC/CLUE_CMRC_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .CLUE_CMRC_gen_1bd3c8 import CMRC_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/CLUE_CMRC/CLUE_CMRC_gen_1bd3c8.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import EMEvaluator
from opencompass.datasets import CMRCDataset, cmrc_postprocess
CMRC_reader_cfg = dict(
input_columns=['question', 'context'], output_column='answers')
CMRC_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt="根据文章回答问题。你的答案应该尽可能简练,请以 ‘答案是’ 开头的句式作答。\n文章:{context}\n问:{question}\n答:"),
])),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer))
CMRC_eval_cfg = dict(
evaluator=dict(type=EMEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=cmrc_postprocess),
)
CMRC_datasets = [
dict(
type=CMRCDataset,
abbr='CMRC_dev',
path='./data/CLUE/CMRC/dev.json',
reader_cfg=CMRC_reader_cfg,
infer_cfg=CMRC_infer_cfg,
eval_cfg=CMRC_eval_cfg),
]
================================================
FILE: eval/configs/datasets/CLUE_CMRC/CLUE_CMRC_gen_3749cd.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import EMEvaluator
from opencompass.datasets import CMRCDataset
CMRC_reader_cfg = dict(
input_columns=['question', 'context'], output_column='answers')
CMRC_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(role="HUMAN", prompt="文章:{context}\n根据上文,回答如下问题:{question}"),
dict(role="BOT", prompt="答:"),
])),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer))
CMRC_eval_cfg = dict(
evaluator=dict(type=EMEvaluator),
pred_role="BOT",
)
CMRC_datasets = [
dict(
type=CMRCDataset,
abbr='CMRC_dev',
path='./data/CLUE/CMRC/dev.json',
reader_cfg=CMRC_reader_cfg,
infer_cfg=CMRC_infer_cfg,
eval_cfg=CMRC_eval_cfg),
]
================================================
FILE: eval/configs/datasets/CLUE_CMRC/CLUE_CMRC_gen_8484b9.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import EMEvaluator
from opencompass.datasets import CMRCDataset
CMRC_reader_cfg = dict(
input_columns=['question', 'context'], output_column='answers')
CMRC_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template="文章:{context}\n根据上文,回答如下问题: {question}\n答:"),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer))
CMRC_eval_cfg = dict(evaluator=dict(type=EMEvaluator), )
CMRC_datasets = [
dict(
type=CMRCDataset,
abbr='CMRC_dev',
path='./data/CLUE/CMRC/dev.json',
reader_cfg=CMRC_reader_cfg,
infer_cfg=CMRC_infer_cfg,
eval_cfg=CMRC_eval_cfg),
]
================================================
FILE: eval/configs/datasets/CLUE_CMRC/CLUE_CMRC_gen_941108.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import EMEvaluator
from opencompass.datasets import CMRCDataset
CMRC_reader_cfg = dict(
input_columns=['question', 'context'], output_column='answers')
CMRC_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt="文章:{context}\n根据上文,回答如下问题:\n{question}\n答:"),
])),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer))
CMRC_eval_cfg = dict(
evaluator=dict(type=EMEvaluator),
pred_role="BOT",
)
CMRC_datasets = [
dict(
type=CMRCDataset,
abbr='CMRC_dev',
path='./data/CLUE/CMRC/dev.json',
reader_cfg=CMRC_reader_cfg,
infer_cfg=CMRC_infer_cfg,
eval_cfg=CMRC_eval_cfg),
]
================================================
FILE: eval/configs/datasets/CLUE_DRCD/CLUE_DRCD_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .CLUE_DRCD_gen_1bd3c8 import DRCD_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/CLUE_DRCD/CLUE_DRCD_gen_1bd3c8.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import EMEvaluator
from opencompass.datasets import DRCDDataset, drcd_postprocess
DRCD_reader_cfg = dict(
input_columns=['question', 'context'], output_column='answers')
DRCD_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt="根据文章回答问题。你的答案应该尽可能简练,请以 ‘答案是’ 开头的句式作答。\n文章:{context}\n问:{question}\n答:"),
])),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer))
DRCD_eval_cfg = dict(
evaluator=dict(type=EMEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=drcd_postprocess),
)
DRCD_datasets = [
dict(
type=DRCDDataset,
abbr='DRCD_dev',
path='./data/CLUE/DRCD/dev.json',
reader_cfg=DRCD_reader_cfg,
infer_cfg=DRCD_infer_cfg,
eval_cfg=DRCD_eval_cfg),
]
================================================
FILE: eval/configs/datasets/CLUE_DRCD/CLUE_DRCD_gen_3749cd.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import EMEvaluator
from opencompass.datasets import DRCDDataset
DRCD_reader_cfg = dict(
input_columns=['question', 'context'], output_column='answers')
DRCD_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(role="HUMAN", prompt="文章:{context}\n根据上文,回答如下问题:{question}"),
dict(role="BOT", prompt="答:"),
])),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer))
DRCD_eval_cfg = dict(
evaluator=dict(type=EMEvaluator),
pred_role="BOT",
)
DRCD_datasets = [
dict(
type=DRCDDataset,
abbr='DRCD_dev',
path='./data/CLUE/DRCD/dev.json',
reader_cfg=DRCD_reader_cfg,
infer_cfg=DRCD_infer_cfg,
eval_cfg=DRCD_eval_cfg),
]
================================================
FILE: eval/configs/datasets/CLUE_DRCD/CLUE_DRCD_gen_8484b9.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import EMEvaluator
from opencompass.datasets import DRCDDataset
DRCD_reader_cfg = dict(
input_columns=['question', 'context'], output_column='answers')
DRCD_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template="文章:{context}\n根据上文,回答如下问题: {question}\n答:"),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer))
DRCD_eval_cfg = dict(evaluator=dict(type=EMEvaluator), )
DRCD_datasets = [
dict(
type=DRCDDataset,
abbr='DRCD_dev',
path='./data/CLUE/DRCD/dev.json',
reader_cfg=DRCD_reader_cfg,
infer_cfg=DRCD_infer_cfg,
eval_cfg=DRCD_eval_cfg),
]
================================================
FILE: eval/configs/datasets/CLUE_DRCD/CLUE_DRCD_gen_941108.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import EMEvaluator
from opencompass.datasets import DRCDDataset
DRCD_reader_cfg = dict(
input_columns=['question', 'context'], output_column='answers')
DRCD_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt="文章:{context}\n根据上文,回答如下问题:\n{question}\n答:"),
])),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer))
DRCD_eval_cfg = dict(
evaluator=dict(type=EMEvaluator),
pred_role="BOT",
)
DRCD_datasets = [
dict(
type=DRCDDataset,
abbr='DRCD_dev',
path='./data/CLUE/DRCD/dev.json',
reader_cfg=DRCD_reader_cfg,
infer_cfg=DRCD_infer_cfg,
eval_cfg=DRCD_eval_cfg),
]
================================================
FILE: eval/configs/datasets/CLUE_afqmc/CLUE_afqmc_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .CLUE_afqmc_gen_901306 import afqmc_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/CLUE_afqmc/CLUE_afqmc_gen_901306.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import AFQMCDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
afqmc_reader_cfg = dict(
input_columns=["sentence1", "sentence2"],
output_column="label",
test_split="train")
afqmc_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"语句一:“{sentence1}”\n语句二:“{sentence2}”\n语句一与语句二是关于蚂蚁金融产品的疑问,两者所询问的内容是否完全一致?\nA. 不完全一致\nB. 完全一致\n请从“A”,“B”中进行选择。\n答:",
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
afqmc_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
afqmc_datasets = [
dict(
abbr="afqmc-dev",
type=AFQMCDataset_V2,
path="./data/CLUE/AFQMC/dev.json",
reader_cfg=afqmc_reader_cfg,
infer_cfg=afqmc_infer_cfg,
eval_cfg=afqmc_eval_cfg,
),
]
================================================
FILE: eval/configs/datasets/CLUE_afqmc/CLUE_afqmc_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .CLUE_afqmc_ppl_6507d7 import afqmc_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/CLUE_afqmc/CLUE_afqmc_ppl_378c5b.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
afqmc_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'],
output_column='label',
test_split='train')
afqmc_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0:
dict(round=[
dict(
role="HUMAN", prompt="“{sentence1}”与“{sentence2}”不同还是相似?"),
dict(role="BOT", prompt="不同。")
]),
1:
dict(round=[
dict(
role="HUMAN", prompt="“{sentence1}”与“{sentence2}”不同还是相似?"),
dict(role="BOT", prompt="相似")
]),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
afqmc_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
afqmc_datasets = [
dict(
type=HFDataset,
abbr='afqmc-dev',
path='json',
data_files='./data/CLUE/AFQMC/dev.json',
split='train',
reader_cfg=afqmc_reader_cfg,
infer_cfg=afqmc_infer_cfg,
eval_cfg=afqmc_eval_cfg),
]
================================================
FILE: eval/configs/datasets/CLUE_afqmc/CLUE_afqmc_ppl_6507d7.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
afqmc_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'],
output_column='label',
test_split='train')
afqmc_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0:
dict(round=[
dict(
role="HUMAN",
prompt=
"语句一:“{sentence1}”\n语句二:“{sentence2}”\n语句一与语句二是关于蚂蚁金融产品的疑问,两者所询问的内容是否完全一致?"
),
dict(role="BOT", prompt="不完全一致")
]),
1:
dict(round=[
dict(
role="HUMAN",
prompt=
"语句一:“{sentence1}”\n语句二:“{sentence2}”\n语句一与语句二是关于蚂蚁金融产品的疑问,两者所询问的内容是否完全一致?"
),
dict(role="BOT", prompt="完全一致")
]),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
afqmc_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
afqmc_datasets = [
dict(
type=HFDataset,
abbr='afqmc-dev',
path='json',
data_files='./data/CLUE/AFQMC/dev.json',
split='train',
reader_cfg=afqmc_reader_cfg,
infer_cfg=afqmc_infer_cfg,
eval_cfg=afqmc_eval_cfg),
]
================================================
FILE: eval/configs/datasets/CLUE_afqmc/CLUE_afqmc_ppl_7b0c1e.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
afqmc_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'],
output_column='label',
test_split='train')
afqmc_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0: "{sentence1},{sentence2}不同。",
1: "{sentence1},{sentence2}相似。"
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
afqmc_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
afqmc_datasets = [
dict(
type=HFDataset,
abbr='afqmc-dev',
path='json',
data_files='./data/CLUE/AFQMC/dev.json',
split='train',
reader_cfg=afqmc_reader_cfg,
infer_cfg=afqmc_infer_cfg,
eval_cfg=afqmc_eval_cfg),
]
================================================
FILE: eval/configs/datasets/CLUE_cmnli/CLUE_cmnli_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .CLUE_cmnli_gen_1abf97 import cmnli_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/CLUE_cmnli/CLUE_cmnli_gen_1abf97.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import cmnliDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
cmnli_reader_cfg = dict(
input_columns=["sentence1", "sentence2"],
output_column="label",
test_split="train")
cmnli_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"语句一:“{sentence1}”\n语句二:“{sentence2}”\n请问这两句话是什么关系?\nA. 蕴含\nB. 矛盾\nC. 无关\n请从“A”,“B”,“C”中进行选择。\n答:"
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
cmnli_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
cmnli_datasets = [
dict(
abbr="cmnli",
type=cmnliDataset_V2,
path="./data/CLUE/cmnli/cmnli_public/dev.json",
reader_cfg=cmnli_reader_cfg,
infer_cfg=cmnli_infer_cfg,
eval_cfg=cmnli_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/CLUE_cmnli/CLUE_cmnli_gen_51e956.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import cmnliDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
cmnli_reader_cfg = dict(
input_columns=["sentence1", "sentence2"],
output_column="label",
test_split="train")
cmnli_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"阅读文章:{sentence1}\n根据上文,回答如下问题:{sentence2}\nA. 对\nB. 错\nC. 可能\n请从“A”,“B”,“C”中进行选择。\n答:"
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
cmnli_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
cmnli_datasets = [
dict(
abbr="cmnli",
type=cmnliDataset_V2,
path="./data/CLUE/cmnli/cmnli_public/dev.json",
reader_cfg=cmnli_reader_cfg,
infer_cfg=cmnli_infer_cfg,
eval_cfg=cmnli_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/CLUE_cmnli/CLUE_cmnli_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .CLUE_cmnli_ppl_fdc6de import cmnli_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/CLUE_cmnli/CLUE_cmnli_ppl_98dd6e.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
cmnli_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'],
output_column='label',
test_split='train')
cmnli_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'contradiction':
'阅读文章:{sentence1}\n根据上文,回答如下问题: {sentence2}?\n答:错',
'entailment': '阅读文章:{sentence1}\n根据上文,回答如下问题: {sentence2}?\n答:对',
'neutral': '如果{sentence1}为真,那么{sentence2}也为真吗?可能'
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
cmnli_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
cmnli_datasets = [
dict(
type=HFDataset,
abbr='cmnli',
path='json',
split='train',
data_files='./data/CLUE/cmnli/cmnli_public/dev.json',
reader_cfg=cmnli_reader_cfg,
infer_cfg=cmnli_infer_cfg,
eval_cfg=cmnli_eval_cfg)
]
================================================
FILE: eval/configs/datasets/CLUE_cmnli/CLUE_cmnli_ppl_ef69e7.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
cmnli_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'],
output_column='label',
test_split='train')
cmnli_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'contradiction':
dict(round=[
dict(
role="HUMAN",
prompt="阅读文章:{sentence1}\n根据上文,回答如下问题:{sentence2}?"),
dict(role="BOT", prompt="错")
]),
'entailment':
dict(round=[
dict(
role="HUMAN",
prompt="阅读文章:{sentence1}\n根据上文,回答如下问题:{sentence2}?"),
dict(role="BOT", prompt="对")
]),
'neutral':
dict(round=[
dict(
role="HUMAN", prompt="如果{sentence1}为真,那么{sentence2}也为真吗?"),
dict(role="BOT", prompt="可能")
]),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
cmnli_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
cmnli_datasets = [
dict(
type=HFDataset,
abbr='cmnli',
path='json',
split='train',
data_files='./data/CLUE/cmnli/cmnli_public/dev.json',
reader_cfg=cmnli_reader_cfg,
infer_cfg=cmnli_infer_cfg,
eval_cfg=cmnli_eval_cfg)
]
================================================
FILE: eval/configs/datasets/CLUE_cmnli/CLUE_cmnli_ppl_fdc6de.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
cmnli_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'],
output_column='label',
test_split='train')
cmnli_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'contradiction':
dict(round=[
dict(
role="HUMAN",
prompt="语句一:“{sentence1}”\n语句二:“{sentence2}”\n请问这两句话是什么关系?"
),
dict(role="BOT", prompt="矛盾")
]),
'entailment':
dict(round=[
dict(
role="HUMAN",
prompt="语句一:“{sentence1}”\n语句二:“{sentence2}”\n请问这两句话是什么关系?"
),
dict(role="BOT", prompt="蕴含")
]),
'neutral':
dict(round=[
dict(
role="HUMAN",
prompt="语句一:“{sentence1}”\n语句二:“{sentence2}”\n请问这两句话是什么关系?"
),
dict(role="BOT", prompt="无关")
]),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
cmnli_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
cmnli_datasets = [
dict(
type=HFDataset,
abbr='cmnli',
path='json',
split='train',
data_files='./data/CLUE/cmnli/cmnli_public/dev.json',
reader_cfg=cmnli_reader_cfg,
infer_cfg=cmnli_infer_cfg,
eval_cfg=cmnli_eval_cfg)
]
================================================
FILE: eval/configs/datasets/CLUE_ocnli/CLUE_ocnli_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .CLUE_ocnli_gen_c4cb6c import ocnli_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/CLUE_ocnli/CLUE_ocnli_gen_51e956.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import cmnliDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
ocnli_reader_cfg = dict(
input_columns=["sentence1", "sentence2"],
output_column="label",
)
# TODO: two prompt templates for ocnli
ocnli_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"阅读文章:{sentence1}\n根据上文,回答如下问题:{sentence2}\nA. 对\nB. 错\nC. 可能\n请从“A”,“B”,“C”中进行选择。\n答:"
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
ocnli_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
ocnli_datasets = [
dict(
abbr="ocnli",
type=cmnliDataset_V2, # ocnli share the same format with cmnli
path="./data/CLUE/OCNLI/dev.json",
reader_cfg=ocnli_reader_cfg,
infer_cfg=ocnli_infer_cfg,
eval_cfg=ocnli_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/CLUE_ocnli/CLUE_ocnli_gen_c4cb6c.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import cmnliDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
ocnli_reader_cfg = dict(
input_columns=["sentence1", "sentence2"],
output_column="label",
)
# TODO: two prompt templates for ocnli
ocnli_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"语句一:“{sentence1}”\n语句二:“{sentence2}”\n请问这两句话是什么关系?\nA. 蕴含\n B. 矛盾\n C. 无关\n请从“A”,“B”,“C”中进行选择。\n答:"
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
ocnli_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
ocnli_datasets = [
dict(
abbr="ocnli",
type=cmnliDataset_V2, # ocnli share the same format with cmnli
path="./data/CLUE/OCNLI/dev.json",
reader_cfg=ocnli_reader_cfg,
infer_cfg=ocnli_infer_cfg,
eval_cfg=ocnli_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/CLUE_ocnli/CLUE_ocnli_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .CLUE_ocnli_ppl_fdc6de import ocnli_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/CLUE_ocnli/CLUE_ocnli_ppl_98dd6e.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
ocnli_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'], output_column='label')
# TODO: two prompt templates for ocnli
ocnli_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'contradiction':
'阅读文章:{sentence1}\n根据上文,回答如下问题: {sentence2}?\n答:错',
'entailment': '阅读文章:{sentence1}\n根据上文,回答如下问题: {sentence2}?\n答:对',
'neutral': '如果{sentence1}为真,那么{sentence2}也为真吗?可能'
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
ocnli_eval_cfg = dict(evaluator=dict(type=AccEvaluator), )
ocnli_datasets = [
dict(
type=HFDataset,
abbr='ocnli',
path='json',
split='train',
data_files='./data/CLUE/OCNLI/dev.json',
reader_cfg=ocnli_reader_cfg,
infer_cfg=ocnli_infer_cfg,
eval_cfg=ocnli_eval_cfg)
]
================================================
FILE: eval/configs/datasets/CLUE_ocnli/CLUE_ocnli_ppl_ef69e7.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
ocnli_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'], output_column='label')
# TODO: two prompt templates for ocnli
ocnli_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'contradiction':
dict(round=[
dict(
role="HUMAN",
prompt="阅读文章:{sentence1}\n根据上文,回答如下问题:{sentence2}?"),
dict(role="BOT", prompt="错")
]),
'entailment':
dict(round=[
dict(
role="HUMAN",
prompt="阅读文章:{sentence1}\n根据上文,回答如下问题:{sentence2}?"),
dict(role="BOT", prompt="对")
]),
'neutral':
dict(round=[
dict(
role="HUMAN", prompt="如果{sentence1}为真,那么{sentence2}也为真吗?"),
dict(role="BOT", prompt="可能")
]),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
ocnli_eval_cfg = dict(evaluator=dict(type=AccEvaluator), )
ocnli_datasets = [
dict(
type=HFDataset,
abbr='ocnli',
path='json',
split='train',
data_files='./data/CLUE/OCNLI/dev.json',
reader_cfg=ocnli_reader_cfg,
infer_cfg=ocnli_infer_cfg,
eval_cfg=ocnli_eval_cfg)
]
================================================
FILE: eval/configs/datasets/CLUE_ocnli/CLUE_ocnli_ppl_fdc6de.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
ocnli_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'], output_column='label')
# TODO: two prompt templates for ocnli
ocnli_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'contradiction':
dict(round=[
dict(
role="HUMAN",
prompt="语句一:“{sentence1}”\n语句二:“{sentence2}”\n请问这两句话是什么关系?"
),
dict(role="BOT", prompt="矛盾")
]),
'entailment':
dict(round=[
dict(
role="HUMAN",
prompt="语句一:“{sentence1}”\n语句二:“{sentence2}”\n请问这两句话是什么关系?"
),
dict(role="BOT", prompt="蕴含")
]),
'neutral':
dict(round=[
dict(
role="HUMAN",
prompt="语句一:“{sentence1}”\n语句二:“{sentence2}”\n请问这两句话是什么关系?"
),
dict(role="BOT", prompt="无关")
]),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
ocnli_eval_cfg = dict(evaluator=dict(type=AccEvaluator), )
ocnli_datasets = [
dict(
type=HFDataset,
abbr='ocnli',
path='json',
split='train',
data_files='./data/CLUE/OCNLI/dev.json',
reader_cfg=ocnli_reader_cfg,
infer_cfg=ocnli_infer_cfg,
eval_cfg=ocnli_eval_cfg)
]
================================================
FILE: eval/configs/datasets/FewCLUE_bustm/FewCLUE_bustm_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .FewCLUE_bustm_gen_634f41 import bustm_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/FewCLUE_bustm/FewCLUE_bustm_gen_634f41.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import AFQMCDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
bustm_reader_cfg = dict(
input_columns=["sentence1", "sentence2"],
output_column="label",
test_split="train")
bustm_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"语句一:“{sentence1}”\n语句二:“{sentence2}”\n请判断语句一和语句二说的是否是一个意思?\nA. 无关\nB. 相关\n请从“A”,“B”中进行选择。\n答:",
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
bustm_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
bustm_datasets = [
dict(
abbr="bustm-dev",
type=AFQMCDataset_V2, # bustm share the same format with AFQMC
path="./data/FewCLUE/bustm/dev_few_all.json",
reader_cfg=bustm_reader_cfg,
infer_cfg=bustm_infer_cfg,
eval_cfg=bustm_eval_cfg,
),
dict(
abbr="bustm-test",
type=AFQMCDataset_V2, # bustm share the same format with AFQMC
path="./data/FewCLUE/bustm/test_public.json",
reader_cfg=bustm_reader_cfg,
infer_cfg=bustm_infer_cfg,
eval_cfg=bustm_eval_cfg,
),
]
================================================
FILE: eval/configs/datasets/FewCLUE_bustm/FewCLUE_bustm_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .FewCLUE_bustm_ppl_e53034 import bustm_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/FewCLUE_bustm/FewCLUE_bustm_ppl_4b16c0.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
bustm_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'],
output_column='label',
test_split='train')
bustm_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0:
dict(
begin=[
dict(
role='SYSTEM',
fallback_role='HUMAN',
prompt="请判断以下两句话说的是否是一个意思:")
],
round=[
dict(role="HUMAN", prompt="{sentence1},{sentence2}"),
dict(role="BOT", prompt="两句话说的毫不相关。")
]),
1:
dict(
begin=[
dict(
role='SYSTEM',
fallback_role='HUMAN',
prompt="请判断以下两句话说的是否是一个意思:")
],
round=[
dict(role="HUMAN", prompt="{sentence1},{sentence2}"),
dict(role="BOT", prompt="两句话说是的一个意思。")
]),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
bustm_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
bustm_datasets = [
dict(
type=HFDataset,
abbr='bustm-dev',
path='json',
data_files='./data/FewCLUE/bustm/dev_few_all.json',
split='train',
reader_cfg=bustm_reader_cfg,
infer_cfg=bustm_infer_cfg,
eval_cfg=bustm_eval_cfg),
dict(
type=HFDataset,
abbr='bustm-test',
path='json',
data_files='./data/FewCLUE/bustm/test_public.json',
split='train',
reader_cfg=bustm_reader_cfg,
infer_cfg=bustm_infer_cfg,
eval_cfg=bustm_eval_cfg)
]
================================================
FILE: eval/configs/datasets/FewCLUE_bustm/FewCLUE_bustm_ppl_9ef540.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
bustm_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'],
output_column='label',
test_split='train')
bustm_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0: "{sentence1}。\n{sentence2}。\n两句话说的毫不相关。",
1: "{sentence1}。\n{sentence2}。\n两句话说的一个意思。"
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
bustm_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
bustm_datasets = [
dict(
type=HFDataset,
abbr='bustm-dev',
path='json',
data_files='./data/FewCLUE/bustm/dev_few_all.json',
split='train',
reader_cfg=bustm_reader_cfg,
infer_cfg=bustm_infer_cfg,
eval_cfg=bustm_eval_cfg),
dict(
type=HFDataset,
abbr='bustm-test',
path='json',
data_files='./data/FewCLUE/bustm/test_public.json',
split='train',
reader_cfg=bustm_reader_cfg,
infer_cfg=bustm_infer_cfg,
eval_cfg=bustm_eval_cfg)
]
================================================
FILE: eval/configs/datasets/FewCLUE_bustm/FewCLUE_bustm_ppl_e53034.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
bustm_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'],
output_column='label',
test_split='train')
bustm_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0:
dict(round=[
dict(
role="HUMAN",
prompt=
"语句一:“{sentence1}”\n语句二:“{sentence2}”\n请判断语句一和语句二说的是否是一个意思?"
),
dict(role="BOT", prompt="两句话说的毫不相关。")
]),
1:
dict(round=[
dict(
role="HUMAN",
prompt=
"语句一:“{sentence1}”\n语句二:“{sentence2}”\n请判断语句一和语句二说的是否是一个意思?"
),
dict(role="BOT", prompt="两句话说是的一个意思。")
]),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
bustm_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
bustm_datasets = [
dict(
type=HFDataset,
abbr='bustm-dev',
path='json',
data_files='./data/FewCLUE/bustm/dev_few_all.json',
split='train',
reader_cfg=bustm_reader_cfg,
infer_cfg=bustm_infer_cfg,
eval_cfg=bustm_eval_cfg),
dict(
type=HFDataset,
abbr='bustm-test',
path='json',
data_files='./data/FewCLUE/bustm/test_public.json',
split='train',
reader_cfg=bustm_reader_cfg,
infer_cfg=bustm_infer_cfg,
eval_cfg=bustm_eval_cfg)
]
================================================
FILE: eval/configs/datasets/FewCLUE_chid/FewCLUE_chid_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .FewCLUE_chid_gen_0a29a2 import chid_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/FewCLUE_chid/FewCLUE_chid_gen_0a29a2.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import CHIDDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
chid_reader_cfg = dict(
input_columns=["content","A","B","C","D","E","F","G"],
output_column="answer",
)
chid_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(
round=[
dict(
role="HUMAN",
prompt=
"{content}\n请选择______处所填的词\nA. {A}\nB. {B}\nC. {C}\nD. {D}\nE. {E}\nF. {F}\nG. {G}\n请从”A“,”B“,”C“,”D“,”E“,”F“,”G“中进行选择。答:",
),
])),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
chid_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
chid_datasets = [
dict(
abbr="chid-dev",
type=CHIDDataset_V2,
path="./data/FewCLUE/chid/dev_few_all.json",
reader_cfg=chid_reader_cfg,
infer_cfg=chid_infer_cfg,
eval_cfg=chid_eval_cfg,
),
dict(
abbr="chid-test",
type=CHIDDataset_V2,
path="./data/FewCLUE/chid/test_public.json",
reader_cfg=chid_reader_cfg,
infer_cfg=chid_infer_cfg,
eval_cfg=chid_eval_cfg,
),
]
================================================
FILE: eval/configs/datasets/FewCLUE_chid/FewCLUE_chid_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .FewCLUE_chid_ppl_8f2872 import chid_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/FewCLUE_chid/FewCLUE_chid_ppl_8f2872.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import CHIDDataset
chid_reader_cfg = dict(
input_columns=[f'content{i}' for i in range(7)], output_column='answer')
chid_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
i: dict(
round=[
dict(role="HUMAN", prompt=f"以下句子是否通顺?\n{{content{i}}}"),
dict(role="BOT", prompt="这个句子是通顺的。"),
], )
for i in range(7)
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
chid_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
chid_datasets = [
dict(
type=CHIDDataset,
path='json',
abbr='chid-dev',
data_files='./data/FewCLUE/chid/dev_few_all.json',
split='train',
reader_cfg=chid_reader_cfg,
infer_cfg=chid_infer_cfg,
eval_cfg=chid_eval_cfg),
dict(
type=CHIDDataset,
path='json',
abbr='chid-test',
data_files='./data/FewCLUE/chid/test_public.json',
split='train',
reader_cfg=chid_reader_cfg,
infer_cfg=chid_infer_cfg,
eval_cfg=chid_eval_cfg),
]
================================================
FILE: eval/configs/datasets/FewCLUE_chid/FewCLUE_chid_ppl_acccb5.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import CHIDDataset
chid_reader_cfg = dict(
input_columns=[f'content{i}' for i in range(7)], output_column='answer')
chid_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={i: f"以下句子是否通顺?\n{{content{i}}}\n这个句子是通顺的。"
for i in range(7)}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
chid_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
chid_datasets = [
dict(
type=CHIDDataset,
path='json',
abbr='chid-dev',
data_files='./data/FewCLUE/chid/dev_few_all.json',
split='train',
reader_cfg=chid_reader_cfg,
infer_cfg=chid_infer_cfg,
eval_cfg=chid_eval_cfg),
dict(
type=CHIDDataset,
path='json',
abbr='chid-test',
data_files='./data/FewCLUE/chid/test_public.json',
split='train',
reader_cfg=chid_reader_cfg,
infer_cfg=chid_infer_cfg,
eval_cfg=chid_eval_cfg),
]
================================================
FILE: eval/configs/datasets/FewCLUE_cluewsc/FewCLUE_cluewsc_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .FewCLUE_cluewsc_gen_c68933 import cluewsc_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/FewCLUE_cluewsc/FewCLUE_cluewsc_gen_c68933.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import CluewscDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
cluewsc_reader_cfg = dict(
input_columns=["span1", "span2", "text", "new_text"],
output_column="label",
)
cluewsc_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"{text}\n此处,“{span2}”是否指代“{span1}“?\nA. 是\nB. 否\n请从”A“,”B“中进行选择。\n答:",
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
cluewsc_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
cluewsc_datasets = [
dict(
abbr="cluewsc-dev",
type=CluewscDataset_V2,
path="./data/FewCLUE/cluewsc/dev_few_all.json",
reader_cfg=cluewsc_reader_cfg,
infer_cfg=cluewsc_infer_cfg,
eval_cfg=cluewsc_eval_cfg,
),
dict(
abbr="cluewsc-test",
type=CluewscDataset_V2,
path="./data/FewCLUE/cluewsc/test_public.json",
reader_cfg=cluewsc_reader_cfg,
infer_cfg=cluewsc_infer_cfg,
eval_cfg=cluewsc_eval_cfg,
),
]
================================================
FILE: eval/configs/datasets/FewCLUE_cluewsc/FewCLUE_cluewsc_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .FewCLUE_cluewsc_ppl_868415 import cluewsc_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/FewCLUE_cluewsc/FewCLUE_cluewsc_ppl_12e4e0.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import CluewscDataset
cluewsc_reader_cfg = dict(
input_columns=['span1', 'span2', 'text', 'new_text'],
output_column='answer')
cluewsc_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0:
dict(round=[
dict(
role="HUMAN",
prompt=
"{text}\nHere, is the pronoun \"{span2}\" used to mean \"{span1}\"?"
),
dict(role="BOT", prompt="No.")
]),
1:
dict(round=[
dict(
role="HUMAN",
prompt=
"{text}\nHere, is the pronoun \"{span2}\" used to mean \"{span1}\"?"
),
dict(role="BOT", prompt="Yes.")
]),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
cluewsc_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
cluewsc_datasets = [
dict(
type=CluewscDataset,
path='json',
abbr='cluewsc-dev',
data_files='./data/FewCLUE/cluewsc/dev_few_all.json',
split='train',
reader_cfg=cluewsc_reader_cfg,
infer_cfg=cluewsc_infer_cfg,
eval_cfg=cluewsc_eval_cfg),
dict(
type=CluewscDataset,
path='json',
abbr='cluewsc-test',
data_files='./data/FewCLUE/cluewsc/test_public.json',
split='train',
reader_cfg=cluewsc_reader_cfg,
infer_cfg=cluewsc_infer_cfg,
eval_cfg=cluewsc_eval_cfg),
]
================================================
FILE: eval/configs/datasets/FewCLUE_cluewsc/FewCLUE_cluewsc_ppl_4284a0.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import CluewscDataset
cluewsc_reader_cfg = dict(
input_columns=['span1', 'span2', 'text', 'new_text'],
output_column='answer')
cluewsc_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0:
"{text}\nHere, is the pronoun \"{span2}\" used to mean \"{span1}\"? No.",
1:
"{text}\nHere, is the pronoun \"{span2}\" used to mean \"{span1}\"? Yes.",
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
cluewsc_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
cluewsc_datasets = [
dict(
type=CluewscDataset,
path='json',
abbr='cluewsc-dev',
data_files='./data/FewCLUE/cluewsc/dev_few_all.json',
split='train',
reader_cfg=cluewsc_reader_cfg,
infer_cfg=cluewsc_infer_cfg,
eval_cfg=cluewsc_eval_cfg),
dict(
type=CluewscDataset,
path='json',
abbr='cluewsc-test',
data_files='./data/FewCLUE/cluewsc/test_public.json',
split='train',
reader_cfg=cluewsc_reader_cfg,
infer_cfg=cluewsc_infer_cfg,
eval_cfg=cluewsc_eval_cfg),
]
================================================
FILE: eval/configs/datasets/FewCLUE_cluewsc/FewCLUE_cluewsc_ppl_868415.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import CluewscDataset
cluewsc_reader_cfg = dict(
input_columns=['span1', 'span2', 'text', 'new_text'],
output_column='answer')
cluewsc_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0:
dict(round=[
dict(
role="HUMAN",
prompt="{text}\n此处,代词“{span2}“被用于指代“{span1}“吗?"),
dict(role="BOT", prompt="否")
]),
1:
dict(round=[
dict(
role="HUMAN",
prompt="{text}\n此处,代词“{span2}“被用于指代“{span1}“吗?"),
dict(role="BOT", prompt="是")
]),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
cluewsc_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
cluewsc_datasets = [
dict(
type=CluewscDataset,
path='json',
abbr='cluewsc-dev',
data_files='./data/FewCLUE/cluewsc/dev_few_all.json',
split='train',
reader_cfg=cluewsc_reader_cfg,
infer_cfg=cluewsc_infer_cfg,
eval_cfg=cluewsc_eval_cfg),
dict(
type=CluewscDataset,
path='json',
abbr='cluewsc-test',
data_files='./data/FewCLUE/cluewsc/test_public.json',
split='train',
reader_cfg=cluewsc_reader_cfg,
infer_cfg=cluewsc_infer_cfg,
eval_cfg=cluewsc_eval_cfg),
]
================================================
FILE: eval/configs/datasets/FewCLUE_csl/FewCLUE_csl_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .FewCLUE_csl_gen_28b223 import csl_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/FewCLUE_csl/FewCLUE_csl_gen_28b223.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import CslDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
csl_reader_cfg = dict(
input_columns=["abst", "keywords"],
output_column="label",
)
csl_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"摘要是对论文内容不加注释和评论的简短陈述,要求扼要地说明研究工作的目的、研究方法和最终结论等。\n关键词是一篇学术论文的核心词汇,一般由一系列名词组成。关键词在全文中应有较高出现频率,且能起到帮助文献检索的作用。\n摘要:{abst}\n关键词:{keywords}\n请问上述关键词是否匹配摘要且符合要求?\nA. 否\nB. 是\n请从”A“,”B“中进行选择。\n答:"
)
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
csl_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
csl_datasets = [
dict(
abbr="csl_dev",
type=CslDataset_V2,
path="./data/FewCLUE/csl/dev_few_all.json",
reader_cfg=csl_reader_cfg,
infer_cfg=csl_infer_cfg,
eval_cfg=csl_eval_cfg,
),
dict(
abbr="csl_test",
type=CslDataset_V2,
path="./data/FewCLUE/csl/test_public.json",
reader_cfg=csl_reader_cfg,
infer_cfg=csl_infer_cfg,
eval_cfg=csl_eval_cfg,
),
]
================================================
FILE: eval/configs/datasets/FewCLUE_csl/FewCLUE_csl_gen_87f4a8.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import CslDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
csl_reader_cfg = dict(
input_columns=["abst", "keywords"],
output_column="label",
)
csl_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"摘要:{abst}\n关键词:{keywords}\n上述关键词出现在学术期刊中是否恰当?\nA. 否\nB. 是\n请从”A“,”B“中进行选择。\n答:"
)
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
csl_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
csl_datasets = [
dict(
abbr="csl_dev",
type=CslDataset_V2,
path="./data/FewCLUE/csl/dev_few_all.json",
reader_cfg=csl_reader_cfg,
infer_cfg=csl_infer_cfg,
eval_cfg=csl_eval_cfg,
),
dict(
abbr="csl_test",
type=CslDataset_V2,
path="./data/FewCLUE/csl/test_public.json",
reader_cfg=csl_reader_cfg,
infer_cfg=csl_infer_cfg,
eval_cfg=csl_eval_cfg,
),
]
================================================
FILE: eval/configs/datasets/FewCLUE_csl/FewCLUE_csl_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .FewCLUE_csl_ppl_841b62 import csl_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/FewCLUE_csl/FewCLUE_csl_ppl_769f8d.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import CslDataset
csl_reader_cfg = dict(
input_columns=["abst", "keywords"], output_column='label')
csl_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0:
dict(round=[dict(role="HUMAN", prompt="摘要:{abst}")]),
1:
dict(
round=[dict(role="HUMAN", prompt="摘要:{abst}\n关键词:{keywords}")
]),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
csl_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
csl_datasets = [
dict(
type=CslDataset,
path='json',
abbr='csl_dev',
data_files='./data/FewCLUE/csl/dev_few_all.json',
split='train',
reader_cfg=csl_reader_cfg,
infer_cfg=csl_infer_cfg,
eval_cfg=csl_eval_cfg),
dict(
type=CslDataset,
path='json',
abbr='csl_test',
data_files='./data/FewCLUE/csl/test_public.json',
split='train',
reader_cfg=csl_reader_cfg,
infer_cfg=csl_infer_cfg,
eval_cfg=csl_eval_cfg)
]
================================================
FILE: eval/configs/datasets/FewCLUE_csl/FewCLUE_csl_ppl_841b62.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import CslDataset
csl_reader_cfg = dict(
input_columns=["abst", "keywords"], output_column='label')
csl_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0: "摘要:{abst}",
1: "摘要:{abst}\n关键词:{keywords}"
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
csl_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
csl_datasets = [
dict(
type=CslDataset,
path='json',
abbr='csl_dev',
data_files='./data/FewCLUE/csl/dev_few_all.json',
split='train',
reader_cfg=csl_reader_cfg,
infer_cfg=csl_infer_cfg,
eval_cfg=csl_eval_cfg),
dict(
type=CslDataset,
path='json',
abbr='csl_test',
data_files='./data/FewCLUE/csl/test_public.json',
split='train',
reader_cfg=csl_reader_cfg,
infer_cfg=csl_infer_cfg,
eval_cfg=csl_eval_cfg)
]
================================================
FILE: eval/configs/datasets/FewCLUE_eprstmt/FewCLUE_eprstmt_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .FewCLUE_eprstmt_gen_740ea0 import eprstmt_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/FewCLUE_eprstmt/FewCLUE_eprstmt_gen_740ea0.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import eprstmtDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
eprstmt_reader_cfg = dict(
input_columns=["sentence"], output_column="label", test_split="train")
eprstmt_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
'内容: "{sentence}"。请对上述内容进行情绪分类。\nA. 积极\nB. 消极\n请从”A“,”B“中进行选择。\n答:'
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
eprstmt_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
eprstmt_datasets = [
dict(
abbr="eprstmt-dev",
type=eprstmtDataset_V2,
path="./data/FewCLUE/eprstmt/dev_few_all.json",
reader_cfg=eprstmt_reader_cfg,
infer_cfg=eprstmt_infer_cfg,
eval_cfg=eprstmt_eval_cfg,
),
dict(
abbr="eprstmt-test",
type=eprstmtDataset_V2,
path="./data/FewCLUE/eprstmt/test_public.json",
reader_cfg=eprstmt_reader_cfg,
infer_cfg=eprstmt_infer_cfg,
eval_cfg=eprstmt_eval_cfg,
),
]
================================================
FILE: eval/configs/datasets/FewCLUE_eprstmt/FewCLUE_eprstmt_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .FewCLUE_eprstmt_ppl_f1e631 import eprstmt_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/FewCLUE_eprstmt/FewCLUE_eprstmt_ppl_1ce587.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
eprstmt_reader_cfg = dict(
input_columns=['sentence'], output_column='label', test_split='train')
eprstmt_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'Negative': ' 内容: "{sentence}"。情绪分类:消极。',
'Positive': ' 内容: "{sentence}"。情绪分类:积极。',
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
eprstmt_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
eprstmt_datasets = [
dict(
type=HFDataset,
abbr='eprstmt-dev',
path='json',
data_files='./data/FewCLUE/eprstmt/dev_few_all.json',
split='train',
reader_cfg=eprstmt_reader_cfg,
infer_cfg=eprstmt_infer_cfg,
eval_cfg=eprstmt_eval_cfg),
dict(
type=HFDataset,
abbr='eprstmt-test',
path='json',
data_files='./data/FewCLUE/eprstmt/test_public.json',
split='train',
reader_cfg=eprstmt_reader_cfg,
infer_cfg=eprstmt_infer_cfg,
eval_cfg=eprstmt_eval_cfg)
]
================================================
FILE: eval/configs/datasets/FewCLUE_eprstmt/FewCLUE_eprstmt_ppl_f1e631.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
eprstmt_reader_cfg = dict(
input_columns=['sentence'], output_column='label', test_split='train')
eprstmt_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'Negative':
dict(round=[
dict(role='HUMAN', prompt='内容: "{sentence}"。情绪分类:'),
dict(role='BOT', prompt='消极。')
]),
'Positive':
dict(round=[
dict(role='HUMAN', prompt='内容: "{sentence}"。情绪分类:'),
dict(role='BOT', prompt='积极。')
]),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
eprstmt_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
eprstmt_datasets = [
dict(
type=HFDataset,
abbr='eprstmt-dev',
path='json',
data_files='./data/FewCLUE/eprstmt/dev_few_all.json',
split='train',
reader_cfg=eprstmt_reader_cfg,
infer_cfg=eprstmt_infer_cfg,
eval_cfg=eprstmt_eval_cfg),
dict(
type=HFDataset,
abbr='eprstmt-test',
path='json',
data_files='./data/FewCLUE/eprstmt/test_public.json',
split='train',
reader_cfg=eprstmt_reader_cfg,
infer_cfg=eprstmt_infer_cfg,
eval_cfg=eprstmt_eval_cfg)
]
================================================
FILE: eval/configs/datasets/FewCLUE_ocnli_fc/FewCLUE_ocnli_fc_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .FewCLUE_ocnli_fc_gen_f97a97 import ocnli_fc_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/FewCLUE_ocnli_fc/FewCLUE_ocnli_fc_gen_f97a97.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import cmnliDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
ocnli_fc_reader_cfg = dict(
input_columns=["sentence1", "sentence2"],
output_column="label",
test_split="train")
ocnli_fc_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"阅读文章:{sentence1}\n根据上文,回答如下问题:{sentence2}\nA. 对\nB. 错\nC. 可能\n请从“A”,“B”,“C”中进行选择。\n答:"
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
ocnli_fc_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
ocnli_fc_datasets = [
dict(
abbr="ocnli_fc-dev",
type=cmnliDataset_V2, # ocnli_fc share the same format with cmnli
path="./data/FewCLUE/ocnli/dev_few_all.json",
reader_cfg=ocnli_fc_reader_cfg,
infer_cfg=ocnli_fc_infer_cfg,
eval_cfg=ocnli_fc_eval_cfg,
),
dict(
abbr="ocnli_fc-test",
type=cmnliDataset_V2, # ocnli_fc share the same format with cmnli
path="./data/FewCLUE/ocnli/test_public.json",
reader_cfg=ocnli_fc_reader_cfg,
infer_cfg=ocnli_fc_infer_cfg,
eval_cfg=ocnli_fc_eval_cfg,
),
]
================================================
FILE: eval/configs/datasets/FewCLUE_ocnli_fc/FewCLUE_ocnli_fc_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .FewCLUE_ocnli_fc_ppl_c08300 import ocnli_fc_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/FewCLUE_ocnli_fc/FewCLUE_ocnli_fc_ppl_9e8b3d.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
ocnli_fc_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'],
output_column='label',
test_split='train')
ocnli_fc_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'contradiction':
dict(round=[
dict(
role="HUMAN",
prompt="阅读文章:{sentence1}\n根据上文,回答如下问题:{sentence2}?"),
dict(role="BOT", prompt="错")
]),
'entailment':
dict(round=[
dict(
role="HUMAN",
prompt="阅读文章:{sentence1}\n根据上文,回答如下问题:{sentence2}?"),
dict(role="BOT", prompt="对")
]),
'neutral':
dict(round=[
dict(
role="HUMAN", prompt="如果{sentence1}为真,那么{sentence2}也为真吗?"),
dict(role="BOT", prompt="可能")
]),
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
ocnli_fc_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
ocnli_fc_datasets = [
dict(
type=HFDataset,
abbr='ocnli_fc-dev',
path='json',
split='train',
data_files='./data/FewCLUE/ocnli/dev_few_all.json',
reader_cfg=ocnli_fc_reader_cfg,
infer_cfg=ocnli_fc_infer_cfg,
eval_cfg=ocnli_fc_eval_cfg),
dict(
type=HFDataset,
abbr='ocnli_fc-test',
path='json',
split='train',
data_files='./data/FewCLUE/ocnli/test_public.json',
reader_cfg=ocnli_fc_reader_cfg,
infer_cfg=ocnli_fc_infer_cfg,
eval_cfg=ocnli_fc_eval_cfg)
]
================================================
FILE: eval/configs/datasets/FewCLUE_ocnli_fc/FewCLUE_ocnli_fc_ppl_c08300.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
ocnli_fc_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'],
output_column='label',
test_split='train')
ocnli_fc_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'contradiction':
'阅读文章:{sentence1}\n根据上文,回答如下问题: {sentence2}?\n答:错',
'entailment': '阅读文章:{sentence1}\n根据上文,回答如下问题: {sentence2}?\n答:对',
'neutral': '如果{sentence1}为真,那么{sentence2}也为真吗?可能'
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
ocnli_fc_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
ocnli_fc_datasets = [
dict(
type=HFDataset,
abbr='ocnli_fc-dev',
path='json',
split='train',
data_files='./data/FewCLUE/ocnli/dev_few_all.json',
reader_cfg=ocnli_fc_reader_cfg,
infer_cfg=ocnli_fc_infer_cfg,
eval_cfg=ocnli_fc_eval_cfg),
dict(
type=HFDataset,
abbr='ocnli_fc-test',
path='json',
split='train',
data_files='./data/FewCLUE/ocnli/test_public.json',
reader_cfg=ocnli_fc_reader_cfg,
infer_cfg=ocnli_fc_infer_cfg,
eval_cfg=ocnli_fc_eval_cfg)
]
================================================
FILE: eval/configs/datasets/FewCLUE_tnews/FewCLUE_tnews_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .FewCLUE_tnews_gen_b90e4a import tnews_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/FewCLUE_tnews/FewCLUE_tnews_gen_b90e4a.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import TNewsDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
tnews_reader_cfg = dict(
input_columns="sentence",
output_column="label_desc2",
)
tnews_labels = [
"农业新闻", # news_agriculture
"旅游新闻", # news_travel
"游戏新闻", # news_game
"科技类别公司新闻", # news_tech
"体育类别新闻", # news_sports
"初升高教育新闻", # news_edu
"娱乐圈新闻", # news_entertainment
"投资资讯", # news_finance
"军事类别常识", # news_military
"车辆新闻", # news_car
"楼市新闻", # news_house
"环球不含中国类别新闻", # news_world
"书籍文化历史类别新闻", # news_culture
"故事类别新闻", # news_story
"股票市场类别新闻", # news_stock
]
_tnews_options_list_str = "\n".join(f'{chr(ord("A") + i)}. {tnews_labels[i]}'
for i in range(len(tnews_labels)))
_tnews_options_range_str = ",".join(f'“{chr(ord("A") + i)}”'
for i in range(len(tnews_labels)))
tnews_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
f"{{sentence}}\n请判断上述内容属于什么新闻?\n{_tnews_options_list_str}\n请从{_tnews_options_range_str}中进行选择。\n答:",
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
tnews_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
tnews_datasets = [
dict(
abbr="tnews-dev",
type=TNewsDataset_V2,
path="./data/FewCLUE/tnews/dev_few_all.json",
reader_cfg=tnews_reader_cfg,
infer_cfg=tnews_infer_cfg,
eval_cfg=tnews_eval_cfg,
),
dict(
abbr="tnews-test",
type=TNewsDataset_V2,
path="./data/FewCLUE/tnews/test_public.json",
reader_cfg=tnews_reader_cfg,
infer_cfg=tnews_infer_cfg,
eval_cfg=tnews_eval_cfg,
),
]
del _tnews_options_list_str, _tnews_options_range_str
================================================
FILE: eval/configs/datasets/FewCLUE_tnews/FewCLUE_tnews_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .FewCLUE_tnews_ppl_d10e8a import tnews_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/FewCLUE_tnews/FewCLUE_tnews_ppl_7d1c07.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import TNewsDataset
tnews_reader_cfg = dict(input_columns='sentence', output_column='label_desc2')
tnews_labels = [
'农业新闻', '旅游新闻', '游戏新闻', '科技类别公司新闻', '体育类别新闻', '初升高教育新闻', '娱乐圈新闻', '投资资讯',
'军事类别常识', '车辆新闻', '楼市新闻', '环球不含中国类别新闻', '书籍文化历史类别新闻', '故事类别新闻', '股票市场类别新闻'
]
tnews_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={lb: f'{{sentence}}这篇新闻属于:{lb}'
for lb in tnews_labels}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
tnews_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
tnews_datasets = [
dict(
type=TNewsDataset,
path='json',
abbr='tnews-dev',
data_files='./data/FewCLUE/tnews/dev_few_all.json',
split='train',
reader_cfg=tnews_reader_cfg,
infer_cfg=tnews_infer_cfg,
eval_cfg=tnews_eval_cfg),
dict(
type=TNewsDataset,
path='json',
abbr='tnews-test',
data_files='./data/FewCLUE/tnews/test_public.json',
split='train',
reader_cfg=tnews_reader_cfg,
infer_cfg=tnews_infer_cfg,
eval_cfg=tnews_eval_cfg)
]
================================================
FILE: eval/configs/datasets/FewCLUE_tnews/FewCLUE_tnews_ppl_d10e8a.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import TNewsDataset
tnews_reader_cfg = dict(input_columns='sentence', output_column='label_desc2')
tnews_labels = [
'农业新闻', '旅游新闻', '游戏新闻', '科技类别公司新闻', '体育类别新闻', '初升高教育新闻', '娱乐圈新闻', '投资资讯',
'军事类别常识', '车辆新闻', '楼市新闻', '环球不含中国类别新闻', '书籍文化历史类别新闻', '故事类别新闻', '股票市场类别新闻'
]
tnews_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
lb: dict(round=[
dict(role='HUMAN', prompt='{sentence}\n上述内容属于什么新闻?'),
dict(role='BOT', prompt=lb)
])
for lb in tnews_labels
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
tnews_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
tnews_datasets = [
dict(
type=TNewsDataset,
path='json',
abbr='tnews-dev',
data_files='./data/FewCLUE/tnews/dev_few_all.json',
split='train',
reader_cfg=tnews_reader_cfg,
infer_cfg=tnews_infer_cfg,
eval_cfg=tnews_eval_cfg),
dict(
type=TNewsDataset,
path='json',
abbr='tnews-test',
data_files='./data/FewCLUE/tnews/test_public.json',
split='train',
reader_cfg=tnews_reader_cfg,
infer_cfg=tnews_infer_cfg,
eval_cfg=tnews_eval_cfg)
]
================================================
FILE: eval/configs/datasets/FewCLUE_tnews/FewCLUE_tnews_ppl_fff486.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import TNewsDataset
tnews_reader_cfg = dict(input_columns='sentence', output_column='label_desc2')
tnews_labels = [
'农业新闻', '旅游新闻', '游戏新闻', '科技类别公司新闻', '体育类别新闻', '初升高教育新闻', '娱乐圈新闻', '投资资讯',
'军事类别常识', '车辆新闻', '楼市新闻', '环球不含中国类别新闻', '书籍文化历史类别新闻', '故事类别新闻', '股票市场类别新闻'
]
tnews_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
lb: dict(round=[
dict(role='HUMAN', prompt='以下内容属于什么新闻:{sentence}。'),
dict(role='BOT', prompt=lb)
])
for lb in tnews_labels
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
tnews_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
tnews_datasets = [
dict(
type=TNewsDataset,
path='json',
abbr='tnews-dev',
data_files='./data/FewCLUE/tnews/dev_few_all.json',
split='train',
reader_cfg=tnews_reader_cfg,
infer_cfg=tnews_infer_cfg,
eval_cfg=tnews_eval_cfg),
dict(
type=TNewsDataset,
path='json',
abbr='tnews-test',
data_files='./data/FewCLUE/tnews/test_public.json',
split='train',
reader_cfg=tnews_reader_cfg,
infer_cfg=tnews_infer_cfg,
eval_cfg=tnews_eval_cfg)
]
================================================
FILE: eval/configs/datasets/GaokaoBench/GaokaoBench_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .GaokaoBench_gen_5cfe9e import GaokaoBench_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/GaokaoBench/GaokaoBench_gen_5cfe9e.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.datasets import GaokaoBenchDataset
_MCQ_prompts = [
{
"type": "single_choice",
"keyword": "2010-2022_Math_II_MCQs",
"prefix_prompt":
"请你做一道数学选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。\n题目如下:",
"comment": ""
},
{
"type": "single_choice",
"keyword": "2010-2022_Math_I_MCQs",
"prefix_prompt":
"请你做一道数学选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。\n题目如下:",
"comment": ""
},
{
"type":
"single_choice",
"keyword":
"2010-2022_History_MCQs",
"prefix_prompt":
"请你做一道历史选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。\n题目如下:"
},
{
"type":
"single_choice",
"keyword":
"2010-2022_Biology_MCQs",
"prefix_prompt":
"请你做一道生物选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。\n题目如下:"
},
{
"type":
"single_choice",
"keyword":
"2010-2022_Political_Science_MCQs",
"prefix_prompt":
"请你做一道政治选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。\n题目如下:"
},
{
"type":
"multi_choice",
"keyword":
"2010-2022_Physics_MCQs",
"prefix_prompt":
"请你做一道物理选择题。\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出所有符合题意的答案,并写在【答案】和<eoa>之间。\n例如:【答案】 AB <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】... <eoa>\n请你严格按照上述格式作答。\n"
},
{
"type":
"single_choice",
"keyword":
"2010-2022_Chemistry_MCQs",
"prefix_prompt":
"请你做一道化学选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。\n题目如下:"
},
{
"type":
"single_choice",
"keyword":
"2010-2013_English_MCQs",
"prefix_prompt":
"请你做一道英语选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。\n题目如下:"
},
{
"type":
"multi_question_choice",
"keyword":
"2010-2022_Chinese_Modern_Lit",
"prefix_prompt":
"请你做一道语文阅读理解题,其中包含三个小题。\n请你一步一步思考。每一题你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:(1)【答案】 A <eoa>\n(2)【答案】 B <eoa>\n请你严格按照上述格式作答。\n"
},
{
"type":
"multi_question_choice",
"keyword":
"2010-2022_English_Fill_in_Blanks",
"prefix_prompt":
"请你做一道英语完形填空题,其中包含二十个小题。\n请你一步一步思考。每一题你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:(1)【答案】 A <eoa>\n(2)【答案】 B <eoa>\n请你严格按照上述格式作答。\n"
},
{
"type":
"five_out_of_seven",
"keyword":
"2012-2022_English_Cloze_Test",
"prefix_prompt":
"请回答下面的问题,将符合题意的五个选项的字母写在【答案】和<eoa>之间,例如“【答案】 A B C D E <eoa>\n请严格按照上述格式作答。\n"
},
{
"type":
"multi_question_choice",
"keyword":
"2010-2022_Geography_MCQs",
"prefix_prompt":
"请你做一道地理选择题,其中包含两到三个小题。\n请你一步一步思考。每一题你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:(1)【答案】 A <eoa>\n(2)【答案】 B <eoa>\n请你严格按照上述格式作答。\n"
},
{
"type":
"multi_question_choice",
"keyword":
"2010-2022_English_Reading_Comp",
"prefix_prompt":
"请你做一道英语阅读理解题,其中包含三到五个小题。\n请你一步一步思考。每一题你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:(1)【答案】 A <eoa>\n(2)【答案】 B <eoa>\n请你严格按照上述格式作答。\n"
},
{
"type":
"multi_question_choice",
"keyword":
"2010-2022_Chinese_Lang_and_Usage_MCQs",
"prefix_prompt":
"请你做一道语文选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n(1)【解析】 ... <eoe>\n【答案】 ... <eoa>\n(2)【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。如果不止一道题,请分别作答\n题目如下:"
},
]
_FBQ_prompts = [{
"type": "cloze",
"keyword": "2010-2022_Math_I_Fill-in-the-Blank",
"prefix_prompt":
"请解答下面的数学填空题\n仔细阅读题目,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间。\n完整的题目回答格式如下:\n【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答。\n题目如下:",
"comment": ""
}, {
"type": "cloze",
"keyword": "2010-2022_Math_II_Fill-in-the-Blank",
"prefix_prompt":
"请解答下面的数学填空题\n仔细阅读题目,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间。\n完整的题目回答格式如下:\n【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答。\n题目如下:",
"comment": ""
}, {
"type": "cloze",
"keyword":
"2010-2022_Chinese_Language_Famous_Passages_and_Sentences_Dictation",
"prefix_prompt":
"请回答下面的语文填空题\n请你仔细阅读题目,先找到题目对应的中国名篇,再从名篇中找到合适的句子填写到题目的空白处。请你将思考过程写在【解析】和<eoe>之间,将最终答案写在【答案】和<eoa>之间。\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n(2)【解析】 ...<eoe>\n【答案】...<eoa>\n请严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
}, {
"type": "cloze",
"keyword": "2014-2022_English_Language_Cloze_Passage",
"prefix_prompt":
"请回答下面的英语短文填词题\n仔细阅读题目,空白处请填入一个适当单词或者括号内单词的正确形式。请你一步步思考,将思考过程写在【解析】和<eoe>之间,将最终答案写在【答案】和<eoa>之间。\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n(2)【解析】 ...<eoe>\n【答案】...<eoa>\n请严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
}]
_OEQ_prompts = [
{
"type": "subjective",
"keyword": "2010-2022_Geography_Open-ended_Questions",
"prefix_prompt":
"请解答下面的地理解答题\n仔细阅读题目并充分结合你已有的知识,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。你的答案请写在【答案】和<eoa>之间\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Chemistry_Open-ended_Questions",
"prefix_prompt":
"请解答下面的化学解答题\n仔细阅读题目并充分结合你已有的知识,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Math_I_Open-ended_Questions",
"prefix_prompt":
"请解答下面的数学解答题\n仔细阅读题目并充分结合你已有的知识,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间,答案需要有完整的解题步骤。\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_History_Open-ended_Questions",
"prefix_prompt":
"请解答下面的历史解答题\n仔细阅读材料和题目,并充分结合你已有的知识,解答其中的问题。请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Biology_Open-ended_Questions",
"prefix_prompt":
"请解答下面的生物解答题\n仔细阅读题目并充分结合你已有的知识,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间,同一小题的答案用\t分隔开。\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...\t...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...\t...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Math_II_Open-ended_Questions",
"prefix_prompt":
"请解答下面的数学解答题\n仔细阅读题目并充分结合你已有的知识,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间,答案需要有完整的解题步骤。\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Physics_Open-ended_Questions",
"prefix_prompt":
"请解答下面的物理解答题,仔细阅读题目,注意其中可能含有单选题和多选题。请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的最终答案写在【答案】和<eoa>之间。选择题你要从选项中选出符合题意的答案,例如“【答案】A <eoa>”。\n完整的题目回答格式如下:(1)【解析】 ...<eoe>\n【答案】 ...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答。如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Political_Science_Open-ended_Questions",
"prefix_prompt":
"请解答下面的政治解答题\n仔细阅读材料和题目,并充分结合你已有的知识,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "correction",
"keyword": "2012-2022_English_Language_Error_Correction",
"prefix_prompt":
"请解答下面的英语短文改错题,仔细阅读题目并充分结合你你已有的知识,找出其中10处需要改动的地方。请你一步步思考,把修改后的短文写在【答案】和<eoa>之间。\n完整的题目回答格式如下:【答案】 ...<eoa>\n 请你严格按照上述格式作答。\n题目如下:",
# "prefix_prompt": [
# "请解答下面的英语短文改错题,仔细阅读题目并充分结合你你已有的知识,找出其中10处需要改动的地方。请你一步步思考,把修改后的短文写在【答案】和<eoa>之间。\n完整的题目回答格式如下:【答案】 ...<eoa>\n 请你严格按照上述格式作答。\n题目如下:",
# "请比较下面两篇短文,找到第二篇和第一篇的10处不同,每处不同只涉及一个单词,请将结果写在【答案】和<eoa>之间。例如:【答案】1. 将play改为plays\n 2.增加了the\n ... <eoa>\n 完整的题目回答格式如下:【答案】(1) ... \n (2) ...\n ...(10) ...\n<eoa>\n请你严格按照上述格式作答。\n短文如下:"
# ],
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Chinese_Language_Ancient_Poetry_Reading",
"prefix_prompt":
"请解答下面的语文古代诗歌阅读题,仔细阅读题目,注意其中可能含有单选题和多选题。请你一步步思考并将最终答案写在【答案】和<eoa>之间。选择题你要从选项中选出符合题意的答案,例如“【答案】A <eoa>”。\n完整的题目回答格式如下:(1)【答案】 ...<eoa>\n (2)【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Chinese_Language_Practical_Text_Reading",
"prefix_prompt":
"请解答下面的语文实用类文本阅读,仔细阅读题目,注意其中可能含有单选题和多选题。请你一步步思考并将最终答案写在【答案】和<eoa>之间。选择题你要从选项中选出符合题意的答案,例如“【答案】A <eoa>”。\n完整的题目回答格式如下:(1)[答案】 ...<eoa>\n (2)【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Chinese_Language_Literary_Text_Reading",
"prefix_prompt":
"请解答下面的语文文学类文本阅读,仔细阅读题目,注意其中可能含有单选题和多选题。请你一步步思考并将最终答案写在【答案】和<eoa>之间。选择题你要从选项中选出符合题意的答案,例如“【答案】A <eoa>”。\n完整的题目回答格式如下:(1)[答案】 ...<eoa>\n (2)【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Chinese_Language_Classical_Chinese_Reading",
"prefix_prompt":
"请解答下面的语文文言文阅读,仔细阅读题目,前三题是单选题,最后一题要将文言文翻译为现代汉语。请你一步步思考并把最终答案写在【答案】和<eoa>之间。选择题你要从选项中选出符合题意的答案,例如“【答案】A <eoa>”。翻译题把翻译后的现代汉语句子写在【答案】后面,例如”【答案】今天天气很好 <eoa>”\n完整的题目回答格式如下:(1)[答案】 ...<eoa>\n (2)【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword":
"2010-2022_Chinese_Language_Language_and_Writing_Skills_Open-ended_Questions",
"prefix_prompt":
"请解答下面的语文解答题,仔细阅读题目,注意其中可能含有选择题。请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的最终答案写在【答案】和<eoa>之间。选择题你要从选项中选出符合题意的答案,例如“【答案】A <eoa>”。\n完整的题目回答格式如下:(1)【解析】 ...<eoe>\n【答案】 ...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答。如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
}
]
GaokaoBench_datasets = []
for _folder, _prompts in [
("Multiple-choice_Questions", _MCQ_prompts),
("Fill-in-the-blank_Questions", _FBQ_prompts),
("Open-ended_Questions", _OEQ_prompts),
]:
for _p in _prompts:
_reader_cfg = {
"input_columns": ['question'],
"output_column": 'answer',
}
_infer_cfg = {
"ice_template": {
"type": PromptTemplate,
"template": {
"round": [{
"role": "HUMAN",
"prompt": _p['prefix_prompt'] + '{question}'
}]
},
"ice_token": "</E>"
},
"retriever": {
"type": ZeroRetriever
},
"inferencer": {
"type": GenInferencer,
"max_out_len": 1024,
}
}
_eval_cfg = {
"evaluator": {
"type": "GaokaoBenchEvaluator" + "_" + _p['type'],
},
"pred_role": "BOT",
}
_base_path = './data/GAOKAO-BENCH/data'
_dataset = {
"type": GaokaoBenchDataset,
"abbr": "GaokaoBench_" + _p['keyword'],
"path": _base_path + '/' + _folder + '/' + _p['keyword'] + ".json",
"reader_cfg": _reader_cfg,
"infer_cfg": _infer_cfg,
"eval_cfg": _eval_cfg,
}
GaokaoBench_datasets.append(_dataset)
_temporary_variables = [k for k in globals() if k.startswith('_')]
for _t in _temporary_variables:
del globals()[_t]
del _temporary_variables, _t
================================================
FILE: eval/configs/datasets/GaokaoBench/GaokaoBench_mixed.py
================================================
from mmengine.config import read_base
with read_base():
from .GaokaoBench_mixed_f2038e import GaokaoBench_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/GaokaoBench/GaokaoBench_mixed_f2038e.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer, PPLInferencer
from opencompass.datasets import GaokaoBenchDataset
_MCQ_prompts = [
{
"type": "single_choice",
"keyword": "2010-2022_Math_II_MCQs",
"prefix_prompt":
"请你做一道数学选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。\n题目如下:",
"comment": ""
},
{
"type": "single_choice",
"keyword": "2010-2022_Math_I_MCQs",
"prefix_prompt":
"请你做一道数学选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。\n题目如下:",
"comment": ""
},
{
"type":
"single_choice",
"keyword":
"2010-2022_History_MCQs",
"prefix_prompt":
"请你做一道历史选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。\n题目如下:"
},
{
"type":
"single_choice",
"keyword":
"2010-2022_Biology_MCQs",
"prefix_prompt":
"请你做一道生物选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。\n题目如下:"
},
{
"type":
"single_choice",
"keyword":
"2010-2022_Political_Science_MCQs",
"prefix_prompt":
"请你做一道政治选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。\n题目如下:"
},
{
"type":
"multi_choice",
"keyword":
"2010-2022_Physics_MCQs",
"prefix_prompt":
"请你做一道物理选择题。\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出所有符合题意的答案,并写在【答案】和<eoa>之间。\n例如:【答案】 AB <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】... <eoa>\n请你严格按照上述格式作答。\n"
},
{
"type":
"single_choice",
"keyword":
"2010-2022_Chemistry_MCQs",
"prefix_prompt":
"请你做一道化学选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。\n题目如下:"
},
{
"type":
"single_choice",
"keyword":
"2010-2013_English_MCQs",
"prefix_prompt":
"请你做一道英语选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。\n题目如下:"
},
{
"type":
"multi_question_choice",
"keyword":
"2010-2022_Chinese_Modern_Lit",
"prefix_prompt":
"请你做一道语文阅读理解题,其中包含三个小题。\n请你一步一步思考。每一题你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:(1)【答案】 A <eoa>\n(2)【答案】 B <eoa>\n请你严格按照上述格式作答。\n"
},
{
"type":
"multi_question_choice",
"keyword":
"2010-2022_English_Fill_in_Blanks",
"prefix_prompt":
"请你做一道英语完形填空题,其中包含二十个小题。\n请你一步一步思考。每一题你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:(1)【答案】 A <eoa>\n(2)【答案】 B <eoa>\n请你严格按照上述格式作答。\n"
},
{
"type":
"five_out_of_seven",
"keyword":
"2012-2022_English_Cloze_Test",
"prefix_prompt":
"请回答下面的问题,将符合题意的五个选项的字母写在【答案】和<eoa>之间,例如“【答案】 A B C D E <eoa>\n请严格按照上述格式作答。\n"
},
{
"type":
"multi_question_choice",
"keyword":
"2010-2022_Geography_MCQs",
"prefix_prompt":
"请你做一道地理选择题,其中包含两到三个小题。\n请你一步一步思考。每一题你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:(1)【答案】 A <eoa>\n(2)【答案】 B <eoa>\n请你严格按照上述格式作答。\n"
},
{
"type":
"multi_question_choice",
"keyword":
"2010-2022_English_Reading_Comp",
"prefix_prompt":
"请你做一道英语阅读理解题,其中包含三到五个小题。\n请你一步一步思考。每一题你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:(1)【答案】 A <eoa>\n(2)【答案】 B <eoa>\n请你严格按照上述格式作答。\n"
},
{
"type":
"multi_question_choice",
"keyword":
"2010-2022_Chinese_Lang_and_Usage_MCQs",
"prefix_prompt":
"请你做一道语文选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】: A <eoa>\n完整的题目回答的格式如下:\n(1)【解析】 ... <eoe>\n【答案】 ... <eoa>\n(2)【解析】 ... <eoe>\n【答案】 ... <eoa>\n请你严格按照上述格式作答。如果不止一道题,请分别作答\n题目如下:"
},
]
_FBQ_prompts = [{
"type": "cloze",
"keyword": "2010-2022_Math_I_Fill-in-the-Blank",
"prefix_prompt":
"请解答下面的数学填空题\n仔细阅读题目,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间。\n完整的题目回答格式如下:\n【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答。\n题目如下:",
"comment": ""
}, {
"type": "cloze",
"keyword": "2010-2022_Math_II_Fill-in-the-Blank",
"prefix_prompt":
"请解答下面的数学填空题\n仔细阅读题目,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间。\n完整的题目回答格式如下:\n【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答。\n题目如下:",
"comment": ""
}, {
"type": "cloze",
"keyword":
"2010-2022_Chinese_Language_Famous_Passages_and_Sentences_Dictation",
"prefix_prompt":
"请回答下面的语文填空题\n请你仔细阅读题目,先找到题目对应的中国名篇,再从名篇中找到合适的句子填写到题目的空白处。请你将思考过程写在【解析】和<eoe>之间,将最终答案写在【答案】和<eoa>之间。\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n(2)【解析】 ...<eoe>\n【答案】...<eoa>\n请严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
}, {
"type": "cloze",
"keyword": "2014-2022_English_Language_Cloze_Passage",
"prefix_prompt":
"请回答下面的英语短文填词题\n仔细阅读题目,空白处请填入一个适当单词或者括号内单词的正确形式。请你一步步思考,将思考过程写在【解析】和<eoe>之间,将最终答案写在【答案】和<eoa>之间。\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n(2)【解析】 ...<eoe>\n【答案】...<eoa>\n请严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
}]
_OEQ_prompts = [
{
"type": "subjective",
"keyword": "2010-2022_Geography_Open-ended_Questions",
"prefix_prompt":
"请解答下面的地理解答题\n仔细阅读题目并充分结合你已有的知识,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。你的答案请写在【答案】和<eoa>之间\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Chemistry_Open-ended_Questions",
"prefix_prompt":
"请解答下面的化学解答题\n仔细阅读题目并充分结合你已有的知识,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Math_I_Open-ended_Questions",
"prefix_prompt":
"请解答下面的数学解答题\n仔细阅读题目并充分结合你已有的知识,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间,答案需要有完整的解题步骤。\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_History_Open-ended_Questions",
"prefix_prompt":
"请解答下面的历史解答题\n仔细阅读材料和题目,并充分结合你已有的知识,解答其中的问题。请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Biology_Open-ended_Questions",
"prefix_prompt":
"请解答下面的生物解答题\n仔细阅读题目并充分结合你已有的知识,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间,同一小题的答案用\t分隔开。\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...\t...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...\t...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Math_II_Open-ended_Questions",
"prefix_prompt":
"请解答下面的数学解答题\n仔细阅读题目并充分结合你已有的知识,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间,答案需要有完整的解题步骤。\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Physics_Open-ended_Questions",
"prefix_prompt":
"请解答下面的物理解答题,仔细阅读题目,注意其中可能含有单选题和多选题。请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的最终答案写在【答案】和<eoa>之间。选择题你要从选项中选出符合题意的答案,例如“【答案】A <eoa>”。\n完整的题目回答格式如下:(1)【解析】 ...<eoe>\n【答案】 ...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答。如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Political_Science_Open-ended_Questions",
"prefix_prompt":
"请解答下面的政治解答题\n仔细阅读材料和题目,并充分结合你已有的知识,解答其中的问题,请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的答案写在【答案】和<eoa>之间\n完整的题目回答格式如下:\n(1)【解析】 ...<eoe>\n【答案】...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "correction",
"keyword": "2012-2022_English_Language_Error_Correction",
"prefix_prompt":
"请解答下面的英语短文改错题,仔细阅读题目并充分结合你你已有的知识,找出其中10处需要改动的地方。请你一步步思考,把修改后的短文写在【答案】和<eoa>之间。\n完整的题目回答格式如下:【答案】 ...<eoa>\n 请你严格按照上述格式作答。\n题目如下:",
# "prefix_prompt": [
# "请解答下面的英语短文改错题,仔细阅读题目并充分结合你你已有的知识,找出其中10处需要改动的地方。请你一步步思考,把修改后的短文写在【答案】和<eoa>之间。\n完整的题目回答格式如下:【答案】 ...<eoa>\n 请你严格按照上述格式作答。\n题目如下:",
# "请比较下面两篇短文,找到第二篇和第一篇的10处不同,每处不同只涉及一个单词,请将结果写在【答案】和<eoa>之间。例如:【答案】1. 将play改为plays\n 2.增加了the\n ... <eoa>\n 完整的题目回答格式如下:【答案】(1) ... \n (2) ...\n ...(10) ...\n<eoa>\n请你严格按照上述格式作答。\n短文如下:"
# ],
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Chinese_Language_Ancient_Poetry_Reading",
"prefix_prompt":
"请解答下面的语文古代诗歌阅读题,仔细阅读题目,注意其中可能含有单选题和多选题。请你一步步思考并将最终答案写在【答案】和<eoa>之间。选择题你要从选项中选出符合题意的答案,例如“【答案】A <eoa>”。\n完整的题目回答格式如下:(1)【答案】 ...<eoa>\n (2)【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Chinese_Language_Practical_Text_Reading",
"prefix_prompt":
"请解答下面的语文实用类文本阅读,仔细阅读题目,注意其中可能含有单选题和多选题。请你一步步思考并将最终答案写在【答案】和<eoa>之间。选择题你要从选项中选出符合题意的答案,例如“【答案】A <eoa>”。\n完整的题目回答格式如下:(1)[答案】 ...<eoa>\n (2)【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Chinese_Language_Literary_Text_Reading",
"prefix_prompt":
"请解答下面的语文文学类文本阅读,仔细阅读题目,注意其中可能含有单选题和多选题。请你一步步思考并将最终答案写在【答案】和<eoa>之间。选择题你要从选项中选出符合题意的答案,例如“【答案】A <eoa>”。\n完整的题目回答格式如下:(1)[答案】 ...<eoa>\n (2)【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword": "2010-2022_Chinese_Language_Classical_Chinese_Reading",
"prefix_prompt":
"请解答下面的语文文言文阅读,仔细阅读题目,前三题是单选题,最后一题要将文言文翻译为现代汉语。请你一步步思考并把最终答案写在【答案】和<eoa>之间。选择题你要从选项中选出符合题意的答案,例如“【答案】A <eoa>”。翻译题把翻译后的现代汉语句子写在【答案】后面,例如”【答案】今天天气很好 <eoa>”\n完整的题目回答格式如下:(1)[答案】 ...<eoa>\n (2)【答案】...<eoa>\n请你严格按照上述格式作答,如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
},
{
"type": "subjective",
"keyword":
"2010-2022_Chinese_Language_Language_and_Writing_Skills_Open-ended_Questions",
"prefix_prompt":
"请解答下面的语文解答题,仔细阅读题目,注意其中可能含有选择题。请你一步步思考并将思考过程写在【解析】和<eoe>之间。请把你的最终答案写在【答案】和<eoa>之间。选择题你要从选项中选出符合题意的答案,例如“【答案】A <eoa>”。\n完整的题目回答格式如下:(1)【解析】 ...<eoe>\n【答案】 ...<eoa>\n (2)【解析】 ...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答。如果不止一道题,请分别作答。\n题目如下:",
"comment": ""
}
]
GaokaoBench_datasets = []
for _folder, _prompts in [
("Multiple-choice_Questions", _MCQ_prompts),
("Fill-in-the-blank_Questions", _FBQ_prompts),
("Open-ended_Questions", _OEQ_prompts),
]:
for _p in _prompts:
if _p['type'] == "single_choice":
continue
_reader_cfg = {
"input_columns": ['question'],
"output_column": 'answer',
}
_infer_cfg = {
"ice_template": {
"type": PromptTemplate,
"template": {
"round": [{
"role": "HUMAN",
"prompt": _p['prefix_prompt'] + '{question}'
}]
},
"ice_token": "</E>"
},
"retriever": {
"type": ZeroRetriever
},
"inferencer": {
"type": GenInferencer,
"max_out_len": 1024,
}
}
_eval_cfg = {
"evaluator": {
"type": "GaokaoBenchEvaluator" + "_" + _p['type'],
},
"pred_role": "BOT",
}
_base_path = './data/GAOKAO-BENCH/data'
_dataset = {
"type": GaokaoBenchDataset,
"abbr": "GaokaoBench_" + _p['keyword'],
"path": _base_path + '/' + _folder + '/' + _p['keyword'] + ".json",
"reader_cfg": _reader_cfg,
"infer_cfg": _infer_cfg,
"eval_cfg": _eval_cfg,
}
GaokaoBench_datasets.append(_dataset)
_folder = "Multiple-choice_Questions"
for _p in _MCQ_prompts:
if _p['type'] != "single_choice":
continue
_reader_cfg = {
"input_columns": ['question'],
"output_column": 'answer',
}
_infer_cfg = {
"ice_template": {
"type": PromptTemplate,
"template": {
answer: {
"round": [{
"role": "HUMAN",
"prompt": _p['prefix_prompt'] + '{question}'
}, {
"role": "BOT",
"prompt": f"【答案】{answer} <eoa>"
}]
}
for answer in ['A', 'B', 'C', 'D']
},
"ice_token": "</E>"
},
"retriever": {
"type": ZeroRetriever
},
"inferencer": {
"type": PPLInferencer
}
}
_eval_cfg = {
"evaluator": {
"type": "GaokaoBenchEvaluator" + "_" + _p['type'],
},
"pred_role": "BOT",
}
_base_path = './data/GAOKAO-BENCH/data'
_dataset = {
"type": GaokaoBenchDataset,
"abbr": "GaokaoBench_" + _p['keyword'],
"path": _base_path + '/' + _folder + '/' + _p['keyword'] + ".json",
"reader_cfg": _reader_cfg,
"infer_cfg": _infer_cfg,
"eval_cfg": _eval_cfg,
}
GaokaoBench_datasets.append(_dataset)
_temporary_variables = [k for k in globals() if k.startswith('_')]
for _t in _temporary_variables:
del globals()[_t]
del _temporary_variables, _t
================================================
FILE: eval/configs/datasets/PJExam/PJExam_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .PJExam_gen_8cd97c import PJExam_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/PJExam/PJExam_gen_8cd97c.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.datasets import PJExamDataset, PJExamEvaluator
PJExam_datasets = []
for _name in [
'gk-2022-v1', 'gk-2022-v1-math', 'gk-2023-v1', 'gk-2023-v1-math',
'gk-2023-v2', 'gk-2023-v2-math', 'zk-2022-v1'
]:
_hint = "请你做一道</major>选择题\n请你一步一步思考并将思考过程写在【解析】和<eoe>之间。你将从A,B,C,D中选出正确的答案,并写在【答案】和<eoa>之间。\n例如:【答案】A<eoa>\n完整的题目回答的格式如下:\n【解析】...<eoe>\n【答案】...<eoa>\n请你严格按照上述格式作答。\n题目如下:\n"
_reader_cfg = {
"input_columns": ['question'],
"output_column": 'std_ans',
},
_infer_cfg = {
"ice_template": {
"type": PromptTemplate,
"template": {
"round": [{
"role": "HUMAN",
"prompt": _hint + "{question}",
}]
},
"ice_token": "</E>"
},
"retriever": {
"type": ZeroRetriever
},
"inferencer": {
"type": GenInferencer,
"max_out_len": 1024,
}
}
_eval_cfg = {
"evaluator": {
"type": PJExamEvaluator
},
"pred_role": "BOT",
"ds_column": "eval_infos"
}
_dataset = {
"type": PJExamDataset,
"abbr": "PJExamDataset-" + _name,
"path": './data/PJExam',
"name": _name,
"reader_cfg": _reader_cfg,
"infer_cfg": _infer_cfg,
"eval_cfg": _eval_cfg,
}
PJExam_datasets.append(_dataset)
del _name, _hint, _reader_cfg, _infer_cfg, _eval_cfg, _dataset
================================================
FILE: eval/configs/datasets/SuperGLUE_AX_b/SuperGLUE_AX_b_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_AX_b_gen_4dfefa import AX_b_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_AX_b/SuperGLUE_AX_b_gen_4dfefa.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import AXDataset_V2
from opencompass.utils.text_postprocessors import first_option_postprocess
AX_b_reader_cfg = dict(
input_columns=["sentence1", "sentence2"],
output_column="label",
)
AX_b_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"{sentence1}\n{sentence2}\nIs the sentence below entailed by the sentence above?\nA. Yes\nB. No\nAnswer:"
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
AX_b_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_option_postprocess, options='AB'),
)
AX_b_datasets = [
dict(
abbr="AX_b",
type=AXDataset_V2,
path="./data/SuperGLUE/AX-b/AX-b.jsonl",
reader_cfg=AX_b_reader_cfg,
infer_cfg=AX_b_infer_cfg,
eval_cfg=AX_b_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_AX_b/SuperGLUE_AX_b_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_AX_b_ppl_6db806 import AX_b_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_AX_b/SuperGLUE_AX_b_ppl_0748aa.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
AX_b_reader_cfg = dict(
input_columns=['sentence1', 'sentence2'],
output_column='label',
test_split='train')
AX_b_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'entailment': '{sentence1}?entailment, {sentence2}',
'not_entailment': '{sentence1}?not_entailment, {sentence2}'
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
AX_b_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
AX_b_datasets = [
dict(
type=HFDataset,
abbr='AX_b',
path='json',
data_files='./data/SuperGLUE/AX-b/AX-b.jsonl',
split='train',
reader_cfg=AX_b_reader_cfg,
infer_cfg=AX_b_infer_cfg,
eval_cfg=AX_b_eval_cfg)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_AX_b/SuperGLUE_AX_b_ppl_6db806.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
AX_b_reader_cfg = dict(
input_columns=["sentence1", "sentence2"],
output_column="label",
test_split="train")
AX_b_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
"entailment":
dict(round=[
dict(
role="HUMAN",
prompt=
"{sentence1}\n{sentence2}\nIs the sentence below entailed by the sentence above?"
),
dict(role="BOT", prompt="Yes"),
]),
"not_entailment":
dict(round=[
dict(
role="HUMAN",
prompt=
"{sentence1}\n{sentence2}\nIs the sentence below entailed by the sentence above?"
),
dict(role="BOT", prompt="No"),
])
},
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer),
)
AX_b_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
AX_b_datasets = [
dict(
type=HFDataset,
abbr="AX_b",
path="json",
data_files="./data/SuperGLUE/AX-b/AX-b.jsonl",
split="train",
reader_cfg=AX_b_reader_cfg,
infer_cfg=AX_b_infer_cfg,
eval_cfg=AX_b_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_AX_g_gen_68aac7 import AX_g_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_gen_68aac7.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import AXDataset_V2
from opencompass.utils.text_postprocessors import first_option_postprocess
AX_g_reader_cfg = dict(
input_columns=["hypothesis", "premise"],
output_column="label",
)
AX_g_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"{premise}\n{hypothesis}\nIs the sentence below entailed by the sentence above?\nA. Yes\nB. No\nAnswer:"
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
AX_g_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_option_postprocess, options='AB'),
)
AX_g_datasets = [
dict(
abbr="AX_g",
type=AXDataset_V2,
path="./data/SuperGLUE/AX-g/AX-g.jsonl",
reader_cfg=AX_g_reader_cfg,
infer_cfg=AX_g_infer_cfg,
eval_cfg=AX_g_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_AX_g_ppl_66caf3 import AX_g_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl_50f8f6.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
AX_g_reader_cfg = dict(
input_columns=['hypothesis', 'premise'],
output_column='label',
test_split='train')
AX_g_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'entailment': '{premise}?entailment, {hypothesis}',
'not_entailment': '{premise}?not_entailment, {hypothesis}'
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
AX_g_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
AX_g_datasets = [
dict(
type=HFDataset,
abbr='AX_g',
path='json',
data_files='./data/SuperGLUE/AX-g/AX-g.jsonl',
split='train',
reader_cfg=AX_g_reader_cfg,
infer_cfg=AX_g_infer_cfg,
eval_cfg=AX_g_eval_cfg)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl_66caf3.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
AX_g_reader_cfg = dict(
input_columns=["hypothesis", "premise"],
output_column="label",
test_split="train")
AX_g_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
"entailment":
dict(round=[
dict(
role="HUMAN",
prompt=
"{premise}\n{hypothesis}\nIs the sentence below entailed by the sentence above?"
),
dict(role="BOT", prompt="Yes"),
]),
"not_entailment":
dict(round=[
dict(
role="HUMAN",
prompt=
"{premise}\n{hypothesis}\nIs the sentence below entailed by the sentence above?"
),
dict(role="BOT", prompt="No"),
])
},
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer),
)
AX_g_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
AX_g_datasets = [
dict(
type=HFDataset,
abbr="AX_g",
path="json",
data_files="./data/SuperGLUE/AX-g/AX-g.jsonl",
split="train",
reader_cfg=AX_g_reader_cfg,
infer_cfg=AX_g_infer_cfg,
eval_cfg=AX_g_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_BoolQ_gen_883d50 import BoolQ_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_gen_883d50.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import BoolQDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
BoolQ_reader_cfg = dict(
input_columns=["question", "passage"],
output_column="label",
)
BoolQ_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt="{passage}\nQuestion: {question}\nA. Yes\nB. No\nAnswer:"),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
BoolQ_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
BoolQ_datasets = [
dict(
abbr="BoolQ",
type=BoolQDataset_V2,
path="./data/SuperGLUE/BoolQ/val.jsonl",
reader_cfg=BoolQ_reader_cfg,
infer_cfg=BoolQ_infer_cfg,
eval_cfg=BoolQ_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_BoolQ_ppl_314b96 import BoolQ_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_314797.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import BoolQDataset_V3
BoolQ_reader_cfg = dict(
input_columns=["question", "passage"],
output_column="label",
test_split="train")
BoolQ_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'false':
dict(round=[
dict(role="HUMAN", prompt="Passage: {passage}\nQuestion: {question}?"),
dict(role="BOT", prompt="Answer: No"),
]),
'true':
dict(round=[
dict(role="HUMAN", prompt="Passage: {passage}\nQuestion: {question}?"),
dict(role="BOT", prompt="Answer: Yes"),
]),
},
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer),
)
BoolQ_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
BoolQ_datasets = [
dict(
abbr="BoolQ",
type=BoolQDataset_V3,
path="./data/SuperGLUE/BoolQ/val.jsonl",
reader_cfg=BoolQ_reader_cfg,
infer_cfg=BoolQ_infer_cfg,
eval_cfg=BoolQ_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_314b96.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import BoolQDataset
BoolQ_reader_cfg = dict(
input_columns=["question", "passage"],
output_column="answer",
test_split="train")
BoolQ_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0:
dict(round=[
dict(role="HUMAN", prompt="{passage}\nQuestion: {question}?"),
dict(role="BOT", prompt="No"),
]),
1:
dict(round=[
dict(role="HUMAN", prompt="{passage}\nQuestion: {question}?"),
dict(role="BOT", prompt="Yes"),
]),
},
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer),
)
BoolQ_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
BoolQ_datasets = [
dict(
type=BoolQDataset,
abbr="BoolQ",
path="json",
data_files="./data/SuperGLUE/BoolQ/val.jsonl",
split="train",
reader_cfg=BoolQ_reader_cfg,
infer_cfg=BoolQ_infer_cfg,
eval_cfg=BoolQ_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_4da4db.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import BoolQDataset
BoolQ_reader_cfg = dict(
input_columns=["question", "passage"],
output_column="answer",
test_split="train")
BoolQ_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0:
dict(round=[
dict(role="HUMAN", prompt="{passage}\nQuestion: {question}"),
dict(role="BOT", prompt="No."),
]),
1:
dict(round=[
dict(role="HUMAN", prompt="{passage}\nQuestion: {question}"),
dict(role="BOT", prompt="Yes."),
]),
},
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer),
)
BoolQ_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
BoolQ_datasets = [
dict(
type=BoolQDataset,
abbr="BoolQ",
path="json",
data_files="./data/SuperGLUE/BoolQ/val.jsonl",
split="train",
reader_cfg=BoolQ_reader_cfg,
infer_cfg=BoolQ_infer_cfg,
eval_cfg=BoolQ_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_9619db.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import BoolQDataset
BoolQ_reader_cfg = dict(
input_columns=['question', 'passage'],
output_column='answer',
test_split='train')
BoolQ_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0: "Passage:{passage}。\nQuestion:{question}。\nAnswer: No.",
1: "Passage:{passage}。\nQuestion:{question}。\nAnswer: Yes.",
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
BoolQ_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
BoolQ_datasets = [
dict(
type=BoolQDataset,
abbr='BoolQ',
path='json',
data_files='./data/SuperGLUE/BoolQ/val.jsonl',
split='train',
reader_cfg=BoolQ_reader_cfg,
infer_cfg=BoolQ_infer_cfg,
eval_cfg=BoolQ_eval_cfg)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_CB_gen_854c6c import CB_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_gen_854c6c.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import CBDataset_V2
from opencompass.utils.text_postprocessors import first_option_postprocess
CB_reader_cfg = dict(
input_columns=["premise", "hypothesis"],
output_column="label",
)
CB_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(
round=[
dict(
role="HUMAN",
prompt=
"{premise}\n{hypothesis}\nWhat is the relation between the two sentences?\nA. Contradiction\nB. Entailment\nC. Neutral\nAnswer:"
),
], ),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
CB_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_option_postprocess, options='ABC'),
)
CB_datasets = [
dict(
abbr="CB",
type=CBDataset_V2,
path="./data/SuperGLUE/CB/val.jsonl",
reader_cfg=CB_reader_cfg,
infer_cfg=CB_infer_cfg,
eval_cfg=CB_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_CB_ppl_0143fe import CB_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_ppl_0143fe.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
CB_reader_cfg = dict(
input_columns=["premise", "hypothesis"],
output_column="label",
)
CB_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
"contradiction":
dict(round=[
dict(
role="HUMAN",
prompt=
"{premise}\n{hypothesis}\nWhat is the relation between the two sentences?"
),
dict(role="BOT", prompt="Contradiction"),
]),
"entailment":
dict(round=[
dict(
role="HUMAN",
prompt=
"{premise}\n{hypothesis}\nWhat is the relation between the two sentences?"
),
dict(role="BOT", prompt="Entailment"),
]),
"neutral":
dict(round=[
dict(
role="HUMAN",
prompt=
"{premise}\n{hypothesis}\nWhat is the relation between the two sentences?"
),
dict(role="BOT", prompt="Neutral"),
]),
},
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer),
)
CB_eval_cfg = dict(evaluator=dict(type=AccEvaluator), )
CB_datasets = [
dict(
type=HFDataset,
abbr="CB",
path="json",
split="train",
data_files="./data/SuperGLUE/CB/val.jsonl",
reader_cfg=CB_reader_cfg,
infer_cfg=CB_infer_cfg,
eval_cfg=CB_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_ppl_11c175.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
CB_reader_cfg = dict(
input_columns=['premise', 'hypothesis'], output_column='label')
CB_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'contradiction': '{premise}?contradiction, {hypothesis}',
'entailment': '{premise}?entailment, {hypothesis}',
'neutral': '{premise}?neutral, {hypothesis}'
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
CB_eval_cfg = dict(evaluator=dict(type=AccEvaluator), )
CB_datasets = [
dict(
type=HFDataset,
abbr='CB',
path='json',
split='train',
data_files='./data/SuperGLUE/CB/val.jsonl',
reader_cfg=CB_reader_cfg,
infer_cfg=CB_infer_cfg,
eval_cfg=CB_eval_cfg)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_COPA/SuperGLUE_COPA_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_COPA_gen_91ca53 import COPA_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_COPA/SuperGLUE_COPA_gen_91ca53.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import COPADataset_V2
from opencompass.utils.text_postprocessors import first_option_postprocess
COPA_reader_cfg = dict(
input_columns=["question", "premise", "choice1", "choice2"],
output_column="label",
)
COPA_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(
round=[
dict(
role="HUMAN",
prompt=
"{premise}\nQuestion: Which may be the {question}?\nA. {choice1}\nB. {choice2}\nAnswer:"
),
], ),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
COPA_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_option_postprocess, options='AB'),
)
COPA_datasets = [
dict(
abbr="COPA",
type=COPADataset_V2,
path="./data/SuperGLUE/COPA/val.jsonl",
reader_cfg=COPA_reader_cfg,
infer_cfg=COPA_infer_cfg,
eval_cfg=COPA_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_COPA/SuperGLUE_COPA_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_COPA_ppl_9f3618 import COPA_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_COPA/SuperGLUE_COPA_ppl_54058d.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
COPA_reader_cfg = dict(
input_columns=['question', 'premise', 'choice1', 'choice2'],
output_column='label',
test_split='train')
COPA_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0: "Premise:{premise}。\nQuestion:{question}。\nAnswer: {choice1}.",
1: "Passage:{premise}。\nQuestion:{question}。\nAnswer: {choice2}.",
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
COPA_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
COPA_datasets = [
dict(
type=HFDataset,
abbr='COPA',
path='json',
data_files='./data/SuperGLUE/COPA/val.jsonl',
split='train',
reader_cfg=COPA_reader_cfg,
infer_cfg=COPA_infer_cfg,
eval_cfg=COPA_eval_cfg)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_COPA/SuperGLUE_COPA_ppl_5c24f1.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
COPA_reader_cfg = dict(
input_columns=["question", "premise", "choice1", "choice2"],
output_column="label",
test_split="train")
COPA_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0:
dict(round=[
dict(role="HUMAN", prompt="{premise}\nQuestion: {question}\nAnswer:"),
dict(role="BOT", prompt="{choice1}"),
]),
1:
dict(round=[
dict(role="HUMAN", prompt="{premise}\nQuestion: {question}\nAnswer:"),
dict(role="BOT", prompt="{choice2}"),
]),
},
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer),
)
COPA_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
COPA_datasets = [
dict(
type=HFDataset,
abbr="COPA",
path="json",
data_files="./data/SuperGLUE/COPA/val.jsonl",
split="train",
reader_cfg=COPA_reader_cfg,
infer_cfg=COPA_infer_cfg,
eval_cfg=COPA_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_COPA/SuperGLUE_COPA_ppl_9f3618.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
COPA_reader_cfg = dict(
input_columns=["question", "premise", "choice1", "choice2"],
output_column="label",
test_split="train")
COPA_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0:
dict(round=[
dict(
role="HUMAN",
prompt="{premise}\nQuestion: What may be the {question}?\nAnswer:"),
dict(role="BOT", prompt="{choice1}"),
]),
1:
dict(round=[
dict(
role="HUMAN",
prompt="{premise}\nQuestion: What may be the {question}?\nAnswer:"),
dict(role="BOT", prompt="{choice2}"),
]),
},
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer),
)
COPA_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
COPA_datasets = [
dict(
type=HFDataset,
abbr="COPA",
path="json",
data_files="./data/SuperGLUE/COPA/val.jsonl",
split="train",
reader_cfg=COPA_reader_cfg,
infer_cfg=COPA_infer_cfg,
eval_cfg=COPA_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_MultiRC/SuperGLUE_MultiRC_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_MultiRC_gen_27071f import MultiRC_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_MultiRC/SuperGLUE_MultiRC_gen_27071f.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import MultiRCDataset_V2
from opencompass.utils.text_postprocessors import first_option_postprocess
MultiRC_reader_cfg = dict(
input_columns=["question", "text", "answer"],
output_column="label",
)
MultiRC_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"{text}\nQuestion: {question}\nAnswer: {answer}\nIs it true?\nA. Yes\nB. No\nAnswer:"
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
MultiRC_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_option_postprocess, options='AB'),
)
MultiRC_datasets = [
dict(
abbr="MultiRC",
type=MultiRCDataset_V2,
path="./data/SuperGLUE/MultiRC/val.jsonl",
reader_cfg=MultiRC_reader_cfg,
infer_cfg=MultiRC_infer_cfg,
eval_cfg=MultiRC_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_MultiRC/SuperGLUE_MultiRC_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_MultiRC_ppl_ced824 import MultiRC_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_MultiRC/SuperGLUE_MultiRC_ppl_866273.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import MultiRCDataset
MultiRC_reader_cfg = dict(
input_columns=['question', 'text', 'answer'], output_column='label')
MultiRC_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0: "Passage:{text}。\nQuestion:{question}。\nAnswer: {answer}. It is false.",
1: "Passage:</P>。\nQuestion:{question}。\nAnswer: {answer}. It is true.",
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
MultiRC_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
MultiRC_datasets = [
dict(
type=MultiRCDataset,
abbr='MultiRC',
path='./data/SuperGLUE/MultiRC/val.jsonl',
reader_cfg=MultiRC_reader_cfg,
infer_cfg=MultiRC_infer_cfg,
eval_cfg=MultiRC_eval_cfg)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_MultiRC/SuperGLUE_MultiRC_ppl_ced824.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import MultiRCDataset
MultiRC_reader_cfg = dict(
input_columns=["question", "text", "answer"],
output_column="label",
)
MultiRC_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
0:
dict(round=[
dict(
role="HUMAN",
prompt="{text}\nQuestion: {question}\nAnswer: {answer}\nIs it true?"),
dict(role="BOT", prompt="No, it is false."),
]),
1:
dict(round=[
dict(
role="HUMAN",
prompt="{text}\nQuestion: {question}\nAnswer: {answer}\nIs it true?"),
dict(role="BOT", prompt="Yes, it is true."),
]),
},
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer),
)
MultiRC_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
MultiRC_datasets = [
dict(
type=MultiRCDataset,
abbr="MultiRC",
path="./data/SuperGLUE/MultiRC/val.jsonl",
reader_cfg=MultiRC_reader_cfg,
infer_cfg=MultiRC_infer_cfg,
eval_cfg=MultiRC_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_RTE/SuperGLUE_RTE_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_RTE_gen_68aac7 import RTE_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_RTE/SuperGLUE_RTE_gen_68aac7.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import AXDataset_V2
from opencompass.utils.text_postprocessors import first_option_postprocess
RTE_reader_cfg = dict(
input_columns=["hypothesis", "premise"],
output_column="label",
)
RTE_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"{premise}\n{hypothesis}\nIs the sentence below entailed by the sentence above?\nA. Yes\nB. No\nAnswer:"
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
RTE_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_option_postprocess, options='AB'),
)
RTE_datasets = [
dict(
abbr="RTE",
type=AXDataset_V2, # rte share the same format with ax
path="./data/SuperGLUE/RTE/val.jsonl",
reader_cfg=RTE_reader_cfg,
infer_cfg=RTE_infer_cfg,
eval_cfg=RTE_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_RTE/SuperGLUE_RTE_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_RTE_ppl_66caf3 import RTE_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_RTE/SuperGLUE_RTE_ppl_50f8f6.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
RTE_reader_cfg = dict(
input_columns=['hypothesis', 'premise'],
output_column='label',
test_split='train')
RTE_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
'entailment': '{premise}?entailment, {hypothesis}',
'not_entailment': '{premise}?not_entailment, {hypothesis}'
}),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer))
RTE_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
RTE_datasets = [
dict(
type=HFDataset,
abbr='RTE',
path='json',
data_files='./data/SuperGLUE/RTE/val.jsonl',
split='train',
reader_cfg=RTE_reader_cfg,
infer_cfg=RTE_infer_cfg,
eval_cfg=RTE_eval_cfg)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_RTE/SuperGLUE_RTE_ppl_66caf3.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import PPLInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import HFDataset
RTE_reader_cfg = dict(
input_columns=["hypothesis", "premise"],
output_column="label",
test_split="train")
RTE_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template={
"entailment":
dict(round=[
dict(
role="HUMAN",
prompt=
"{premise}\n{hypothesis}\nIs the sentence below entailed by the sentence above?"
),
dict(role="BOT", prompt="Yes"),
]),
"not_entailment":
dict(round=[
dict(
role="HUMAN",
prompt=
"{premise}\n{hypothesis}\nIs the sentence below entailed by the sentence above?"
),
dict(role="BOT", prompt="No"),
])
},
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer),
)
RTE_eval_cfg = dict(evaluator=dict(type=AccEvaluator))
RTE_datasets = [
dict(
type=HFDataset,
abbr="RTE",
path="json",
data_files="./data/SuperGLUE/RTE/val.jsonl",
split="train",
reader_cfg=RTE_reader_cfg,
infer_cfg=RTE_infer_cfg,
eval_cfg=RTE_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_ReCoRD/SuperGLUE_ReCoRD_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_ReCoRD_gen_30dea0 import ReCoRD_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_ReCoRD/SuperGLUE_ReCoRD_gen_0f7784.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import EMEvaluator
from opencompass.datasets import ReCoRDDataset, ReCoRD_postprocess
ReCoRD_reader_cfg = dict(
input_columns=['question', 'text'], output_column='answers')
ReCoRD_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=
"Passage:{text}\nResult:{question}\nQuestion: What entity does ____ refer to in the result?Give me the entity name:"),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer))
ReCoRD_eval_cfg = dict(
evaluator=dict(type=EMEvaluator), pred_postprocessor=dict(type=ReCoRD_postprocess))
ReCoRD_datasets = [
dict(
type=ReCoRDDataset,
abbr='ReCoRD',
path='./data/SuperGLUE/ReCoRD/val.jsonl',
reader_cfg=ReCoRD_reader_cfg,
infer_cfg=ReCoRD_infer_cfg,
eval_cfg=ReCoRD_eval_cfg)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_ReCoRD/SuperGLUE_ReCoRD_gen_30dea0.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import EMEvaluator
from opencompass.datasets import ReCoRDDataset
ReCoRD_reader_cfg = dict(
input_columns=["question", "text"],
output_column="answers",
)
ReCoRD_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"Passage: {text}\nResult: {question}\nQuestion: What entity does ____ refer to in the result? Give me the entity name:"
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
ReCoRD_eval_cfg = dict(
evaluator=dict(type=EMEvaluator),
pred_role='BOT',
pred_postprocessor=dict(type="ReCoRD"),
)
ReCoRD_datasets = [
dict(
type=ReCoRDDataset,
abbr="ReCoRD",
path="./data/SuperGLUE/ReCoRD/val.jsonl",
reader_cfg=ReCoRD_reader_cfg,
infer_cfg=ReCoRD_infer_cfg,
eval_cfg=ReCoRD_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_ReCoRD/SuperGLUE_ReCoRD_gen_a69961.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import EMEvaluator
from opencompass.datasets import ReCoRDDataset_V2, ReCoRD_postprocess
ReCoRD_reader_cfg = dict(
input_columns=['question', 'text'], output_column='answers')
ReCoRD_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN", prompt="Passage:\n{text}\nResult:\n{question}\nQuestion:\nWhat entity does ____ refer to in the Result?\nAnswer:"
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer))
ReCoRD_eval_cfg = dict(
evaluator=dict(type=EMEvaluator),
pred_role='BOT',
pred_postprocessor=dict(type=ReCoRD_postprocess))
ReCoRD_datasets = [
dict(
type=ReCoRDDataset_V2,
abbr='ReCoRD',
path='./data/SuperGLUE/ReCoRD/val.jsonl',
reader_cfg=ReCoRD_reader_cfg,
infer_cfg=ReCoRD_infer_cfg,
eval_cfg=ReCoRD_eval_cfg)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_WSC/SuperGLUE_WSC_gen.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_WSC_gen_8a881c import WSC_datasets # noqa: F401, F403
================================================
FILE: eval/configs/datasets/SuperGLUE_WSC/SuperGLUE_WSC_gen_6dc406.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import WSCDataset_V2
from opencompass.utils.text_postprocessors import first_capital_postprocess
WSC_reader_cfg = dict(
input_columns=["span1", "span2", "text"],
output_column="label",
)
WSC_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"{text}\nIs '{span1}' and '{span2}' refers to the same entity in the above sentence?\nA. Yes\nB. No\nAnseer:"
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
WSC_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
WSC_datasets = [
dict(
abbr="WSC",
type=WSCDataset_V2,
path="./data/SuperGLUE/WSC/val.jsonl",
reader_cfg=WSC_reader_cfg,
infer_cfg=WSC_infer_cfg,
eval_cfg=WSC_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_WSC/SuperGLUE_WSC_gen_8a881c.py
================================================
from opencompass.openicl.icl_prompt_template import PromptTemplate
from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.openicl.icl_evaluator import AccEvaluator
from opencompass.datasets import WSCDataset_V3
from opencompass.utils.text_postprocessors import first_capital_postprocess
WSC_reader_cfg = dict(
input_columns=["span1", "span2", "text"],
output_column="label",
)
WSC_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(
role="HUMAN",
prompt=
"Passage: {text}\nDoes the pronoun # {span2} # refer to * {span1} *?\nA. Yes\nB. No\nAnseer:"
),
]),
),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer),
)
WSC_eval_cfg = dict(
evaluator=dict(type=AccEvaluator),
pred_role="BOT",
pred_postprocessor=dict(type=first_capital_postprocess),
)
WSC_datasets = [
dict(
abbr="WSC",
type=WSCDataset_V3,
path="./data/SuperGLUE/WSC/val.jsonl",
reader_cfg=WSC_reader_cfg,
infer_cfg=WSC_infer_cfg,
eval_cfg=WSC_eval_cfg,
)
]
================================================
FILE: eval/configs/datasets/SuperGLUE_WSC/SuperGLUE_WSC_ppl.py
================================================
from mmengine.config import read_base
with read_base():
from .SuperGLUE_WSC_ppl_cbf31c import WSC_datasets # noqa: F401, F403
================================================
FILE:
gitextract_2gq2ldhy/ ├── README.md ├── eval/ │ ├── LICENSE │ ├── README.md │ ├── configs/ │ │ ├── datasets/ │ │ │ ├── ARC_c/ │ │ │ │ ├── ARC_c_gen.py │ │ │ │ ├── ARC_c_gen_1e0de5.py │ │ │ │ ├── ARC_c_ppl.py │ │ │ │ ├── ARC_c_ppl_2ef631.py │ │ │ │ ├── ARC_c_ppl_a450bd.py │ │ │ │ └── ARC_c_ppl_d52a21.py │ │ │ ├── ARC_e/ │ │ │ │ ├── ARC_e_gen.py │ │ │ │ ├── ARC_e_gen_1e0de5.py │ │ │ │ ├── ARC_e_ppl.py │ │ │ │ ├── ARC_e_ppl_2ef631.py │ │ │ │ ├── ARC_e_ppl_a450bd.py │ │ │ │ └── ARC_e_ppl_d52a21.py │ │ │ ├── CLUE_C3/ │ │ │ │ ├── CLUE_C3_gen.py │ │ │ │ ├── CLUE_C3_gen_8c358f.py │ │ │ │ ├── CLUE_C3_ppl.py │ │ │ │ ├── CLUE_C3_ppl_56b537.py │ │ │ │ └── CLUE_C3_ppl_e24a31.py │ │ │ ├── CLUE_CMRC/ │ │ │ │ ├── CLUE_CMRC_gen.py │ │ │ │ ├── CLUE_CMRC_gen_1bd3c8.py │ │ │ │ ├── CLUE_CMRC_gen_3749cd.py │ │ │ │ ├── CLUE_CMRC_gen_8484b9.py │ │ │ │ └── CLUE_CMRC_gen_941108.py │ │ │ ├── CLUE_DRCD/ │ │ │ │ ├── CLUE_DRCD_gen.py │ │ │ │ ├── CLUE_DRCD_gen_1bd3c8.py │ │ │ │ ├── CLUE_DRCD_gen_3749cd.py │ │ │ │ ├── CLUE_DRCD_gen_8484b9.py │ │ │ │ └── CLUE_DRCD_gen_941108.py │ │ │ ├── CLUE_afqmc/ │ │ │ │ ├── CLUE_afqmc_gen.py │ │ │ │ ├── CLUE_afqmc_gen_901306.py │ │ │ │ ├── CLUE_afqmc_ppl.py │ │ │ │ ├── CLUE_afqmc_ppl_378c5b.py │ │ │ │ ├── CLUE_afqmc_ppl_6507d7.py │ │ │ │ └── CLUE_afqmc_ppl_7b0c1e.py │ │ │ ├── CLUE_cmnli/ │ │ │ │ ├── CLUE_cmnli_gen.py │ │ │ │ ├── CLUE_cmnli_gen_1abf97.py │ │ │ │ ├── CLUE_cmnli_gen_51e956.py │ │ │ │ ├── CLUE_cmnli_ppl.py │ │ │ │ ├── CLUE_cmnli_ppl_98dd6e.py │ │ │ │ ├── CLUE_cmnli_ppl_ef69e7.py │ │ │ │ └── CLUE_cmnli_ppl_fdc6de.py │ │ │ ├── CLUE_ocnli/ │ │ │ │ ├── CLUE_ocnli_gen.py │ │ │ │ ├── CLUE_ocnli_gen_51e956.py │ │ │ │ ├── CLUE_ocnli_gen_c4cb6c.py │ │ │ │ ├── CLUE_ocnli_ppl.py │ │ │ │ ├── CLUE_ocnli_ppl_98dd6e.py │ │ │ │ ├── CLUE_ocnli_ppl_ef69e7.py │ │ │ │ └── CLUE_ocnli_ppl_fdc6de.py │ │ │ ├── FewCLUE_bustm/ │ │ │ │ ├── FewCLUE_bustm_gen.py │ │ │ │ ├── FewCLUE_bustm_gen_634f41.py │ │ │ │ ├── FewCLUE_bustm_ppl.py │ │ │ │ ├── FewCLUE_bustm_ppl_4b16c0.py │ │ │ │ ├── FewCLUE_bustm_ppl_9ef540.py │ │ │ │ └── FewCLUE_bustm_ppl_e53034.py │ │ │ ├── FewCLUE_chid/ │ │ │ │ ├── FewCLUE_chid_gen.py │ │ │ │ ├── FewCLUE_chid_gen_0a29a2.py │ │ │ │ ├── FewCLUE_chid_ppl.py │ │ │ │ ├── FewCLUE_chid_ppl_8f2872.py │ │ │ │ └── FewCLUE_chid_ppl_acccb5.py │ │ │ ├── FewCLUE_cluewsc/ │ │ │ │ ├── FewCLUE_cluewsc_gen.py │ │ │ │ ├── FewCLUE_cluewsc_gen_c68933.py │ │ │ │ ├── FewCLUE_cluewsc_ppl.py │ │ │ │ ├── FewCLUE_cluewsc_ppl_12e4e0.py │ │ │ │ ├── FewCLUE_cluewsc_ppl_4284a0.py │ │ │ │ └── FewCLUE_cluewsc_ppl_868415.py │ │ │ ├── FewCLUE_csl/ │ │ │ │ ├── FewCLUE_csl_gen.py │ │ │ │ ├── FewCLUE_csl_gen_28b223.py │ │ │ │ ├── FewCLUE_csl_gen_87f4a8.py │ │ │ │ ├── FewCLUE_csl_ppl.py │ │ │ │ ├── FewCLUE_csl_ppl_769f8d.py │ │ │ │ └── FewCLUE_csl_ppl_841b62.py │ │ │ ├── FewCLUE_eprstmt/ │ │ │ │ ├── FewCLUE_eprstmt_gen.py │ │ │ │ ├── FewCLUE_eprstmt_gen_740ea0.py │ │ │ │ ├── FewCLUE_eprstmt_ppl.py │ │ │ │ ├── FewCLUE_eprstmt_ppl_1ce587.py │ │ │ │ └── FewCLUE_eprstmt_ppl_f1e631.py │ │ │ ├── FewCLUE_ocnli_fc/ │ │ │ │ ├── FewCLUE_ocnli_fc_gen.py │ │ │ │ ├── FewCLUE_ocnli_fc_gen_f97a97.py │ │ │ │ ├── FewCLUE_ocnli_fc_ppl.py │ │ │ │ ├── FewCLUE_ocnli_fc_ppl_9e8b3d.py │ │ │ │ └── FewCLUE_ocnli_fc_ppl_c08300.py │ │ │ ├── FewCLUE_tnews/ │ │ │ │ ├── FewCLUE_tnews_gen.py │ │ │ │ ├── FewCLUE_tnews_gen_b90e4a.py │ │ │ │ ├── FewCLUE_tnews_ppl.py │ │ │ │ ├── FewCLUE_tnews_ppl_7d1c07.py │ │ │ │ ├── FewCLUE_tnews_ppl_d10e8a.py │ │ │ │ └── FewCLUE_tnews_ppl_fff486.py │ │ │ ├── GaokaoBench/ │ │ │ │ ├── GaokaoBench_gen.py │ │ │ │ ├── GaokaoBench_gen_5cfe9e.py │ │ │ │ ├── GaokaoBench_mixed.py │ │ │ │ └── GaokaoBench_mixed_f2038e.py │ │ │ ├── PJExam/ │ │ │ │ ├── PJExam_gen.py │ │ │ │ └── PJExam_gen_8cd97c.py │ │ │ ├── SuperGLUE_AX_b/ │ │ │ │ ├── SuperGLUE_AX_b_gen.py │ │ │ │ ├── SuperGLUE_AX_b_gen_4dfefa.py │ │ │ │ ├── SuperGLUE_AX_b_ppl.py │ │ │ │ ├── SuperGLUE_AX_b_ppl_0748aa.py │ │ │ │ └── SuperGLUE_AX_b_ppl_6db806.py │ │ │ ├── SuperGLUE_AX_g/ │ │ │ │ ├── SuperGLUE_AX_g_gen.py │ │ │ │ ├── SuperGLUE_AX_g_gen_68aac7.py │ │ │ │ ├── SuperGLUE_AX_g_ppl.py │ │ │ │ ├── SuperGLUE_AX_g_ppl_50f8f6.py │ │ │ │ └── SuperGLUE_AX_g_ppl_66caf3.py │ │ │ ├── SuperGLUE_BoolQ/ │ │ │ │ ├── SuperGLUE_BoolQ_gen.py │ │ │ │ ├── SuperGLUE_BoolQ_gen_883d50.py │ │ │ │ ├── SuperGLUE_BoolQ_ppl.py │ │ │ │ ├── SuperGLUE_BoolQ_ppl_314797.py │ │ │ │ ├── SuperGLUE_BoolQ_ppl_314b96.py │ │ │ │ ├── SuperGLUE_BoolQ_ppl_4da4db.py │ │ │ │ └── SuperGLUE_BoolQ_ppl_9619db.py │ │ │ ├── SuperGLUE_CB/ │ │ │ │ ├── SuperGLUE_CB_gen.py │ │ │ │ ├── SuperGLUE_CB_gen_854c6c.py │ │ │ │ ├── SuperGLUE_CB_ppl.py │ │ │ │ ├── SuperGLUE_CB_ppl_0143fe.py │ │ │ │ └── SuperGLUE_CB_ppl_11c175.py │ │ │ ├── SuperGLUE_COPA/ │ │ │ │ ├── SuperGLUE_COPA_gen.py │ │ │ │ ├── SuperGLUE_COPA_gen_91ca53.py │ │ │ │ ├── SuperGLUE_COPA_ppl.py │ │ │ │ ├── SuperGLUE_COPA_ppl_54058d.py │ │ │ │ ├── SuperGLUE_COPA_ppl_5c24f1.py │ │ │ │ └── SuperGLUE_COPA_ppl_9f3618.py │ │ │ ├── SuperGLUE_MultiRC/ │ │ │ │ ├── SuperGLUE_MultiRC_gen.py │ │ │ │ ├── SuperGLUE_MultiRC_gen_27071f.py │ │ │ │ ├── SuperGLUE_MultiRC_ppl.py │ │ │ │ ├── SuperGLUE_MultiRC_ppl_866273.py │ │ │ │ └── SuperGLUE_MultiRC_ppl_ced824.py │ │ │ ├── SuperGLUE_RTE/ │ │ │ │ ├── SuperGLUE_RTE_gen.py │ │ │ │ ├── SuperGLUE_RTE_gen_68aac7.py │ │ │ │ ├── SuperGLUE_RTE_ppl.py │ │ │ │ ├── SuperGLUE_RTE_ppl_50f8f6.py │ │ │ │ └── SuperGLUE_RTE_ppl_66caf3.py │ │ │ ├── SuperGLUE_ReCoRD/ │ │ │ │ ├── SuperGLUE_ReCoRD_gen.py │ │ │ │ ├── SuperGLUE_ReCoRD_gen_0f7784.py │ │ │ │ ├── SuperGLUE_ReCoRD_gen_30dea0.py │ │ │ │ └── SuperGLUE_ReCoRD_gen_a69961.py │ │ │ ├── SuperGLUE_WSC/ │ │ │ │ ├── SuperGLUE_WSC_gen.py │ │ │ │ ├── SuperGLUE_WSC_gen_6dc406.py │ │ │ │ ├── SuperGLUE_WSC_gen_8a881c.py │ │ │ │ ├── SuperGLUE_WSC_ppl.py │ │ │ │ ├── SuperGLUE_WSC_ppl_003529.py │ │ │ │ ├── SuperGLUE_WSC_ppl_cbf31c.py │ │ │ │ ├── SuperGLUE_WSC_ppl_d0f531.py │ │ │ │ └── SuperGLUE_WSC_ppl_f37e78.py │ │ │ ├── SuperGLUE_WiC/ │ │ │ │ ├── SuperGLUE_WiC_gen.py │ │ │ │ ├── SuperGLUE_WiC_gen_d06864.py │ │ │ │ ├── SuperGLUE_WiC_ppl.py │ │ │ │ ├── SuperGLUE_WiC_ppl_312de9.py │ │ │ │ ├── SuperGLUE_WiC_ppl_3fb6fd.py │ │ │ │ └── SuperGLUE_WiC_ppl_c926be.py │ │ │ ├── TheoremQA/ │ │ │ │ ├── TheoremQA_gen.py │ │ │ │ ├── TheoremQA_gen_424e0a.py │ │ │ │ ├── TheoremQA_gen_7009de.py │ │ │ │ └── TheoremQA_gen_ef26ca.py │ │ │ ├── XCOPA/ │ │ │ │ ├── XCOPA_ppl.py │ │ │ │ └── XCOPA_ppl_54058d.py │ │ │ ├── XLSum/ │ │ │ │ ├── XLSum_gen.py │ │ │ │ └── XLSum_gen_2bb71c.py │ │ │ ├── Xsum/ │ │ │ │ ├── Xsum_gen.py │ │ │ │ ├── Xsum_gen_31397e.py │ │ │ │ └── Xsum_gen_8ea5f8.py │ │ │ ├── adv_glue/ │ │ │ │ ├── __init__.py │ │ │ │ ├── adv_glue_mnli/ │ │ │ │ │ ├── adv_glue_mnli_gen.py │ │ │ │ │ └── adv_glue_mnli_gen_bd8ef0.py │ │ │ │ ├── adv_glue_mnli_mm/ │ │ │ │ │ ├── adv_glue_mnli_mm_gen.py │ │ │ │ │ └── adv_glue_mnli_mm_gen_bd8ef0.py │ │ │ │ ├── adv_glue_qnli/ │ │ │ │ │ ├── adv_glue_qnli_gen.py │ │ │ │ │ └── adv_glue_qnli_gen_0b7326.py │ │ │ │ ├── adv_glue_qqp/ │ │ │ │ │ ├── adv_glue_qqp_gen.py │ │ │ │ │ └── adv_glue_qqp_gen_cdc277.py │ │ │ │ ├── adv_glue_rte/ │ │ │ │ │ ├── adv_glue_rte_gen.py │ │ │ │ │ └── adv_glue_rte_gen_8cc547.py │ │ │ │ └── adv_glue_sst2/ │ │ │ │ ├── adv_glue_sst2_gen.py │ │ │ │ └── adv_glue_sst2_gen_ee8d3b.py │ │ │ ├── agieval/ │ │ │ │ ├── agieval_gen.py │ │ │ │ ├── agieval_gen_64afd3.py │ │ │ │ ├── agieval_gen_a0c741.py │ │ │ │ ├── agieval_mixed.py │ │ │ │ └── agieval_mixed_2f14ad.py │ │ │ ├── anli/ │ │ │ │ ├── anli_gen.py │ │ │ │ ├── anli_gen_fc7328.py │ │ │ │ ├── anli_ppl.py │ │ │ │ └── anli_ppl_1d290e.py │ │ │ ├── apps/ │ │ │ │ ├── apps_gen.py │ │ │ │ ├── apps_gen_5b4254.py │ │ │ │ ├── apps_gen_7fbb95.py │ │ │ │ └── apps_gen_b4dee3.py │ │ │ ├── bbh/ │ │ │ │ ├── bbh_gen.py │ │ │ │ ├── bbh_gen_5b92b0.py │ │ │ │ ├── bbh_gen_5bf00b.py │ │ │ │ └── lib_prompt/ │ │ │ │ ├── boolean_expressions.txt │ │ │ │ ├── causal_judgement.txt │ │ │ │ ├── date_understanding.txt │ │ │ │ ├── disambiguation_qa.txt │ │ │ │ ├── dyck_languages.txt │ │ │ │ ├── formal_fallacies.txt │ │ │ │ ├── geometric_shapes.txt │ │ │ │ ├── hyperbaton.txt │ │ │ │ ├── logical_deduction_five_objects.txt │ │ │ │ ├── logical_deduction_seven_objects.txt │ │ │ │ ├── logical_deduction_three_objects.txt │ │ │ │ ├── movie_recommendation.txt │ │ │ │ ├── multistep_arithmetic_two.txt │ │ │ │ ├── navigate.txt │ │ │ │ ├── object_counting.txt │ │ │ │ ├── penguins_in_a_table.txt │ │ │ │ ├── reasoning_about_colored_objects.txt │ │ │ │ ├── ruin_names.txt │ │ │ │ ├── salient_translation_error_detection.txt │ │ │ │ ├── snarks.txt │ │ │ │ ├── sports_understanding.txt │ │ │ │ ├── temporal_sequences.txt │ │ │ │ ├── tracking_shuffled_objects_five_objects.txt │ │ │ │ ├── tracking_shuffled_objects_seven_objects.txt │ │ │ │ ├── tracking_shuffled_objects_three_objects.txt │ │ │ │ ├── web_of_lies.txt │ │ │ │ └── word_sorting.txt │ │ │ ├── ceval/ │ │ │ │ ├── ceval_gen.py │ │ │ │ ├── ceval_gen_2daf24.py │ │ │ │ ├── ceval_gen_5f30c7.py │ │ │ │ ├── ceval_ppl.py │ │ │ │ ├── ceval_ppl_578f8d.py │ │ │ │ └── ceval_ppl_93e5ce.py │ │ │ ├── civilcomments/ │ │ │ │ ├── civilcomments_clp.py │ │ │ │ ├── civilcomments_clp_6a2561.py │ │ │ │ └── civilcomments_clp_a3c5fd.py │ │ │ ├── cmb/ │ │ │ │ ├── cmb_gen.py │ │ │ │ └── cmb_gen_72cbb7.py │ │ │ ├── cmmlu/ │ │ │ │ ├── cmmlu_gen.py │ │ │ │ ├── cmmlu_gen_c13365.py │ │ │ │ ├── cmmlu_ppl.py │ │ │ │ └── cmmlu_ppl_8b9c76.py │ │ │ ├── collections/ │ │ │ │ ├── base_medium.py │ │ │ │ ├── base_medium_llama.py │ │ │ │ ├── base_small.py │ │ │ │ ├── chat_medium.py │ │ │ │ ├── chat_small.py │ │ │ │ ├── example.py │ │ │ │ └── leaderboard/ │ │ │ │ ├── qwen.py │ │ │ │ └── qwen_chat.py │ │ │ ├── commonsenseqa/ │ │ │ │ ├── commonsenseqa_gen.py │ │ │ │ ├── commonsenseqa_gen_c946f2.py │ │ │ │ ├── commonsenseqa_ppl.py │ │ │ │ ├── commonsenseqa_ppl_3e9f2d.py │ │ │ │ ├── commonsenseqa_ppl_5545e2.py │ │ │ │ └── commonsenseqa_ppl_716f78.py │ │ │ ├── crowspairs/ │ │ │ │ ├── crowspairs_gen.py │ │ │ │ ├── crowspairs_gen_02b6c1.py │ │ │ │ ├── crowspairs_gen_381af0.py │ │ │ │ ├── crowspairs_ppl.py │ │ │ │ ├── crowspairs_ppl_47f211.py │ │ │ │ └── crowspairs_ppl_e811e1.py │ │ │ ├── cvalues/ │ │ │ │ ├── cvalues_responsibility_gen.py │ │ │ │ └── cvalues_responsibility_gen_543378.py │ │ │ ├── drop/ │ │ │ │ ├── drop_gen.py │ │ │ │ └── drop_gen_599f07.py │ │ │ ├── ds1000/ │ │ │ │ └── ds1000_gen_cbc84f.py │ │ │ ├── flores/ │ │ │ │ ├── flores_gen.py │ │ │ │ ├── flores_gen_806ede.py │ │ │ │ └── flores_gen_aad4fd.py │ │ │ ├── game24/ │ │ │ │ ├── game24_gen.py │ │ │ │ └── game24_gen_52a460.py │ │ │ ├── govrepcrs/ │ │ │ │ ├── govrepcrs_gen.py │ │ │ │ ├── govrepcrs_gen_aa5eb3.py │ │ │ │ └── govrepcrs_gen_db7930.py │ │ │ ├── gsm8k/ │ │ │ │ ├── gsm8k_gen.py │ │ │ │ ├── gsm8k_gen_1d7fe4.py │ │ │ │ ├── gsm8k_gen_1dce88.py │ │ │ │ ├── gsm8k_gen_a3e34a.py │ │ │ │ └── gsm8k_gen_e9e91e.py │ │ │ ├── hellaswag/ │ │ │ │ ├── hellaswag_gen.py │ │ │ │ ├── hellaswag_gen_6faab5.py │ │ │ │ ├── hellaswag_ppl.py │ │ │ │ ├── hellaswag_ppl_47bff9.py │ │ │ │ ├── hellaswag_ppl_9dbb12.py │ │ │ │ └── hellaswag_ppl_a6e128.py │ │ │ ├── humaneval/ │ │ │ │ ├── humaneval_gen.py │ │ │ │ ├── humaneval_gen_6f294d.py │ │ │ │ ├── humaneval_gen_8e312c.py │ │ │ │ ├── humaneval_gen_a82cae.py │ │ │ │ ├── humaneval_gen_fd5822.py │ │ │ │ └── humaneval_gen_ff7054.py │ │ │ ├── humanevalx/ │ │ │ │ ├── humanevalx_gen.py │ │ │ │ ├── humanevalx_gen_0af626.py │ │ │ │ └── humanevalx_gen_620cfa.py │ │ │ ├── iwslt2017/ │ │ │ │ ├── iwslt2017_gen.py │ │ │ │ ├── iwslt2017_gen_69ce16.py │ │ │ │ ├── iwslt2017_gen_b4a814.py │ │ │ │ └── iwslt2017_gen_d0ebd1.py │ │ │ ├── jigsawmultilingual/ │ │ │ │ ├── jigsawmultilingual_clp.py │ │ │ │ ├── jigsawmultilingual_clp_1af0ae.py │ │ │ │ └── jigsawmultilingual_clp_fe50d8.py │ │ │ ├── lambada/ │ │ │ │ ├── lambada_gen.py │ │ │ │ ├── lambada_gen_217e11.py │ │ │ │ └── lambada_gen_8b48a5.py │ │ │ ├── lcsts/ │ │ │ │ ├── lcsts_gen.py │ │ │ │ ├── lcsts_gen_8ee1fe.py │ │ │ │ └── lcsts_gen_9b0b89.py │ │ │ ├── leval/ │ │ │ │ ├── leval.py │ │ │ │ ├── levalcoursera/ │ │ │ │ │ ├── leval_coursera_gen.py │ │ │ │ │ └── leval_coursera_gen_36a006.py │ │ │ │ ├── levalfinancialqa/ │ │ │ │ │ ├── leval_financialqa_gen.py │ │ │ │ │ └── leval_financialqa_gen_b03798.py │ │ │ │ ├── levalgovreportsumm/ │ │ │ │ │ ├── leval_gov_report_summ_gen.py │ │ │ │ │ └── leval_gov_report_summ_gen_b03798.py │ │ │ │ ├── levalgsm100/ │ │ │ │ │ ├── leval_gsm100_gen.py │ │ │ │ │ └── leval_gsm100_gen_77dd94.py │ │ │ │ ├── levallegalcontractqa/ │ │ │ │ │ ├── leval_legalcontractqa_gen.py │ │ │ │ │ └── leval_legalcontractqa_gen_68a2ac.py │ │ │ │ ├── levalmeetingsumm/ │ │ │ │ │ ├── leval_meetingsumm_gen.py │ │ │ │ │ └── leval_meetingsumm_gen_b03798.py │ │ │ │ ├── levalmultidocqa/ │ │ │ │ │ ├── leval_multidocqa_gen.py │ │ │ │ │ └── leval_multidocqa_gen_96bf3f.py │ │ │ │ ├── levalnarrativeqa/ │ │ │ │ │ ├── leval_narrativeqa_gen.py │ │ │ │ │ └── leval_narrativeqa_gen_766dd0.py │ │ │ │ ├── levalnaturalquestion/ │ │ │ │ │ ├── leval_naturalquestion_gen.py │ │ │ │ │ └── leval_naturalquestion_gen_52c33f.py │ │ │ │ ├── levalnewssumm/ │ │ │ │ │ ├── leval_newssumm_gen.py │ │ │ │ │ └── leval_newssumm_gen_b03798.py │ │ │ │ ├── levalpaperassistant/ │ │ │ │ │ ├── leval_paper_assistant_gen.py │ │ │ │ │ └── leval_paper_assistant_gen_b03798.py │ │ │ │ ├── levalpatentsumm/ │ │ │ │ │ ├── leval_patent_summ_gen.py │ │ │ │ │ └── leval_patent_summ_gen_b03798.py │ │ │ │ ├── levalquality/ │ │ │ │ │ ├── leval_quality_gen.py │ │ │ │ │ └── leval_quality_gen_36a006.py │ │ │ │ ├── levalreviewsumm/ │ │ │ │ │ ├── leval_review_summ_gen.py │ │ │ │ │ └── leval_review_summ_gen_b03798.py │ │ │ │ ├── levalscientificqa/ │ │ │ │ │ ├── leval_scientificqa_gen.py │ │ │ │ │ └── leval_scientificqa_gen_96bf3f.py │ │ │ │ ├── levaltopicretrieval/ │ │ │ │ │ ├── leval_topic_retrieval_gen.py │ │ │ │ │ └── leval_topic_retrieval_gen_bf433f.py │ │ │ │ ├── levaltpo/ │ │ │ │ │ ├── leval_tpo_gen.py │ │ │ │ │ └── leval_tpo_gen_36a006.py │ │ │ │ └── levaltvshowsumm/ │ │ │ │ ├── leval_tvshow_summ_gen.py │ │ │ │ └── leval_tvshow_summ_gen_b03798.py │ │ │ ├── longbench/ │ │ │ │ ├── longbench.py │ │ │ │ ├── longbench2wikimqa/ │ │ │ │ │ ├── longbench_2wikimqa_gen.py │ │ │ │ │ └── longbench_2wikimqa_gen_6b3efc.py │ │ │ │ ├── longbenchdureader/ │ │ │ │ │ ├── longbench_dureader_gen.py │ │ │ │ │ └── longbench_dureader_gen_c6c7e4.py │ │ │ │ ├── longbenchgov_report/ │ │ │ │ │ ├── longbench_gov_report_gen.py │ │ │ │ │ └── longbench_gov_report_gen_54c5b0.py │ │ │ │ ├── longbenchhotpotqa/ │ │ │ │ │ ├── longbench_hotpotqa_gen.py │ │ │ │ │ └── longbench_hotpotqa_gen_6b3efc.py │ │ │ │ ├── longbenchlcc/ │ │ │ │ │ ├── longbench_lcc_gen.py │ │ │ │ │ └── longbench_lcc_gen_6ba507.py │ │ │ │ ├── longbenchlsht/ │ │ │ │ │ ├── longbench_lsht_gen.py │ │ │ │ │ └── longbench_lsht_gen_e8a339.py │ │ │ │ ├── longbenchmultifieldqa_en/ │ │ │ │ │ ├── longbench_multifieldqa_en_gen.py │ │ │ │ │ └── longbench_multifieldqa_en_gen_d3838e.py │ │ │ │ ├── longbenchmultifieldqa_zh/ │ │ │ │ │ ├── longbench_multifieldqa_zh_gen.py │ │ │ │ │ └── longbench_multifieldqa_zh_gen_e9a7ef.py │ │ │ │ ├── longbenchmusique/ │ │ │ │ │ ├── longbench_musique_gen.py │ │ │ │ │ └── longbench_musique_gen_6b3efc.py │ │ │ │ ├── longbenchnarrativeqa/ │ │ │ │ │ ├── longbench_narrativeqa_gen.py │ │ │ │ │ └── longbench_narrativeqa_gen_a68305.py │ │ │ │ ├── longbenchnq/ │ │ │ │ │ ├── longbench_nq_gen.py │ │ │ │ │ └── longbench_nq_gen_d30cb9.py │ │ │ │ ├── longbenchpassage_count/ │ │ │ │ │ ├── longbench_passage_count_gen.py │ │ │ │ │ └── longbench_passage_count_gen_dcdaab.py │ │ │ │ ├── longbenchpassage_retrieval_en/ │ │ │ │ │ ├── longbench_passage_retrieval_en_gen.py │ │ │ │ │ └── longbench_passage_retrieval_en_gen_734db5.py │ │ │ │ ├── longbenchpassage_retrieval_zh/ │ │ │ │ │ ├── longbench_passage_retrieval_zh_gen.py │ │ │ │ │ └── longbench_passage_retrieval_zh_gen_01cca2.py │ │ │ │ ├── longbenchqasper/ │ │ │ │ │ ├── longbench_qasper_gen.py │ │ │ │ │ └── longbench_qasper_gen_6b3efc.py │ │ │ │ ├── longbenchqmsum/ │ │ │ │ │ ├── longbench_qmsum_gen.py │ │ │ │ │ └── longbench_qmsum_gen_d33331.py │ │ │ │ ├── longbenchrepobench/ │ │ │ │ │ ├── longbench_repobench_gen.py │ │ │ │ │ └── longbench_repobench_gen_6df953.py │ │ │ │ ├── longbenchtrec/ │ │ │ │ │ ├── longbench_trec_gen.py │ │ │ │ │ └── longbench_trec_gen_824187.py │ │ │ │ ├── longbenchtriviaqa/ │ │ │ │ │ ├── longbench_triviaqa_gen.py │ │ │ │ │ └── longbench_triviaqa_gen_d30cb9.py │ │ │ │ └── longbenchvcsum/ │ │ │ │ ├── longbench_vcsum_gen.py │ │ │ │ └── longbench_vcsum_gen_f7a8ac.py │ │ │ ├── math/ │ │ │ │ ├── math_gen.py │ │ │ │ ├── math_gen_265cce.py │ │ │ │ ├── math_gen_559593.py │ │ │ │ └── math_gen_5e8458.py │ │ │ ├── mbpp/ │ │ │ │ ├── mbpp_gen.py │ │ │ │ ├── mbpp_gen_1e1056.py │ │ │ │ ├── mbpp_gen_5d6316.py │ │ │ │ ├── mbpp_gen_6590b0.py │ │ │ │ └── mbpp_gen_78c1bc.py │ │ │ ├── mmlu/ │ │ │ │ ├── mmlu_gen.py │ │ │ │ ├── mmlu_gen_23a9a9.py │ │ │ │ ├── mmlu_gen_5d1409.py │ │ │ │ ├── mmlu_gen_79e572.py │ │ │ │ ├── mmlu_gen_a484b3.py │ │ │ │ ├── mmlu_ppl.py │ │ │ │ └── mmlu_ppl_ac766d.py │ │ │ ├── music_theory_bench/ │ │ │ │ ├── music_theory_bench_ppl_few_shot.py │ │ │ │ └── music_theory_bench_ppl_zero_shot.py │ │ │ ├── narrativeqa/ │ │ │ │ ├── narrativeqa_gen.py │ │ │ │ ├── narrativeqa_gen_a2d88a.py │ │ │ │ └── narrativeqa_gen_db6413.py │ │ │ ├── nq/ │ │ │ │ ├── nq_gen.py │ │ │ │ ├── nq_gen_0356ec.py │ │ │ │ ├── nq_gen_2463e2.py │ │ │ │ ├── nq_gen_3dcea1.py │ │ │ │ ├── nq_gen_68c1c6.py │ │ │ │ └── nq_gen_c788f6.py │ │ │ ├── obqa/ │ │ │ │ ├── obqa_gen.py │ │ │ │ ├── obqa_gen_9069e4.py │ │ │ │ ├── obqa_ppl.py │ │ │ │ ├── obqa_ppl_1defe8.py │ │ │ │ ├── obqa_ppl_6aac9e.py │ │ │ │ └── obqa_ppl_c7c154.py │ │ │ ├── piqa/ │ │ │ │ ├── piqa_gen.py │ │ │ │ ├── piqa_gen_1194eb.py │ │ │ │ ├── piqa_ppl.py │ │ │ │ ├── piqa_ppl_0cfff2.py │ │ │ │ ├── piqa_ppl_1cf9f0.py │ │ │ │ └── piqa_ppl_3431ea.py │ │ │ ├── promptbench/ │ │ │ │ ├── promptbench_iwslt2017_gen_cbb8c8.py │ │ │ │ ├── promptbench_math_gen_abf776.py │ │ │ │ ├── promptbench_squad20_gen_b15d1c.py │ │ │ │ └── promptbench_wnli_gen_50662f.py │ │ │ ├── qabench/ │ │ │ │ ├── qabench_gen.py │ │ │ │ └── qabench_gen_353ae7.py │ │ │ ├── qasper/ │ │ │ │ ├── qasper_gen.py │ │ │ │ ├── qasper_gen_a2d88a.py │ │ │ │ └── qasper_gen_db6413.py │ │ │ ├── qaspercut/ │ │ │ │ ├── qaspercut_gen.py │ │ │ │ ├── qaspercut_gen_a2d88a.py │ │ │ │ └── qaspercut_gen_db6413.py │ │ │ ├── race/ │ │ │ │ ├── race_gen.py │ │ │ │ ├── race_gen_69ee4f.py │ │ │ │ ├── race_gen_9302a5.py │ │ │ │ ├── race_ppl.py │ │ │ │ ├── race_ppl_5831a0.py │ │ │ │ ├── race_ppl_a138cd.py │ │ │ │ └── race_ppl_abed12.py │ │ │ ├── realtoxicprompts/ │ │ │ │ ├── realtoxicprompts_gen.py │ │ │ │ ├── realtoxicprompts_gen_7605e4.py │ │ │ │ └── realtoxicprompts_gen_ac723c.py │ │ │ ├── safety/ │ │ │ │ ├── safety_gen.py │ │ │ │ └── safety_gen_7ce197.py │ │ │ ├── siqa/ │ │ │ │ ├── siqa_gen.py │ │ │ │ ├── siqa_gen_e78df3.py │ │ │ │ ├── siqa_ppl.py │ │ │ │ ├── siqa_ppl_42bc6e.py │ │ │ │ ├── siqa_ppl_7845b0.py │ │ │ │ ├── siqa_ppl_ced5f6.py │ │ │ │ └── siqa_ppl_e8d8c5.py │ │ │ ├── squad20/ │ │ │ │ ├── squad20_gen.py │ │ │ │ └── squad20_gen_1710bc.py │ │ │ ├── storycloze/ │ │ │ │ ├── storycloze_gen.py │ │ │ │ ├── storycloze_gen_7f656a.py │ │ │ │ ├── storycloze_ppl.py │ │ │ │ ├── storycloze_ppl_496661.py │ │ │ │ └── storycloze_ppl_afd16f.py │ │ │ ├── strategyqa/ │ │ │ │ ├── strategyqa_gen.py │ │ │ │ ├── strategyqa_gen_1180a7.py │ │ │ │ └── strategyqa_gen_934441.py │ │ │ ├── summedits/ │ │ │ │ ├── summedits_gen.py │ │ │ │ ├── summedits_gen_315438.py │ │ │ │ ├── summedits_gen_4fb38b.py │ │ │ │ ├── summedits_ppl.py │ │ │ │ ├── summedits_ppl_1fbeb6.py │ │ │ │ ├── summedits_ppl_3c30d0.py │ │ │ │ └── summedits_ppl_fa58ba.py │ │ │ ├── summscreen/ │ │ │ │ ├── summscreen_gen.py │ │ │ │ ├── summscreen_gen_653185.py │ │ │ │ └── summscreen_gen_aa5eb3.py │ │ │ ├── triviaqa/ │ │ │ │ ├── triviaqa_gen.py │ │ │ │ ├── triviaqa_gen_0356ec.py │ │ │ │ ├── triviaqa_gen_2121ce.py │ │ │ │ ├── triviaqa_gen_3e39a5.py │ │ │ │ ├── triviaqa_gen_429db5.py │ │ │ │ └── triviaqa_gen_d297bb.py │ │ │ ├── triviaqarc/ │ │ │ │ ├── triviaqarc_gen.py │ │ │ │ ├── triviaqarc_gen_a2d88a.py │ │ │ │ └── triviaqarc_gen_db6413.py │ │ │ ├── truthfulqa/ │ │ │ │ ├── truthfulqa_gen.py │ │ │ │ ├── truthfulqa_gen_1e7d8d.py │ │ │ │ └── truthfulqa_gen_5ddc62.py │ │ │ ├── tydiqa/ │ │ │ │ ├── tydiqa_gen.py │ │ │ │ └── tydiqa_gen_978d2a.py │ │ │ ├── winograd/ │ │ │ │ ├── winograd_ppl.py │ │ │ │ ├── winograd_ppl_8f3049.py │ │ │ │ └── winograd_ppl_b6c7ed.py │ │ │ ├── winogrande/ │ │ │ │ ├── winogrande_gen.py │ │ │ │ ├── winogrande_gen_a9ede5.py │ │ │ │ ├── winogrande_ppl.py │ │ │ │ ├── winogrande_ppl_55a66e.py │ │ │ │ └── winogrande_ppl_9307fd.py │ │ │ ├── xiezhi/ │ │ │ │ ├── xiezhi_gen.py │ │ │ │ ├── xiezhi_gen_b86cf5.py │ │ │ │ ├── xiezhi_ppl.py │ │ │ │ └── xiezhi_ppl_ea6bd7.py │ │ │ └── z_bench/ │ │ │ ├── z_bench_gen.py │ │ │ ├── z_bench_gen_52ba2f.py │ │ │ └── z_bench_gen_d8c84c.py │ │ ├── eval_attack.py │ │ ├── eval_chat_musician_7b.py │ │ ├── eval_claude.py │ │ ├── eval_codegeex2.py │ │ ├── eval_demo.py │ │ ├── eval_gpt3.5.py │ │ ├── eval_gpt4.py │ │ ├── eval_hf_llama_7b.py │ │ ├── eval_internLM.py │ │ ├── eval_internlm_7b.py │ │ ├── eval_internlm_chat_7b_turbomind.py │ │ ├── eval_llama2_7b.py │ │ ├── eval_qwen_7b.py │ │ ├── eval_qwen_7b_chat.py │ │ ├── models/ │ │ │ ├── chat_musician/ │ │ │ │ └── hf_chat_musician.py │ │ │ ├── hf_llama/ │ │ │ │ ├── hf_llama2_13b.py │ │ │ │ ├── hf_llama2_70b.py │ │ │ │ ├── hf_llama2_7b.py │ │ │ │ ├── hf_llama_13b.py │ │ │ │ ├── hf_llama_30b.py │ │ │ │ ├── hf_llama_65b.py │ │ │ │ └── hf_llama_7b.py │ │ │ ├── llama/ │ │ │ │ ├── llama2_13b.py │ │ │ │ ├── llama2_13b_chat.py │ │ │ │ ├── llama2_70b.py │ │ │ │ ├── llama2_70b_chat.py │ │ │ │ ├── llama2_7b.py │ │ │ │ ├── llama2_7b_chat.py │ │ │ │ ├── llama_13b.py │ │ │ │ ├── llama_30b.py │ │ │ │ ├── llama_65b.py │ │ │ │ └── llama_7b.py │ │ │ └── yi/ │ │ │ ├── hf_yi_34b.py │ │ │ └── hf_yi_6b.py │ │ ├── multimodal/ │ │ │ ├── instructblip/ │ │ │ │ ├── README.md │ │ │ │ ├── instructblip_coco_caption.py │ │ │ │ ├── instructblip_flickr30k.py │ │ │ │ ├── instructblip_gqa.py │ │ │ │ ├── instructblip_mmbench.py │ │ │ │ ├── instructblip_ocr_vqa.py │ │ │ │ ├── instructblip_ok_vqa.py │ │ │ │ ├── instructblip_scienceqa.py │ │ │ │ ├── instructblip_textvqa.py │ │ │ │ ├── instructblip_vizwiz.py │ │ │ │ ├── instructblip_vqav2.py │ │ │ │ └── instructblip_vsr.py │ │ │ ├── llama_adapter_v2_multimodal/ │ │ │ │ ├── README.md │ │ │ │ └── llama_adapter_v2_mm_7b_mmbench.py │ │ │ ├── llava/ │ │ │ │ ├── README.md │ │ │ │ ├── llava_7b_coco_caption.py │ │ │ │ ├── llava_7b_flickr30k.py │ │ │ │ ├── llava_7b_gqa.py │ │ │ │ ├── llava_7b_mmbench.py │ │ │ │ ├── llava_7b_ocr_vqa.py │ │ │ │ ├── llava_7b_ok_vqa.py │ │ │ │ ├── llava_7b_scienceqa.py │ │ │ │ ├── llava_7b_textvqa.py │ │ │ │ ├── llava_7b_vizwiz.py │ │ │ │ ├── llava_7b_vqav2.py │ │ │ │ └── llava_7b_vsr.py │ │ │ ├── minigpt_4/ │ │ │ │ ├── README.md │ │ │ │ ├── minigpt_4_7b_coco_caption.py │ │ │ │ ├── minigpt_4_7b_flickr30k.py │ │ │ │ ├── minigpt_4_7b_gqa.py │ │ │ │ ├── minigpt_4_7b_mmbench.py │ │ │ │ ├── minigpt_4_7b_mme.py │ │ │ │ ├── minigpt_4_7b_ocr_vqa.py │ │ │ │ ├── minigpt_4_7b_ok_vqa.py │ │ │ │ ├── minigpt_4_7b_scienceqa.py │ │ │ │ ├── minigpt_4_7b_seedbench.py │ │ │ │ ├── minigpt_4_7b_textvqa.py │ │ │ │ ├── minigpt_4_7b_vizwiz.py │ │ │ │ ├── minigpt_4_7b_vqav2.py │ │ │ │ └── minigpt_4_7b_vsr.py │ │ │ ├── mplug_owl/ │ │ │ │ ├── README.md │ │ │ │ └── mplug_owl-7b-mmbench.py │ │ │ ├── openflamingo/ │ │ │ │ ├── README.md │ │ │ │ └── openflamingo_mmbench.py │ │ │ ├── otter/ │ │ │ │ ├── README.md │ │ │ │ └── otter_9b_mmbench.py │ │ │ ├── qwen/ │ │ │ │ ├── qwenvl_base_7b_mmbench.py │ │ │ │ └── qwenvl_chat_7b_mmbench.py │ │ │ ├── tasks.py │ │ │ └── visualglm/ │ │ │ ├── visualglm_6b_coco_caption.py │ │ │ ├── visualglm_6b_flickr30k.py │ │ │ ├── visualglm_6b_gqa.py │ │ │ ├── visualglm_6b_mmbench.py │ │ │ ├── visualglm_6b_ocr_vqa.py │ │ │ ├── visualglm_6b_ok_vqa.py │ │ │ ├── visualglm_6b_scienceqa.py │ │ │ ├── visualglm_6b_textvqa.py │ │ │ ├── visualglm_6b_vizwiz.py │ │ │ ├── visualglm_6b_vqav2.py │ │ │ └── visualglm_6b_vsr.py │ │ └── summarizers/ │ │ ├── example.py │ │ ├── groups/ │ │ │ ├── GaokaoBench.py │ │ │ ├── agieval.py │ │ │ ├── bbh.py │ │ │ ├── ceval.py │ │ │ ├── cmmlu.py │ │ │ ├── flores.py │ │ │ ├── jigsaw_multilingual.py │ │ │ ├── mmlu.py │ │ │ ├── tydiqa.py │ │ │ └── xiezhi.py │ │ ├── leaderboard.py │ │ ├── leval.py │ │ ├── longbench.py │ │ ├── medium.py │ │ └── small.py │ ├── docs/ │ │ ├── en/ │ │ │ ├── MMBench.md │ │ │ ├── Makefile │ │ │ ├── _static/ │ │ │ │ ├── css/ │ │ │ │ │ └── readthedocs.css │ │ │ │ └── js/ │ │ │ │ └── custom.js │ │ │ ├── _templates/ │ │ │ │ ├── 404.html │ │ │ │ ├── autosummary/ │ │ │ │ │ └── class.rst │ │ │ │ └── callable.rst │ │ │ ├── advanced_guides/ │ │ │ │ ├── code_eval_service.md │ │ │ │ ├── evaluation_turbomind.md │ │ │ │ ├── longeval.md │ │ │ │ ├── new_dataset.md │ │ │ │ ├── new_model.md │ │ │ │ └── prompt_attack.md │ │ │ ├── conf.py │ │ │ ├── docutils.conf │ │ │ ├── faq.md │ │ │ ├── get_started.md │ │ │ ├── index.rst │ │ │ ├── notes/ │ │ │ │ ├── contribution_guide.md │ │ │ │ └── news.md │ │ │ ├── prompt/ │ │ │ │ ├── chain_of_thought.md │ │ │ │ ├── meta_template.md │ │ │ │ ├── overview.md │ │ │ │ └── prompt_template.md │ │ │ ├── tools.md │ │ │ └── user_guides/ │ │ │ ├── config.md │ │ │ ├── datasets.md │ │ │ ├── evaluation.md │ │ │ ├── experimentation.md │ │ │ ├── framework_overview.md │ │ │ ├── metrics.md │ │ │ ├── models.md │ │ │ └── summarizer.md │ │ └── zh_cn/ │ │ ├── Makefile │ │ ├── _static/ │ │ │ ├── css/ │ │ │ │ └── readthedocs.css │ │ │ └── js/ │ │ │ └── custom.js │ │ ├── _templates/ │ │ │ ├── 404.html │ │ │ ├── autosummary/ │ │ │ │ └── class.rst │ │ │ └── callable.rst │ │ ├── advanced_guides/ │ │ │ ├── code_eval_service.md │ │ │ ├── evaluation_turbomind.md │ │ │ ├── longeval.md │ │ │ ├── new_dataset.md │ │ │ ├── new_model.md │ │ │ └── prompt_attack.md │ │ ├── conf.py │ │ ├── cp_origin_docs.sh │ │ ├── docutils.conf │ │ ├── get_started.md │ │ ├── index.rst │ │ ├── notes/ │ │ │ ├── contribution_guide.md │ │ │ └── news.md │ │ ├── prompt/ │ │ │ ├── chain_of_thought.md │ │ │ ├── meta_template.md │ │ │ ├── overview.md │ │ │ └── prompt_template.md │ │ ├── tools.md │ │ └── user_guides/ │ │ ├── config.md │ │ ├── datasets.md │ │ ├── evaluation.md │ │ ├── experimentation.md │ │ ├── framework_overview.md │ │ ├── metrics.md │ │ ├── models.md │ │ └── summarizer.md │ ├── opencompass/ │ │ ├── __init__.py │ │ ├── datasets/ │ │ │ ├── GaokaoBench.py │ │ │ ├── TheoremQA.py │ │ │ ├── __init__.py │ │ │ ├── advglue.py │ │ │ ├── afqmcd.py │ │ │ ├── agieval/ │ │ │ │ ├── __init__.py │ │ │ │ ├── agieval.py │ │ │ │ ├── constructions.py │ │ │ │ ├── dataset_loader.py │ │ │ │ ├── evaluation.py │ │ │ │ ├── math_equivalence.py │ │ │ │ ├── post_process.py │ │ │ │ └── utils.py │ │ │ ├── anli.py │ │ │ ├── arc.py │ │ │ ├── ax.py │ │ │ ├── base.py │ │ │ ├── bbh.py │ │ │ ├── boolq.py │ │ │ ├── bustum.py │ │ │ ├── c3.py │ │ │ ├── cb.py │ │ │ ├── ceval.py │ │ │ ├── chid.py │ │ │ ├── civilcomments.py │ │ │ ├── cluewsc.py │ │ │ ├── cmb.py │ │ │ ├── cmmlu.py │ │ │ ├── cmnli.py │ │ │ ├── cmrc.py │ │ │ ├── commonsenseqa.py │ │ │ ├── copa.py │ │ │ ├── crowspairs.py │ │ │ ├── csl.py │ │ │ ├── cvalues.py │ │ │ ├── drcd.py │ │ │ ├── drop.py │ │ │ ├── ds1000.py │ │ │ ├── eprstmt.py │ │ │ ├── flores.py │ │ │ ├── game24.py │ │ │ ├── govrepcrs.py │ │ │ ├── gsm8k.py │ │ │ ├── hellaswag.py │ │ │ ├── huggingface.py │ │ │ ├── humaneval.py │ │ │ ├── humanevalx.py │ │ │ ├── iwslt2017.py │ │ │ ├── jigsawmultilingual.py │ │ │ ├── lambada.py │ │ │ ├── lcsts.py │ │ │ ├── leval/ │ │ │ │ ├── __init__.py │ │ │ │ ├── claude-100k.pred.jsonl │ │ │ │ ├── evaluators.py │ │ │ │ ├── leval_coursera.py │ │ │ │ ├── leval_financial_qa.py │ │ │ │ ├── leval_gov_report_summ.py │ │ │ │ ├── leval_gsm100.py │ │ │ │ ├── leval_legal_contract_qa.py │ │ │ │ ├── leval_meeting_summ.py │ │ │ │ ├── leval_multidoc_qa.py │ │ │ │ ├── leval_narrattive_qa.py │ │ │ │ ├── leval_natural_question.py │ │ │ │ ├── leval_news_summ.py │ │ │ │ ├── leval_paper_assistant.py │ │ │ │ ├── leval_patent_summ.py │ │ │ │ ├── leval_quality.py │ │ │ │ ├── leval_review_summ.py │ │ │ │ ├── leval_scientific_qa.py │ │ │ │ ├── leval_topic_retrieval.py │ │ │ │ ├── leval_tpo.py │ │ │ │ ├── leval_tvshow_summ.py │ │ │ │ └── turbo-16k-0613.pred.jsonl │ │ │ ├── longbench/ │ │ │ │ ├── __init__.py │ │ │ │ ├── evaluators.py │ │ │ │ ├── longbench_2wikim_qa.py │ │ │ │ ├── longbench_dureader.py │ │ │ │ ├── longbench_gov_report.py │ │ │ │ ├── longbench_hotpot_qa.py │ │ │ │ ├── longbench_lcc.py │ │ │ │ ├── longbench_lsht.py │ │ │ │ ├── longbench_multifieldqa_en.py │ │ │ │ ├── longbench_multifieldqa_zh.py │ │ │ │ ├── longbench_musique.py │ │ │ │ ├── longbench_narrative_qa.py │ │ │ │ ├── longbench_nq.py │ │ │ │ ├── longbench_passage_count.py │ │ │ │ ├── longbench_passage_retrieval_en.py │ │ │ │ ├── longbench_passage_retrieval_zh.py │ │ │ │ ├── longbench_qasper.py │ │ │ │ ├── longbench_qmsum.py │ │ │ │ ├── longbench_repobench.py │ │ │ │ ├── longbench_trec.py │ │ │ │ ├── longbench_trivia_qa.py │ │ │ │ └── longbench_vcsum.py │ │ │ ├── math.py │ │ │ ├── mbpp.py │ │ │ ├── mmlu.py │ │ │ ├── multirc.py │ │ │ ├── music_theory_bench.py │ │ │ ├── narrativeqa.py │ │ │ ├── natural_question.py │ │ │ ├── obqa.py │ │ │ ├── piqa.py │ │ │ ├── qasper.py │ │ │ ├── qaspercut.py │ │ │ ├── race.py │ │ │ ├── realtoxicprompts.py │ │ │ ├── record.py │ │ │ ├── safety.py │ │ │ ├── siqa.py │ │ │ ├── squad20.py │ │ │ ├── storycloze.py │ │ │ ├── strategyqa.py │ │ │ ├── summedits.py │ │ │ ├── summscreen.py │ │ │ ├── tnews.py │ │ │ ├── triviaqa.py │ │ │ ├── triviaqarc.py │ │ │ ├── truthfulqa.py │ │ │ ├── tydiqa.py │ │ │ ├── wic.py │ │ │ ├── winograd.py │ │ │ ├── winogrande.py │ │ │ ├── wnli.py │ │ │ ├── wsc.py │ │ │ ├── xcopa.py │ │ │ ├── xiezhi.py │ │ │ ├── xlsum.py │ │ │ └── xsum.py │ │ ├── metrics/ │ │ │ ├── __init__.py │ │ │ ├── dump_results.py │ │ │ ├── mme_score.py │ │ │ └── seedbench.py │ │ ├── models/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── base_api.py │ │ │ ├── claude_api/ │ │ │ │ ├── __init__.py │ │ │ │ ├── claude_api.py │ │ │ │ └── postprocessors.py │ │ │ ├── glm.py │ │ │ ├── huggingface.py │ │ │ ├── intern_model.py │ │ │ ├── llama2.py │ │ │ ├── openai_api.py │ │ │ └── turbomind.py │ │ ├── multimodal/ │ │ │ ├── datasets/ │ │ │ │ ├── __init__.py │ │ │ │ ├── mmbench.py │ │ │ │ ├── mme.py │ │ │ │ └── seedbench.py │ │ │ └── models/ │ │ │ ├── __init__.py │ │ │ ├── instructblip/ │ │ │ │ ├── __init__.py │ │ │ │ ├── blip2_vicuna_instruct.py │ │ │ │ ├── post_processor.py │ │ │ │ └── prompt_constructor.py │ │ │ ├── llama_adapter_v2_multimodal/ │ │ │ │ ├── __init__.py │ │ │ │ ├── llama_adapter.py │ │ │ │ ├── post_processor.py │ │ │ │ └── prompt_constructor.py │ │ │ ├── llava/ │ │ │ │ ├── __init__.py │ │ │ │ ├── llava.py │ │ │ │ ├── post_processor.py │ │ │ │ └── prompt_constructor.py │ │ │ ├── minigpt_4/ │ │ │ │ ├── __init__.py │ │ │ │ ├── minigpt_4.py │ │ │ │ ├── post_processor.py │ │ │ │ ├── prompt_constructor.py │ │ │ │ └── utils.py │ │ │ ├── mplug_owl/ │ │ │ │ ├── __init__.py │ │ │ │ ├── mplug_owl.py │ │ │ │ ├── post_processor.py │ │ │ │ └── prompt_constructor.py │ │ │ ├── openflamingo/ │ │ │ │ ├── __init__.py │ │ │ │ └── openflamingo.py │ │ │ ├── otter/ │ │ │ │ ├── __init__.py │ │ │ │ ├── otter.py │ │ │ │ ├── post_processor.py │ │ │ │ └── prompt_constructor.py │ │ │ ├── qwen/ │ │ │ │ ├── __init__.py │ │ │ │ ├── generation_utils.py │ │ │ │ ├── post_processor.py │ │ │ │ ├── prompt_constructor.py │ │ │ │ └── qwen.py │ │ │ └── visualglm/ │ │ │ ├── __init__.py │ │ │ ├── post_processor.py │ │ │ ├── prompt_constructor.py │ │ │ └── visualglm.py │ │ ├── openicl/ │ │ │ ├── __init__.py │ │ │ ├── icl_dataset_reader.py │ │ │ ├── icl_evaluator/ │ │ │ │ ├── __init__.py │ │ │ │ ├── icl_aucroc_evaluator.py │ │ │ │ ├── icl_base_evaluator.py │ │ │ │ ├── icl_em_evaluator.py │ │ │ │ ├── icl_hf_evaluator.py │ │ │ │ └── icl_toxic_evaluator.py │ │ │ ├── icl_inferencer/ │ │ │ │ ├── __init__.py │ │ │ │ ├── icl_attack_inferencer.py │ │ │ │ ├── icl_base_inferencer.py │ │ │ │ ├── icl_clp_inferencer.py │ │ │ │ ├── icl_gen_inferencer.py │ │ │ │ ├── icl_ppl_inferencer.py │ │ │ │ ├── icl_sc_inferencer.py │ │ │ │ └── icl_tot_inferencer.py │ │ │ ├── icl_prompt_template.py │ │ │ ├── icl_retriever/ │ │ │ │ ├── __init__.py │ │ │ │ ├── icl_base_retriever.py │ │ │ │ ├── icl_bm25_retriever.py │ │ │ │ ├── icl_dpp_retriever.py │ │ │ │ ├── icl_fix_k_retriever.py │ │ │ │ ├── icl_mdl_retriever.py │ │ │ │ ├── icl_random_retriever.py │ │ │ │ ├── icl_topk_retriever.py │ │ │ │ ├── icl_votek_retriever.py │ │ │ │ └── icl_zero_retriever.py │ │ │ └── utils/ │ │ │ ├── __init__.py │ │ │ └── logging.py │ │ ├── partitioners/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── mm_naive.py │ │ │ ├── naive.py │ │ │ └── size.py │ │ ├── registry.py │ │ ├── runners/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── dlc.py │ │ │ ├── local.py │ │ │ └── slurm.py │ │ ├── tasks/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── llm_eval.py │ │ │ ├── mm_infer.py │ │ │ ├── openicl_attack.py │ │ │ ├── openicl_eval.py │ │ │ └── openicl_infer.py │ │ └── utils/ │ │ ├── __init__.py │ │ ├── abbr.py │ │ ├── build.py │ │ ├── collect_env.py │ │ ├── dependency.py │ │ ├── file.py │ │ ├── fileio.py │ │ ├── lark.py │ │ ├── logging.py │ │ ├── menu.py │ │ ├── prompt.py │ │ ├── run.py │ │ ├── summarizer.py │ │ ├── text_postprocessors.py │ │ └── types.py │ ├── requirements/ │ │ ├── docs.txt │ │ └── runtime.txt │ ├── requirements.txt │ ├── run.py │ ├── setup.py │ ├── tests/ │ │ ├── dataset/ │ │ │ └── test_humaneval.py │ │ ├── openicl/ │ │ │ └── test_prompt_template.py │ │ └── prompt/ │ │ ├── test_api_template_parser.py │ │ ├── test_lm_template_parser.py │ │ └── test_prompt_list.py │ ├── tmp/ │ │ ├── 105473_13_params.py │ │ ├── 105473_14_params.py │ │ ├── 105473_15_params.py │ │ ├── 105473_16_params.py │ │ ├── 105473_17_params.py │ │ ├── 1109939_0_params.py │ │ ├── 1109939_1_params.py │ │ ├── 1109939_2_params.py │ │ ├── 1109939_3_params.py │ │ ├── 1109939_4_params.py │ │ ├── 1109939_5_params.py │ │ ├── 1109939_6_params.py │ │ ├── 1140448_0_params.py │ │ ├── 1140448_1_params.py │ │ ├── 1140448_2_params.py │ │ ├── 1140448_3_params.py │ │ ├── 1140448_4_params.py │ │ ├── 1140448_5_params.py │ │ ├── 1140448_6_params.py │ │ ├── 1140448_7_params.py │ │ ├── 1155198_0_params.py │ │ ├── 1155198_1_params.py │ │ ├── 1155198_3_params.py │ │ ├── 1155198_4_params.py │ │ ├── 1155198_5_params.py │ │ ├── 1155198_6_params.py │ │ ├── 1155198_8_params.py │ │ ├── 1271622_0_params.py │ │ ├── 1271622_1_params.py │ │ ├── 1271622_2_params.py │ │ ├── 1271622_3_params.py │ │ ├── 1271622_4_params.py │ │ ├── 1271622_5_params.py │ │ ├── 1271622_6_params.py │ │ ├── 1271622_7_params.py │ │ ├── 1422987_36_params.py │ │ ├── 1422987_50_params.py │ │ ├── 1422987_52_params.py │ │ ├── 1422987_60_params.py │ │ ├── 1422987_62_params.py │ │ ├── 1422987_63_params.py │ │ ├── 1422987_64_params.py │ │ ├── 1422987_65_params.py │ │ ├── 1469199_10_params.py │ │ ├── 1469199_11_params.py │ │ ├── 1469199_8_params.py │ │ ├── 1469199_9_params.py │ │ ├── 1621481_0_params.py │ │ ├── 1621481_1_params.py │ │ ├── 1621481_2_params.py │ │ ├── 1621481_3_params.py │ │ ├── 1621481_4_params.py │ │ ├── 1621481_5_params.py │ │ ├── 1740358_10_params.py │ │ ├── 1740358_12_params.py │ │ ├── 1740358_13_params.py │ │ ├── 1740358_14_params.py │ │ ├── 1849911_0_params.py │ │ ├── 1849911_1_params.py │ │ ├── 1883132_params.py │ │ ├── 2182207_0_params.py │ │ ├── 2182207_1_params.py │ │ ├── 2182207_2_params.py │ │ ├── 2182207_3_params.py │ │ ├── 2182207_4_params.py │ │ ├── 2182207_5_params.py │ │ ├── 2182207_6_params.py │ │ ├── 2182207_7_params.py │ │ ├── 2182942_0_params.py │ │ ├── 2182942_1_params.py │ │ ├── 2182942_2_params.py │ │ ├── 2182942_3_params.py │ │ ├── 2182942_4_params.py │ │ ├── 2182942_5_params.py │ │ ├── 2182942_6_params.py │ │ ├── 2182942_7_params.py │ │ ├── 2672666_0_params.py │ │ ├── 2672666_1_params.py │ │ ├── 2672666_4_params.py │ │ ├── 2672666_5_params.py │ │ ├── 2672666_6_params.py │ │ ├── 2673085_6_params.py │ │ ├── 323384_0_params.py │ │ ├── 323384_3_params.py │ │ ├── 323384_6_params.py │ │ ├── 323384_7_params.py │ │ ├── 323384_8_params.py │ │ ├── 323384_9_params.py │ │ ├── 3524116_6_params.py │ │ ├── 3524116_7_params.py │ │ ├── 3689512_0_params.py │ │ ├── 3689512_1_params.py │ │ ├── 3689512_2_params.py │ │ ├── 3689512_3_params.py │ │ ├── 3689512_4_params.py │ │ ├── 3689512_5_params.py │ │ ├── 3689512_6_params.py │ │ ├── 3689512_7_params.py │ │ ├── 3961154_0_params.py │ │ ├── 3961154_1_params.py │ │ ├── 3961154_2_params.py │ │ ├── 3961154_3_params.py │ │ ├── 3961154_4_params.py │ │ ├── 3961154_5_params.py │ │ ├── 3961154_6_params.py │ │ ├── 3961154_7_params.py │ │ ├── 433934_0_params.py │ │ ├── 433934_1_params.py │ │ ├── 433934_2_params.py │ │ ├── 433934_3_params.py │ │ ├── 539674_params.py │ │ ├── 544085_params.py │ │ ├── 544730_params.py │ │ ├── 627109_4_params.py │ │ ├── 627109_5_params.py │ │ ├── 688954_4_params.py │ │ ├── 688954_5_params.py │ │ ├── 688954_6_params.py │ │ └── 688954_7_params.py │ └── tools/ │ ├── case_analyzer.py │ ├── collect_code_preds.py │ ├── eval_mmbench.py │ ├── list_configs.py │ ├── prediction_merger.py │ ├── prompt_viewer.py │ ├── test_api_model.py │ └── update_dataset_suffix.py ├── model/ │ ├── infer/ │ │ ├── chatmusician_web_demo.py │ │ └── predict.py │ └── train/ │ ├── config/ │ │ ├── ds_zero2_no_offload.json │ │ └── ds_zero3_offload.json │ ├── data_preprocess.py │ ├── llama/ │ │ ├── configuration_llama.py │ │ ├── convert_llama_weights_to_hf.py │ │ ├── modeling_llama.py │ │ └── tokenization_llama.py │ ├── merge.py │ ├── model.py │ ├── scripts/ │ │ └── train.sh │ ├── train.py │ └── utils.py └── requirements.txt
SYMBOL INDEX (1323 symbols across 246 files)
FILE: eval/docs/en/conf.py
function get_version (line 33) | def get_version():
FILE: eval/docs/zh_cn/conf.py
function get_version (line 33) | def get_version():
function builder_inited_handler (line 224) | def builder_inited_handler(app):
function setup (line 228) | def setup(app):
FILE: eval/opencompass/datasets/GaokaoBench.py
class GaokaoBenchDataset (line 13) | class GaokaoBenchDataset(BaseDataset):
method load (line 16) | def load(path: str):
class GaokaoBenchEvaluator (line 28) | class GaokaoBenchEvaluator(BaseEvaluator):
method __init__ (line 30) | def __init__(self, question_type) -> None:
method do_predictions_postprocess (line 35) | def do_predictions_postprocess(self, model_output, answer_lenth=None):
method ensure_same_length (line 82) | def ensure_same_length(self, pred, refr):
method score (line 87) | def score(self, predictions, references):
function _gaokao_register (line 126) | def _gaokao_register(question_type):
FILE: eval/opencompass/datasets/TheoremQA.py
class TheoremQADataset (line 11) | class TheoremQADataset(BaseDataset):
method load (line 14) | def load(path: str):
function TheoremQA_postprocess (line 19) | def TheoremQA_postprocess(text: str) -> str:
FILE: eval/opencompass/datasets/advglue.py
class AdvDataset (line 11) | class AdvDataset(BaseDataset):
method __init__ (line 21) | def __init__(
method aug_with_original_data (line 33) | def aug_with_original_data(self, dataset):
method load (line 51) | def load(self, path):
class AdvSst2Dataset (line 78) | class AdvSst2Dataset(AdvDataset):
method __init__ (line 81) | def __init__(self, **kwargs):
class AdvQqpDataset (line 89) | class AdvQqpDataset(AdvDataset):
method __init__ (line 92) | def __init__(self, **kwargs):
class AdvMnliDataset (line 102) | class AdvMnliDataset(AdvDataset):
method __init__ (line 105) | def __init__(self, **kwargs):
class AdvMnliMMDataset (line 115) | class AdvMnliMMDataset(AdvDataset):
method __init__ (line 118) | def __init__(self, **kwargs):
class AdvQnliDataset (line 127) | class AdvQnliDataset(AdvDataset):
method __init__ (line 130) | def __init__(self, **kwargs):
class AdvRteDataset (line 139) | class AdvRteDataset(AdvDataset):
method __init__ (line 142) | def __init__(self, **kwargs):
class AccDropEvaluator (line 149) | class AccDropEvaluator(AccEvaluator):
method __init__ (line 152) | def __init__(self) -> None:
method score (line 155) | def score(self, predictions: List, references: List) -> dict:
FILE: eval/opencompass/datasets/afqmcd.py
class AFQMCDataset_V2 (line 11) | class AFQMCDataset_V2(BaseDataset):
method load (line 14) | def load(path):
FILE: eval/opencompass/datasets/agieval/agieval.py
class AGIEvalDataset (line 15) | class AGIEvalDataset(BaseDataset):
method load (line 18) | def load(path: str, name: str, setting_name: str):
class AGIEvalDataset_v2 (line 36) | class AGIEvalDataset_v2(BaseDataset):
method load (line 39) | def load(path: str, name: str, setting_name: str):
class AGIEvalEvaluator (line 63) | class AGIEvalEvaluator(BaseEvaluator):
method score (line 65) | def score(self, predictions, references):
FILE: eval/opencompass/datasets/agieval/constructions.py
class TaskSchema (line 5) | class TaskSchema(object):
method __init__ (line 7) | def __init__(self,
method to_dict (line 21) | def to_dict(self):
class AgiInstance (line 33) | class AgiInstance(object):
method __init__ (line 35) | def __init__(self, task_description, data_source, task_schema, output,
method to_dict (line 44) | def to_dict(self):
class ChatGPTSchema (line 55) | class ChatGPTSchema(object):
method __init__ (line 57) | def __init__(self, context=None, metadata=''):
method to_dict (line 61) | def to_dict(self):
class ResultsForHumanSchema (line 65) | class ResultsForHumanSchema(object):
method __init__ (line 67) | def __init__(self,
method to_dict (line 87) | def to_dict(self):
method to_tsv (line 101) | def to_tsv(result_list, path):
FILE: eval/opencompass/datasets/agieval/dataset_loader.py
function convert_zero_shot (line 30) | def convert_zero_shot(line, dataset_name):
function convert_zero_shot_CoT_stage1 (line 65) | def convert_zero_shot_CoT_stage1(line, dataset_name):
function combine_prompt (line 94) | def combine_prompt(prompt_path,
function _lazy_load_enc (line 169) | def _lazy_load_enc():
function concat_prompt (line 176) | def concat_prompt(demos,
function concat_prompt_chat_mode (line 209) | def concat_prompt_chat_mode(demos,
function convert_few_shot (line 241) | def convert_few_shot(line, dataset_name, demo, n_shot, chat_mode=False):
function load_dataset (line 274) | def load_dataset(dataset_name,
function generate_second_stage_input (line 322) | def generate_second_stage_input(dataset_name,
function load_dataset_as_result_schema (line 358) | def load_dataset_as_result_schema(dataset_name, parent_path):
FILE: eval/opencompass/datasets/agieval/evaluation.py
function convert_to_set (line 6) | def convert_to_set(item):
function evaluate_single_sample (line 16) | def evaluate_single_sample(dataset_name, prediction, label):
FILE: eval/opencompass/datasets/agieval/math_equivalence.py
function _fix_fracs (line 5) | def _fix_fracs(string):
function _fix_a_slash_b (line 37) | def _fix_a_slash_b(string):
function _remove_right_units (line 52) | def _remove_right_units(string):
function _fix_sqrt (line 62) | def _fix_sqrt(string):
function _strip_string (line 77) | def _strip_string(string):
function is_equiv (line 147) | def is_equiv(str1, str2, verbose=False):
FILE: eval/opencompass/datasets/agieval/post_process.py
function extract_last_line (line 8) | def extract_last_line(string):
function remove_few_shot_prefix (line 17) | def remove_few_shot_prefix(string: str):
function try_parse_few_shot_qa_single_answer (line 29) | def try_parse_few_shot_qa_single_answer(string, setting_name, language='...
function try_parse_few_shot_pattern (line 46) | def try_parse_few_shot_pattern(string: str, dataset_name, setting_name):
function parse_few_shot_qa_single_answer (line 64) | def parse_few_shot_qa_single_answer(string, setting_name, language='en'):
function find_first_capital_letter (line 73) | def find_first_capital_letter(answer):
function extract_answer_in_bracket (line 82) | def extract_answer_in_bracket(answer, prefix='【', suffix='】'):
function parse_math_answer (line 92) | def parse_math_answer(setting_name, raw_string):
function parse_qa_multiple_answer (line 170) | def parse_qa_multiple_answer(string, setting_name):
function post_process (line 180) | def post_process(dataset_name, setting_name, prediction):
FILE: eval/opencompass/datasets/agieval/utils.py
function read_jsonl (line 5) | def read_jsonl(path):
function save_jsonl (line 21) | def save_jsonl(lines, directory):
function extract_answer (line 27) | def extract_answer(js):
FILE: eval/opencompass/datasets/anli.py
class AnliDataset (line 8) | class AnliDataset(BaseDataset):
method load (line 11) | def load(path: str):
FILE: eval/opencompass/datasets/arc.py
class ARCDataset (line 11) | class ARCDataset(BaseDataset):
method load (line 14) | def load(path: str):
FILE: eval/opencompass/datasets/ax.py
class AXDataset_V2 (line 11) | class AXDataset_V2(BaseDataset):
method load (line 14) | def load(path: str):
FILE: eval/opencompass/datasets/base.py
class BaseDataset (line 9) | class BaseDataset:
method __init__ (line 11) | def __init__(self, reader_cfg: Optional[Dict] = {}, **kwargs):
method _init_reader (line 15) | def _init_reader(self, **kwargs):
method train (line 19) | def train(self):
method test (line 23) | def test(self):
method load (line 27) | def load(**kwargs) -> Union[Dataset, DatasetDict]:
FILE: eval/opencompass/datasets/bbh.py
class BBHDataset (line 15) | class BBHDataset(BaseDataset):
method load (line 18) | def load(path: str, name: str):
function bbh_mcq_postprocess (line 26) | def bbh_mcq_postprocess(text: str) -> str:
function bbh_freeform_postprocess (line 41) | def bbh_freeform_postprocess(text: str) -> str:
class BBHEvaluator (line 53) | class BBHEvaluator(BaseEvaluator):
method score (line 55) | def score(self, predictions, references):
FILE: eval/opencompass/datasets/boolq.py
class BoolQDataset (line 11) | class BoolQDataset(BaseDataset):
method load (line 14) | def load(**kwargs):
class BoolQDataset_V2 (line 29) | class BoolQDataset_V2(BaseDataset):
method load (line 32) | def load(path):
class BoolQDataset_V3 (line 43) | class BoolQDataset_V3(BaseDataset):
method load (line 46) | def load(path):
FILE: eval/opencompass/datasets/bustum.py
class bustumDataset_V2 (line 11) | class bustumDataset_V2(BaseDataset):
method load (line 14) | def load(path):
FILE: eval/opencompass/datasets/c3.py
class C3Dataset (line 11) | class C3Dataset(BaseDataset):
method load (line 14) | def load(path: str):
class C3Dataset_V2 (line 57) | class C3Dataset_V2(BaseDataset):
method load (line 60) | def load(path: str):
FILE: eval/opencompass/datasets/cb.py
class CBDataset_V2 (line 11) | class CBDataset_V2(BaseDataset):
method load (line 14) | def load(path):
FILE: eval/opencompass/datasets/ceval.py
class CEvalDataset (line 11) | class CEvalDataset(BaseDataset):
method load (line 14) | def load(path: str, name: str):
FILE: eval/opencompass/datasets/chid.py
class CHIDDataset (line 11) | class CHIDDataset(BaseDataset):
method load (line 14) | def load(**kwargs):
class CHIDDataset_V2 (line 29) | class CHIDDataset_V2(BaseDataset):
method load (line 32) | def load(path):
FILE: eval/opencompass/datasets/civilcomments.py
class CivilCommentsDataset (line 9) | class CivilCommentsDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/cluewsc.py
class CluewscDataset (line 11) | class CluewscDataset(BaseDataset):
method load (line 14) | def load(**kwargs):
class CluewscDataset_V2 (line 39) | class CluewscDataset_V2(BaseDataset):
method load (line 42) | def load(path):
FILE: eval/opencompass/datasets/cmb.py
class CMBDataset (line 12) | class CMBDataset(BaseDataset):
method load (line 15) | def load(path: str):
FILE: eval/opencompass/datasets/cmmlu.py
class CMMLUDataset (line 12) | class CMMLUDataset(BaseDataset):
method load (line 15) | def load(path: str, name: str):
FILE: eval/opencompass/datasets/cmnli.py
class cmnliDataset_V2 (line 11) | class cmnliDataset_V2(BaseDataset):
method load (line 14) | def load(path):
FILE: eval/opencompass/datasets/cmrc.py
class CMRCDataset (line 11) | class CMRCDataset(BaseDataset):
method load (line 14) | def load(path: str):
function cmrc_postprocess (line 44) | def cmrc_postprocess(text: str) -> str:
FILE: eval/opencompass/datasets/commonsenseqa.py
class commonsenseqaDataset (line 9) | class commonsenseqaDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/copa.py
class COPADataset_V2 (line 11) | class COPADataset_V2(BaseDataset):
method load (line 14) | def load(path):
FILE: eval/opencompass/datasets/crowspairs.py
class crowspairsDataset (line 13) | class crowspairsDataset(BaseDataset):
method load (line 16) | def load(**kwargs):
class crowspairsDataset_V2 (line 28) | class crowspairsDataset_V2(BaseDataset):
method load (line 31) | def load(**kwargs):
function crowspairs_postprocess (line 41) | def crowspairs_postprocess(text: str) -> str:
class CrowspairsEvaluator (line 60) | class CrowspairsEvaluator(BaseEvaluator):
method __init__ (line 64) | def __init__(self) -> None:
method score (line 67) | def score(self, predictions: List, references: List) -> dict:
FILE: eval/opencompass/datasets/csl.py
class CslDataset (line 11) | class CslDataset(BaseDataset):
method load (line 14) | def load(**kwargs):
class CslDataset_V2 (line 29) | class CslDataset_V2(BaseDataset):
method load (line 32) | def load(path):
FILE: eval/opencompass/datasets/cvalues.py
class CValuesDataset (line 11) | class CValuesDataset(BaseDataset):
method load (line 14) | def load(path):
FILE: eval/opencompass/datasets/drcd.py
class DRCDDataset (line 11) | class DRCDDataset(BaseDataset):
method load (line 14) | def load(path: str):
function drcd_postprocess (line 44) | def drcd_postprocess(text: str) -> str:
FILE: eval/opencompass/datasets/drop.py
class dropDataset (line 9) | class dropDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/ds1000.py
class DS1000Dataset (line 25) | class DS1000Dataset(BaseDataset):
method get_data (line 42) | def get_data(self, problem_path: str) -> dict:
method load (line 79) | def load(self,
function ds1000_postprocess (line 117) | def ds1000_postprocess(text: str) -> str:
function ds1000_matplotlib_postprocess (line 138) | def ds1000_matplotlib_postprocess(text: str) -> str:
class DS1000Evaluator (line 160) | class DS1000Evaluator(BaseEvaluator):
method __init__ (line 163) | def __init__(self, num_workers=16) -> None:
method score_single (line 166) | def score_single(self, pred, refer):
method score (line 247) | def score(self, predictions, references):
class Command (line 258) | class Command(object):
method __init__ (line 261) | def __init__(self, cmd):
method run (line 265) | def run(self, timeout):
function import_source_file (line 296) | def import_source_file(fname, modname):
FILE: eval/opencompass/datasets/eprstmt.py
class eprstmtDataset_V2 (line 11) | class eprstmtDataset_V2(BaseDataset):
method load (line 14) | def load(path):
FILE: eval/opencompass/datasets/flores.py
class FloresFirst100Dataset (line 11) | class FloresFirst100Dataset(BaseDataset):
method load (line 14) | def load(name):
function flores_postprocess (line 26) | def flores_postprocess(text: str) -> str:
function flores_postprocess_chinese (line 32) | def flores_postprocess_chinese(text: str) -> str:
FILE: eval/opencompass/datasets/game24.py
function get_current_numbers (line 156) | def get_current_numbers(y: str) -> str:
class Game24Dataset (line 161) | class Game24Dataset(BaseDataset):
method load (line 164) | def load(path: str):
class Game24PromptWrapper (line 170) | class Game24PromptWrapper:
method __init__ (line 181) | def __init__(self):
method standard_prompt_wrap (line 187) | def standard_prompt_wrap(x: str, y: str = '') -> str:
method cot_prompt_wrap (line 191) | def cot_prompt_wrap(x: str, y: str = '') -> str:
method propose_prompt_wrap (line 195) | def propose_prompt_wrap(x: str, y: str = '') -> str:
method value_prompt_wrap (line 204) | def value_prompt_wrap(x: str, y: str) -> str:
method value_outputs_unwrap (line 213) | def value_outputs_unwrap(x: str, y: str, value_outputs: list) -> float:
function game24_postprocess (line 227) | def game24_postprocess(output: str):
class Game24Evaluator (line 233) | class Game24Evaluator(BaseEvaluator):
method __init__ (line 235) | def __init__(self) -> None:
method check_nums (line 240) | def check_nums(self, prediction, reference):
method score (line 250) | def score(self, predictions: List, references: List) -> dict:
FILE: eval/opencompass/datasets/govrepcrs.py
class GovRepcrsDataset (line 9) | class GovRepcrsDataset(BaseDataset):
method load (line 12) | def load(path: str):
FILE: eval/opencompass/datasets/gsm8k.py
function gsm8k_dataset_postprocess (line 5) | def gsm8k_dataset_postprocess(text: str) -> str:
function gsm8k_postprocess (line 10) | def gsm8k_postprocess(text: str) -> str:
FILE: eval/opencompass/datasets/hellaswag.py
class hellaswagDataset (line 11) | class hellaswagDataset(BaseDataset):
method load (line 14) | def load(**kwargs):
class hellaswagDataset_V2 (line 27) | class hellaswagDataset_V2(BaseDataset):
method load (line 30) | def load(**kwargs):
class hellaswagDataset_V3 (line 47) | class hellaswagDataset_V3(BaseDataset):
method load (line 50) | def load(path):
FILE: eval/opencompass/datasets/huggingface.py
class HFDataset (line 9) | class HFDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/humaneval.py
class HumanEvaluator (line 9) | class HumanEvaluator(BaseEvaluator):
method __init__ (line 12) | def __init__(self, k: List[int] = [1, 10, 100]) -> None:
method score (line 26) | def score(self, predictions, references):
function humaneval_postprocess (line 43) | def humaneval_postprocess(text: str) -> str:
function humaneval_gpt_postprocess (line 67) | def humaneval_gpt_postprocess(text: str) -> str:
FILE: eval/opencompass/datasets/humanevalx.py
class HumanevalXDataset (line 27) | class HumanevalXDataset(BaseDataset):
method load (line 30) | def load(path, language, **kwargs):
method _stream_jsonl_all (line 38) | def _stream_jsonl_all(filename: str) -> Iterable[Dict]:
class HumanevalXEvaluator (line 52) | class HumanevalXEvaluator(BaseEvaluator):
method __init__ (line 72) | def __init__(self,
method score (line 87) | def score(self, predictions, references):
method _code_eval_service (line 119) | def _code_eval_service(self, file_path):
function _clean_up_code (line 145) | def _clean_up_code(text: str, language_type: str) -> str:
FILE: eval/opencompass/datasets/iwslt2017.py
class IWSLT2017Dataset (line 9) | class IWSLT2017Dataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/jigsawmultilingual.py
class JigsawMultilingualDataset (line 11) | class JigsawMultilingualDataset(BaseDataset):
method load (line 14) | def load(path, label, lang):
FILE: eval/opencompass/datasets/lambada.py
class lambadaDataset (line 14) | class lambadaDataset(BaseDataset):
method load (line 17) | def load(**kwargs):
class LambadaEvaluator (line 31) | class LambadaEvaluator(BaseEvaluator):
method __init__ (line 33) | def __init__(self) -> None:
method score (line 36) | def score(self, predictions, references):
FILE: eval/opencompass/datasets/lcsts.py
class LCSTSDataset (line 11) | class LCSTSDataset(BaseDataset):
method load (line 14) | def load(path: str):
function lcsts_postprocess (line 35) | def lcsts_postprocess(text: str) -> str:
FILE: eval/opencompass/datasets/leval/evaluators.py
class LEvalGPTEvaluator (line 10) | class LEvalGPTEvaluator(BaseEvaluator):
method __init__ (line 22) | def __init__(self,
method run_judge_pair (line 29) | def run_judge_pair(self, prompt_template, system_prompt, question,
method score (line 63) | def score(self, predictions: List, references: List) -> dict:
FILE: eval/opencompass/datasets/leval/leval_coursera.py
class LEvalCourseraDataset (line 9) | class LEvalCourseraDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_financial_qa.py
class LEvalFinancialQADataset (line 9) | class LEvalFinancialQADataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_gov_report_summ.py
class LEvalGovReportSummDataset (line 9) | class LEvalGovReportSummDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_gsm100.py
function gsm100_dataset_postprocess (line 9) | def gsm100_dataset_postprocess(text: str) -> str:
function gsm100_postprocess (line 14) | def gsm100_postprocess(text: str) -> str:
class LEvalGSM100Dataset (line 40) | class LEvalGSM100Dataset(BaseDataset):
method load (line 43) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_legal_contract_qa.py
class LEvalLegalContractQADataset (line 9) | class LEvalLegalContractQADataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_meeting_summ.py
class LEvalMeetingSummDataset (line 9) | class LEvalMeetingSummDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_multidoc_qa.py
class LEvalMultidocQADataset (line 9) | class LEvalMultidocQADataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_narrattive_qa.py
class LEvalNarrativeQADataset (line 9) | class LEvalNarrativeQADataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_natural_question.py
class LEvalNaturalQuestionDataset (line 9) | class LEvalNaturalQuestionDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_news_summ.py
class LEvalNewsSummDataset (line 9) | class LEvalNewsSummDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_paper_assistant.py
class LEvalPaperAssistantDataset (line 9) | class LEvalPaperAssistantDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_patent_summ.py
class LEvalPatentSummDataset (line 9) | class LEvalPatentSummDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_quality.py
class LEvalQualityDataset (line 9) | class LEvalQualityDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_review_summ.py
class LEvalReviewSummDataset (line 9) | class LEvalReviewSummDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_scientific_qa.py
class LEvalScientificQADataset (line 9) | class LEvalScientificQADataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_topic_retrieval.py
class LEvalTopicRetrievalDataset (line 9) | class LEvalTopicRetrievalDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_tpo.py
class LEvalTPODataset (line 9) | class LEvalTPODataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/leval/leval_tvshow_summ.py
class LEvalTVShowSummDataset (line 9) | class LEvalTVShowSummDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/evaluators.py
function normalize_answer (line 15) | def normalize_answer(s):
function normalize_zh_answer (line 34) | def normalize_zh_answer(s):
class LongBenchF1Evaluator (line 54) | class LongBenchF1Evaluator(BaseEvaluator):
method __init__ (line 56) | def __init__(self, language: str = 'en') -> None:
method score (line 61) | def score(self, predictions: List, references: List) -> dict:
class LongBenchCountEvaluator (line 116) | class LongBenchCountEvaluator(BaseEvaluator):
method score (line 118) | def score(self, predictions: List, references: List) -> dict:
class LongBenchRetrievalEvaluator (line 137) | class LongBenchRetrievalEvaluator(BaseEvaluator):
method __init__ (line 139) | def __init__(self, language: str = 'en') -> None:
method score (line 144) | def score(self, predictions: List, references: List) -> dict:
class LongBenchRougeEvaluator (line 171) | class LongBenchRougeEvaluator(BaseEvaluator):
method __init__ (line 173) | def __init__(self, language: str = 'en') -> None:
method score (line 178) | def score(self, predictions: List, references: List) -> dict:
class LongBenchCodeSimEvaluator (line 206) | class LongBenchCodeSimEvaluator(BaseEvaluator):
method score (line 208) | def score(self, predictions: List, references: List) -> dict:
class LongBenchClassificationEvaluator (line 233) | class LongBenchClassificationEvaluator(BaseEvaluator):
method score (line 235) | def score(self, predictions: List, references: List) -> dict:
FILE: eval/opencompass/datasets/longbench/longbench_2wikim_qa.py
class LongBench2wikimqaDataset (line 9) | class LongBench2wikimqaDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_dureader.py
class LongBenchdureaderDataset (line 9) | class LongBenchdureaderDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_gov_report.py
class LongBenchgov_reportDataset (line 9) | class LongBenchgov_reportDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_hotpot_qa.py
class LongBenchhotpotqaDataset (line 9) | class LongBenchhotpotqaDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_lcc.py
class LongBenchlccDataset (line 9) | class LongBenchlccDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_lsht.py
class LongBenchlshtDataset (line 9) | class LongBenchlshtDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_multifieldqa_en.py
class LongBenchmultifieldqa_enDataset (line 9) | class LongBenchmultifieldqa_enDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_multifieldqa_zh.py
class LongBenchmultifieldqa_zhDataset (line 9) | class LongBenchmultifieldqa_zhDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_musique.py
class LongBenchmusiqueDataset (line 9) | class LongBenchmusiqueDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_narrative_qa.py
class LongBenchnarrativeqaDataset (line 9) | class LongBenchnarrativeqaDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_nq.py
class LongBenchnqDataset (line 9) | class LongBenchnqDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_passage_count.py
class LongBenchpassage_countDataset (line 9) | class LongBenchpassage_countDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_passage_retrieval_en.py
class LongBenchpassage_retrieval_enDataset (line 9) | class LongBenchpassage_retrieval_enDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_passage_retrieval_zh.py
class LongBenchpassage_retrieval_zhDataset (line 9) | class LongBenchpassage_retrieval_zhDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_qasper.py
class LongBenchqasperDataset (line 9) | class LongBenchqasperDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_qmsum.py
class LongBenchqmsumDataset (line 9) | class LongBenchqmsumDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_repobench.py
class LongBenchrepobenchDataset (line 9) | class LongBenchrepobenchDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_trec.py
class LongBenchtrecDataset (line 9) | class LongBenchtrecDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_trivia_qa.py
class LongBenchtriviaqaDataset (line 9) | class LongBenchtriviaqaDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/longbench/longbench_vcsum.py
class LongBenchvcsumDataset (line 9) | class LongBenchvcsumDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/math.py
class MATHDataset (line 13) | class MATHDataset(BaseDataset):
method load (line 16) | def load(path: str):
function math_postprocess (line 70) | def math_postprocess(text: str) -> str:
class MATHEvaluator (line 141) | class MATHEvaluator(BaseEvaluator):
method score (line 143) | def score(self, predictions, references):
method _fix_fracs (line 158) | def _fix_fracs(self, string):
method _fix_a_slash_b (line 189) | def _fix_a_slash_b(self, string):
method _remove_right_units (line 203) | def _remove_right_units(self, string):
method _fix_sqrt (line 213) | def _fix_sqrt(self, string):
method _strip_string (line 227) | def _strip_string(self, string):
method is_equiv (line 294) | def is_equiv(self, str1, str2, verbose=False):
FILE: eval/opencompass/datasets/mbpp.py
class MBPPDataset (line 15) | class MBPPDataset(BaseDataset):
method load (line 18) | def load(path: str):
class TimeOutException (line 33) | class TimeOutException(Exception):
class MBPPEvaluator (line 38) | class MBPPEvaluator(BaseEvaluator):
method score (line 40) | def score(self, predictions, references):
method _process_answer (line 65) | def _process_answer(self, text):
method _process_test (line 80) | def _process_test(self, test_case, pred):
method swallow_io (line 86) | def swallow_io(self):
method time_limit (line 94) | def time_limit(self, seconds: float):
class WriteOnlyStringIO (line 106) | class WriteOnlyStringIO(io.StringIO):
method read (line 109) | def read(self, *args, **kwargs):
method readline (line 112) | def readline(self, *args, **kwargs):
method readlines (line 115) | def readlines(self, *args, **kwargs):
method readable (line 118) | def readable(self, *args, **kwargs):
class redirect_stdin (line 122) | class redirect_stdin(contextlib._RedirectStream): # type: ignore
class MBPPEvaluator2 (line 127) | class MBPPEvaluator2(MBPPEvaluator):
method _process_answer (line 130) | def _process_answer(self, text):
FILE: eval/opencompass/datasets/mmlu.py
class MMLUDataset (line 12) | class MMLUDataset(BaseDataset):
method load (line 15) | def load(path: str, name: str):
FILE: eval/opencompass/datasets/multirc.py
class MultiRCDataset (line 11) | class MultiRCDataset(BaseDataset):
method load (line 14) | def load(path: str):
class MultiRCDataset_V2 (line 44) | class MultiRCDataset_V2(BaseDataset):
method load (line 47) | def load(path: str):
FILE: eval/opencompass/datasets/music_theory_bench.py
function convert_dataset (line 5) | def convert_dataset(dataset_item):
class MusicTheoryBenchDataset (line 23) | class MusicTheoryBenchDataset(BaseDataset):
method load (line 25) | def load(path: str, name: str):
FILE: eval/opencompass/datasets/narrativeqa.py
class NarrativeQADataset (line 9) | class NarrativeQADataset(BaseDataset):
method load (line 12) | def load(path: str):
FILE: eval/opencompass/datasets/natural_question.py
class NaturalQuestionDataset (line 14) | class NaturalQuestionDataset(BaseDataset):
method load (line 17) | def load(path: str):
class NQEvaluator (line 37) | class NQEvaluator(BaseEvaluator):
method score (line 39) | def score(self, predictions, references):
FILE: eval/opencompass/datasets/obqa.py
class OBQADataset (line 9) | class OBQADataset(BaseDataset):
method load (line 12) | def load(**kwargs):
class OBQADataset_V2 (line 25) | class OBQADataset_V2(BaseDataset):
method load (line 28) | def load(**kwargs):
FILE: eval/opencompass/datasets/piqa.py
class piqaDataset_V2 (line 9) | class piqaDataset_V2(BaseDataset):
method load (line 12) | def load(**kwargs):
class piqaDataset_V3 (line 29) | class piqaDataset_V3(BaseDataset):
method load (line 32) | def load(**kwargs):
FILE: eval/opencompass/datasets/qasper.py
class QASPERDataset (line 9) | class QASPERDataset(BaseDataset):
method load (line 12) | def load(path: str):
FILE: eval/opencompass/datasets/qaspercut.py
class QASPERCUTDataset (line 9) | class QASPERCUTDataset(BaseDataset):
method load (line 12) | def load(path: str):
FILE: eval/opencompass/datasets/race.py
class RaceDataset (line 9) | class RaceDataset(BaseDataset):
method load (line 12) | def load(path: str, name: str):
FILE: eval/opencompass/datasets/realtoxicprompts.py
class RealToxicPromptsDataset (line 9) | class RealToxicPromptsDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/record.py
class ReCoRDDataset (line 11) | class ReCoRDDataset(BaseDataset):
method load (line 14) | def load(path: str):
class ReCoRDDataset_V2 (line 46) | class ReCoRDDataset_V2(BaseDataset):
method load (line 49) | def load(path: str):
function ReCoRD_postprocess (line 74) | def ReCoRD_postprocess(text: str) -> str:
FILE: eval/opencompass/datasets/safety.py
class SafetyDataset (line 9) | class SafetyDataset(BaseDataset):
method load (line 12) | def load(path):
FILE: eval/opencompass/datasets/siqa.py
class siqaDataset_V2 (line 9) | class siqaDataset_V2(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/squad20.py
class SQuAD20Dataset (line 11) | class SQuAD20Dataset(BaseDataset):
method load (line 14) | def load(path: str):
class SQuAD20Evaluator (line 43) | class SQuAD20Evaluator(BaseEvaluator):
method score (line 45) | def score(self, predictions, references):
FILE: eval/opencompass/datasets/storycloze.py
class storyclozeDataset (line 9) | class storyclozeDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
class storyclozeDataset_V2 (line 29) | class storyclozeDataset_V2(BaseDataset):
method load (line 32) | def load(**kwargs):
FILE: eval/opencompass/datasets/strategyqa.py
function strategyqa_pred_postprocess (line 7) | def strategyqa_pred_postprocess(text: str) -> str:
function strategyqa_dataset_postprocess (line 17) | def strategyqa_dataset_postprocess(text: str) -> str:
FILE: eval/opencompass/datasets/summedits.py
class SummeditsDataset_V2 (line 11) | class SummeditsDataset_V2(BaseDataset):
method load (line 14) | def load(path: str):
FILE: eval/opencompass/datasets/summscreen.py
class SummScreenDataset (line 9) | class SummScreenDataset(BaseDataset):
method load (line 12) | def load(path: str):
FILE: eval/opencompass/datasets/tnews.py
class TNewsDataset (line 11) | class TNewsDataset(BaseDataset):
method load (line 14) | def load(**kwargs):
class TNewsDataset_V2 (line 47) | class TNewsDataset_V2(BaseDataset):
method load (line 50) | def load(path):
FILE: eval/opencompass/datasets/triviaqa.py
class TriviaQADataset (line 14) | class TriviaQADataset(BaseDataset):
method load (line 17) | def load(path: str):
class TriviaQAEvaluator (line 36) | class TriviaQAEvaluator(BaseEvaluator):
method score (line 38) | def score(self, predictions, references):
FILE: eval/opencompass/datasets/triviaqarc.py
class TriviaQArcDataset (line 9) | class TriviaQArcDataset(BaseDataset):
method load (line 12) | def load(path: str):
FILE: eval/opencompass/datasets/truthfulqa.py
class TruthfulQADataset (line 15) | class TruthfulQADataset(BaseDataset):
method load (line 18) | def load(**kwargs):
class TruthfulQAEvaluator (line 37) | class TruthfulQAEvaluator(BaseEvaluator):
method __init__ (line 72) | def __init__(self,
method score (line 109) | def score(self, predictions, references):
method basic_score (line 118) | def basic_score(self, predictions, references):
method prompt (line 176) | def prompt(self, pred, refer, metric):
method api_score (line 182) | def api_score(self, predictions, references):
FILE: eval/opencompass/datasets/tydiqa.py
class TydiQADataset (line 12) | class TydiQADataset(BaseDataset):
method load (line 15) | def load(**kwargs):
class TydiQAEvaluator (line 26) | class TydiQAEvaluator(BaseEvaluator):
method f1_score (line 29) | def f1_score(self, prediction, ground_truth):
method exact_match_score (line 41) | def exact_match_score(self, prediction, ground_truth):
method metric_max_over_ground_truths (line 45) | def metric_max_over_ground_truths(self, metric_fn, prediction,
method score (line 53) | def score(self, predictions, references):
FILE: eval/opencompass/datasets/wic.py
class WiCDataset (line 11) | class WiCDataset(BaseDataset):
method load (line 14) | def load(**kwargs):
class WiCDataset_V2 (line 31) | class WiCDataset_V2(BaseDataset):
method load (line 34) | def load(path):
FILE: eval/opencompass/datasets/winograd.py
class winogradDataset (line 9) | class winogradDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/winogrande.py
class winograndeDataset (line 9) | class winograndeDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
class winograndeDataset_V2 (line 26) | class winograndeDataset_V2(BaseDataset):
method load (line 29) | def load(**kwargs):
FILE: eval/opencompass/datasets/wnli.py
class wnliDataset (line 9) | class wnliDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/wsc.py
class WSCDataset (line 11) | class WSCDataset(BaseDataset):
method load (line 14) | def load(**kwargs):
class WSCDataset_V2 (line 40) | class WSCDataset_V2(BaseDataset):
method load (line 43) | def load(path):
class WSCDataset_V3 (line 62) | class WSCDataset_V3(BaseDataset):
method load (line 65) | def load(path):
FILE: eval/opencompass/datasets/xcopa.py
class XCOPADataset (line 9) | class XCOPADataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/xiezhi.py
class XiezhiDataset (line 13) | class XiezhiDataset(BaseDataset):
method load (line 16) | def load(path: str, name: str):
class XiezhiRetriever (line 54) | class XiezhiRetriever(BaseRetriever):
method __init__ (line 56) | def __init__(self,
method retrieve (line 63) | def retrieve(self):
FILE: eval/opencompass/datasets/xlsum.py
class XLSUMDataset (line 9) | class XLSUMDataset(BaseDataset):
method load (line 12) | def load(**kwargs):
FILE: eval/opencompass/datasets/xsum.py
class XsumDataset (line 11) | class XsumDataset(BaseDataset):
method load (line 14) | def load(path: str):
function Xsum_postprocess (line 34) | def Xsum_postprocess(text: str) -> str:
FILE: eval/opencompass/metrics/dump_results.py
class DumpResults (line 11) | class DumpResults(BaseMetric):
method __init__ (line 25) | def __init__(self,
method process (line 34) | def process(self, data_batch, data_samples) -> None:
method compute_metrics (line 49) | def compute_metrics(self, results: list) -> dict:
FILE: eval/opencompass/metrics/mme_score.py
class MMEMetric (line 10) | class MMEMetric(BaseMetric):
method __init__ (line 34) | def __init__(self,
method process (line 39) | def process(self, data_batch, data_samples) -> None:
method compute_metrics (line 48) | def compute_metrics(self, results: list) -> dict:
FILE: eval/opencompass/metrics/seedbench.py
class SEEDBenchAcc (line 23) | class SEEDBenchAcc(BaseMetric):
method process (line 26) | def process(self, data_batch, data_samples) -> None:
method compute_metrics (line 40) | def compute_metrics(self, results: list) -> dict:
FILE: eval/opencompass/models/base.py
class BaseModel (line 10) | class BaseModel:
method __init__ (line 26) | def __init__(self,
method generate (line 41) | def generate(self, inputs: List[str], max_out_len: int) -> List[str]:
method get_ppl (line 53) | def get_ppl(self,
method get_token_len (line 71) | def get_token_len(self, prompt: str) -> int:
method parse_template (line 81) | def parse_template(self, prompt_template: PromptType, mode: str) -> str:
method get_ppl_from_template (line 95) | def get_ppl_from_template(self,
method generate_from_template (line 108) | def generate_from_template(self, templates: List[PromptType],
method get_token_len_from_template (line 119) | def get_token_len_from_template(
method to (line 144) | def to(self, device):
class LMTemplateParser (line 148) | class LMTemplateParser:
method __init__ (line 155) | def __init__(self, meta_template: Optional[Dict] = None):
method parse_template (line 183) | def parse_template(self, prompt_template: PromptType, mode: str) -> str:
method _split_rounds (line 278) | def _split_rounds(
method _update_role_dict (line 305) | def _update_role_dict(self, prompt: Union[List, str,
method _prompt2str (line 325) | def _prompt2str(self,
method _role2str (line 357) | def _role2str(self,
method _encode_speical_tokens (line 384) | def _encode_speical_tokens(self, prompt: List[Union[str, int]]) -> str:
FILE: eval/opencompass/models/base_api.py
class BaseAPIModel (line 17) | class BaseAPIModel(BaseModel):
method __init__ (line 34) | def __init__(self,
method generate (line 50) | def generate(self, inputs: List[PromptType],
method get_ppl (line 65) | def get_ppl(self,
method get_token_len (line 82) | def get_token_len(self, prompt: str) -> int:
method wait (line 105) | def wait(self):
method to (line 112) | def to(self, device):
class APITemplateParser (line 116) | class APITemplateParser:
method __init__ (line 123) | def __init__(self, meta_template: Optional[Dict] = None):
method parse_template (line 145) | def parse_template(self, prompt_template: PromptType,
method _update_role_dict (line 254) | def _update_role_dict(self, prompts: Union[List, str]) -> Dict[str, Di...
method _split_rounds (line 272) | def _split_rounds(
method _prompt2api (line 305) | def _prompt2api(self,
method _role2api_role (line 344) | def _role2api_role(self,
class TokenBucket (line 375) | class TokenBucket:
method __init__ (line 382) | def __init__(self, rate):
method _add_tokens (line 387) | def _add_tokens(self):
method get_token (line 394) | def get_token(self):
FILE: eval/opencompass/models/claude_api/claude_api.py
class Claude (line 13) | class Claude(BaseAPIModel):
method __init__ (line 28) | def __init__(
method generate (line 53) | def generate(
method _generate (line 75) | def _generate(
FILE: eval/opencompass/models/claude_api/postprocessors.py
function gsm8k_postprocess (line 9) | def gsm8k_postprocess(text: str) -> str:
function humaneval_postprocess (line 29) | def humaneval_postprocess(text: str) -> str:
function lcsts_postprocess (line 53) | def lcsts_postprocess(text: str) -> str:
function mbpp_postprocess (line 61) | def mbpp_postprocess(text: str) -> str:
function strategyqa_pred_postprocess (line 75) | def strategyqa_pred_postprocess(text: str) -> str:
function record_postprocess (line 85) | def record_postprocess(text: str) -> str:
function humaneval_claude2_postprocess (line 94) | def humaneval_claude2_postprocess(text: str) -> str:
function xsum_postprocess (line 100) | def xsum_postprocess(text: str) -> str:
function yes_no_postprocess (line 106) | def yes_no_postprocess(text: str) -> str:
FILE: eval/opencompass/models/glm.py
class GLM130B (line 16) | class GLM130B(BaseModel):
method __init__ (line 18) | def __init__(self,
method _load_model (line 34) | def _load_model(self, **kwargs):
method get_token_len (line 121) | def get_token_len(self, prompt: str) -> int:
method choice (line 132) | def choice(self, inputs, choices):
method generate (line 166) | def generate(self, inputs: List[str], max_out_len: int) -> List[str]:
method get_logits (line 287) | def get_logits(self, inputs: List[str]):
method get_ppl (line 368) | def get_ppl(self,
FILE: eval/opencompass/models/huggingface.py
class HuggingFace (line 16) | class HuggingFace(BaseModel):
method __init__ (line 53) | def __init__(self,
method _load_tokenizer (line 86) | def _load_tokenizer(self, path: str, tokenizer_path: Optional[str],
method _load_model (line 128) | def _load_model(self,
method generate (line 154) | def generate(self, inputs: List[str], max_out_len: int,
method _batch_generate (line 174) | def _batch_generate(self, inputs: List[str], max_out_len: int,
method _single_generate (line 217) | def _single_generate(self, inputs: List[str], max_out_len: int,
method get_logits (line 255) | def get_logits(self, inputs: List[str]):
method get_ppl (line 282) | def get_ppl(self,
method _get_ppl (line 308) | def _get_ppl(self,
method get_token_len (line 349) | def get_token_len(self, prompt: str) -> int:
class HuggingFaceCausalLM (line 362) | class HuggingFaceCausalLM(HuggingFace):
method _load_model (line 388) | def _load_model(self,
FILE: eval/opencompass/models/intern_model.py
class InternLM (line 9) | class InternLM(BaseModel):
method __init__ (line 11) | def __init__(self,
method _load_model (line 34) | def _load_model(self,
method _load_tokenizer (line 52) | def _load_tokenizer(self, tokenizer_path: str, tokenizer_type: str,
method get_token_len (line 63) | def get_token_len(self, prompt: str) -> int:
method generate (line 75) | def generate(self, inputs: List[str], max_out_len: int) -> List[str]:
method get_ppl (line 91) | def get_ppl(self,
FILE: eval/opencompass/models/llama2.py
class Llama2 (line 13) | class Llama2(BaseModel):
method __init__ (line 26) | def __init__(
method _load_model (line 46) | def _load_model(self,
method _load_tokenizer (line 57) | def _load_tokenizer(self, tokenizer_path: str):
method generate (line 61) | def generate(self, inputs: List[str], max_out_len: int) -> List[str]:
method get_ppl (line 75) | def get_ppl(self,
method get_token_len (line 103) | def get_token_len(self, prompt: str) -> int:
class Llama2Chat (line 107) | class Llama2Chat(BaseModel):
method __init__ (line 120) | def __init__(
method _load_model (line 140) | def _load_model(self,
method _load_tokenizer (line 151) | def _load_tokenizer(self, tokenizer_path: str):
method generate (line 155) | def generate(self,
method get_token_len (line 208) | def get_token_len(self, prompt: str) -> int:
FILE: eval/opencompass/models/openai_api.py
class OpenAI (line 22) | class OpenAI(BaseAPIModel):
method __init__ (line 57) | def __init__(self,
method generate (line 98) | def generate(
method _generate (line 129) | def _generate(self, input: str or PromptList, max_out_len: int,
method get_token_len (line 254) | def get_token_len(self, prompt: str) -> int:
method bin_trim (line 268) | def bin_trim(self, prompt: str, num_token: int) -> str:
FILE: eval/opencompass/models/turbomind.py
function valid_str (line 14) | def valid_str(string, coding='utf-8'):
class TurboMindModel (line 24) | class TurboMindModel(BaseModel):
method __init__ (line 43) | def __init__(
method generate (line 73) | def generate(
method wait (line 102) | def wait(self):
method _generate (line 109) | def _generate(self, input: str or PromptList, max_out_len: int,
FILE: eval/opencompass/multimodal/datasets/mmbench.py
function decode_base64_to_image (line 13) | def decode_base64_to_image(base64_string) -> Image:
class MMBenchDataset (line 21) | class MMBenchDataset(Dataset):
method __init__ (line 32) | def __init__(self,
method __len__ (line 40) | def __len__(self) -> None:
method __getitem__ (line 43) | def __getitem__(self, idx: int) -> dict:
method load_from_df (line 75) | def load_from_df(self, idx: int, key: str) -> Optional[str]:
FILE: eval/opencompass/multimodal/datasets/mme.py
class MMEDataset (line 11) | class MMEDataset(Dataset):
method __init__ (line 26) | def __init__(self, data_dir: str, pipeline: List[dict]) -> None:
method load_data (line 30) | def load_data(self, data_dir: str):
method __len__ (line 68) | def __len__(self) -> None:
method __getitem__ (line 71) | def __getitem__(self, idx: int) -> dict:
FILE: eval/opencompass/multimodal/datasets/seedbench.py
class SEEDBenchDataset (line 17) | class SEEDBenchDataset(Dataset):
method __init__ (line 32) | def __init__(
method __len__ (line 60) | def __len__(self) -> None:
method __getitem__ (line 63) | def __getitem__(self, idx: str) -> dict:
method get_index (line 163) | def get_index(self, num_frames, num_segments):
FILE: eval/opencompass/multimodal/models/instructblip/blip2_vicuna_instruct.py
class InstructBlipInferencer (line 16) | class InstructBlipInferencer(Blip2Base):
method __init__ (line 18) | def __init__(
method forward (line 106) | def forward(self, batch):
method concat_text_input_output (line 112) | def concat_text_input_output(self, input_ids, input_atts, output_ids,
method pack_inputs (line 134) | def pack_inputs(self, batch):
method generate (line 142) | def generate(
FILE: eval/opencompass/multimodal/models/instructblip/post_processor.py
class InstructBlipMMBenchPostProcessor (line 7) | class InstructBlipMMBenchPostProcessor:
method __init__ (line 10) | def __init__(self) -> None:
method __call__ (line 13) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
method _extract_key_words (line 21) | def _extract_key_words(self, output_text: str) -> str:
class InstructBlipCOCOCaptionPostProcessor (line 35) | class InstructBlipCOCOCaptionPostProcessor:
method __init__ (line 38) | def __init__(self) -> None:
method __call__ (line 41) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
class InstructBlipVQAPostProcessor (line 54) | class InstructBlipVQAPostProcessor:
method __init__ (line 57) | def __init__(self) -> None:
method __call__ (line 60) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
class InstructBlipScienceQAPostProcessor (line 72) | class InstructBlipScienceQAPostProcessor:
method __init__ (line 75) | def __init__(self) -> None:
method __call__ (line 78) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
class InstructBlipVSRPostProcessor (line 97) | class InstructBlipVSRPostProcessor:
method __init__ (line 100) | def __init__(self) -> None:
method __call__ (line 103) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
FILE: eval/opencompass/multimodal/models/instructblip/prompt_constructor.py
class InstructBlipMMBenchPromptConstructor (line 6) | class InstructBlipMMBenchPromptConstructor:
method __init__ (line 14) | def __init__(self, image_prompt: str = '', reply_prompt: str = '') -> ...
method __call__ (line 18) | def __call__(self, inputs: dict) -> dict:
method _process (line 33) | def _process(self, data_samples: List[DataSample]) -> str:
class InstructBlipCOCOCaotionPromptConstructor (line 58) | class InstructBlipCOCOCaotionPromptConstructor(
method _process (line 62) | def _process(self, data_samples: List[DataSample]) -> str:
class InstructBlipVQAPromptConstructor (line 68) | class InstructBlipVQAPromptConstructor(InstructBlipMMBenchPromptConstruc...
method _process (line 71) | def _process(self, data_samples: List[DataSample]) -> str:
class InstructBlipScienceQAPromptConstructor (line 81) | class InstructBlipScienceQAPromptConstructor(
method _process (line 87) | def _process(self, data_samples: List[DataSample]) -> str:
class InstructBlipVSRPromptConstructor (line 112) | class InstructBlipVSRPromptConstructor(InstructBlipMMBenchPromptConstruc...
method _process (line 115) | def _process(self, data_samples: List[DataSample]) -> str:
FILE: eval/opencompass/multimodal/models/llama_adapter_v2_multimodal/llama_adapter.py
class LLaMA_adapter (line 18) | class LLaMA_adapter(nn.Module):
method __init__ (line 20) | def __init__(self,
method clip_encode_image (line 93) | def clip_encode_image(self, x):
method forward_visual (line 119) | def forward_visual(self, imgs):
method forward (line 136) | def forward(self, visual_query, tokens, start_pos: int):
method pack_inputs (line 165) | def pack_inputs(self, batch):
method generate (line 173) | def generate(self, batch):
class LLaMA_adapter_v2 (line 258) | class LLaMA_adapter_v2(nn.Module):
method __init__ (line 260) | def __init__(self,
method forward (line 304) | def forward(self, batch):
FILE: eval/opencompass/multimodal/models/llama_adapter_v2_multimodal/post_processor.py
class LlamaAadapterMMBenchPostProcessor (line 4) | class LlamaAadapterMMBenchPostProcessor:
method __init__ (line 7) | def __init__(self) -> None:
method __call__ (line 10) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
FILE: eval/opencompass/multimodal/models/llama_adapter_v2_multimodal/prompt_constructor.py
class LlamaAadapterMMBenchPromptConstructor (line 6) | class LlamaAadapterMMBenchPromptConstructor:
method __init__ (line 14) | def __init__(self, image_prompt: str = '', reply_prompt: str = '') -> ...
method __call__ (line 18) | def __call__(self, inputs: dict) -> dict:
method _process (line 33) | def _process(self, data_samples: List[DataSample]) -> str:
FILE: eval/opencompass/multimodal/models/llava/llava.py
function load_package (line 16) | def load_package():
class KeywordsStoppingCriteria (line 25) | class KeywordsStoppingCriteria(StoppingCriteria):
method __init__ (line 28) | def __init__(self, keywords, tokenizer, input_ids):
method __call__ (line 34) | def __call__(self, output_ids: torch.LongTensor, scores: torch.FloatTe...
class LLaVA (line 49) | class LLaVA(nn.Module):
method __init__ (line 61) | def __init__(
method generate (line 107) | def generate(self, batch):
method forward (line 155) | def forward(self, batch):
FILE: eval/opencompass/multimodal/models/llava/post_processor.py
class LLaVABasePostProcessor (line 1) | class LLaVABasePostProcessor:
method __init__ (line 4) | def __init__(self) -> None:
method __call__ (line 7) | def __call__(self, outputs: str, stop_str: str) -> str:
class LLaVAVSRPostProcessor (line 15) | class LLaVAVSRPostProcessor(LLaVABasePostProcessor):
method __init__ (line 18) | def __init__(self) -> None:
method __call__ (line 21) | def __call__(self, outputs: str, stop_str: str) -> str:
FILE: eval/opencompass/multimodal/models/llava/prompt_constructor.py
class LLaVABasePromptConstructor (line 9) | class LLaVABasePromptConstructor:
method __init__ (line 19) | def __init__(self,
method __call__ (line 30) | def __call__(self, inputs: dict) -> tuple:
method _build_prompt (line 57) | def _build_prompt(self, data_sample):
class LLaVAMMBenchPromptConstructor (line 61) | class LLaVAMMBenchPromptConstructor(LLaVABasePromptConstructor):
method __init__ (line 71) | def __init__(self,
method _build_prompt (line 77) | def _build_prompt(self, data_sample):
class LLaVAVQAPromptConstructor (line 89) | class LLaVAVQAPromptConstructor(LLaVABasePromptConstructor):
method __init__ (line 99) | def __init__(self,
method _build_prompt (line 105) | def _build_prompt(self, data_sample):
class LLaVAScienceQAPromptConstructor (line 111) | class LLaVAScienceQAPromptConstructor(LLaVABasePromptConstructor):
method __init__ (line 123) | def __init__(self,
method _build_prompt (line 129) | def _build_prompt(self, data_sample):
FILE: eval/opencompass/multimodal/models/minigpt_4/minigpt_4.py
class LayerNorm (line 15) | class LayerNorm(nn.LayerNorm):
method forward (line 18) | def forward(self, x: torch.Tensor):
function load_package (line 24) | def load_package():
class MiniGPT4Inferencer (line 41) | class MiniGPT4Inferencer(MiniGPT4):
method __init__ (line 57) | def __init__(self,
method forward (line 91) | def forward(self, batch):
method encode_img (line 99) | def encode_img(self, image):
method pack_inputs (line 151) | def pack_inputs(self, batch):
method generate (line 158) | def generate(self, batch):
method loss (line 207) | def loss(self, batch):
FILE: eval/opencompass/multimodal/models/minigpt_4/post_processor.py
class MiniGPT4MMBenchPostProcessor (line 7) | class MiniGPT4MMBenchPostProcessor:
method __init__ (line 10) | def __init__(self) -> None:
method __call__ (line 13) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
method _extract_key_words (line 24) | def _extract_key_words(self, output_text: str) -> str:
class MiniGPT4COCOCaptionPostProcessor (line 38) | class MiniGPT4COCOCaptionPostProcessor:
method __init__ (line 41) | def __init__(self) -> None:
method __call__ (line 44) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
class MiniGPT4ScienceQAPostProcessor (line 60) | class MiniGPT4ScienceQAPostProcessor:
method __init__ (line 63) | def __init__(self) -> None:
method __call__ (line 66) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
class MiniGPT4VQAPostProcessor (line 85) | class MiniGPT4VQAPostProcessor:
method __init__ (line 88) | def __init__(self) -> None:
method __call__ (line 91) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
class MiniGPT4VSRPostProcessor (line 104) | class MiniGPT4VSRPostProcessor:
method __init__ (line 107) | def __init__(self) -> None:
method __call__ (line 110) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
class MiniGPT4MMEPostProcessor (line 124) | class MiniGPT4MMEPostProcessor(MiniGPT4MMBenchPostProcessor):
method __init__ (line 127) | def __init__(self) -> None:
method __call__ (line 130) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
FILE: eval/opencompass/multimodal/models/minigpt_4/prompt_constructor.py
class MiniGPT4MMBenchPromptConstructor (line 6) | class MiniGPT4MMBenchPromptConstructor:
method __init__ (line 14) | def __init__(self, image_prompt: str = '', reply_prompt: str = '') -> ...
method __call__ (line 18) | def __call__(self, inputs: dict) -> dict:
method _process (line 33) | def _process(self, data_samples: List[DataSample]) -> str:
class MiniGPT4COCOCaotionPromptConstructor (line 58) | class MiniGPT4COCOCaotionPromptConstructor(MiniGPT4MMBenchPromptConstruc...
method _process (line 61) | def _process(self, data_samples: List[DataSample]) -> str:
class MiniGPT4ScienceQAPromptConstructor (line 67) | class MiniGPT4ScienceQAPromptConstructor(MiniGPT4MMBenchPromptConstructor):
method _process (line 72) | def _process(self, data_samples: List[DataSample]) -> str:
class MiniGPT4VQAPromptConstructor (line 97) | class MiniGPT4VQAPromptConstructor(MiniGPT4MMBenchPromptConstructor):
method _process (line 100) | def _process(self, data_samples: List[DataSample]) -> str:
class MiniGPT4VSRPromptConstructor (line 110) | class MiniGPT4VSRPromptConstructor(MiniGPT4MMBenchPromptConstructor):
method _process (line 113) | def _process(self, data_samples: List[DataSample]) -> str:
class MiniGPT4SEEDBenchPromptConstructor (line 123) | class MiniGPT4SEEDBenchPromptConstructor(MiniGPT4MMBenchPromptConstructor):
method _process (line 125) | def _process(self, data_samples: List[DataSample]) -> str:
class MiniGPT4MMEPromptConstructor (line 143) | class MiniGPT4MMEPromptConstructor:
method __init__ (line 151) | def __init__(self) -> None:
method __call__ (line 158) | def __call__(self, inputs: dict) -> dict:
method _process (line 173) | def _process(self, data_samples: List[DataSample]) -> str:
FILE: eval/opencompass/multimodal/models/minigpt_4/utils.py
class StoppingCriteriaSub (line 11) | class StoppingCriteriaSub(StoppingCriteria):
method __init__ (line 13) | def __init__(self, stops=[], encounters=1):
method __call__ (line 17) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen...
function download_cached_file (line 25) | def download_cached_file(url, check_hash=True, progress=False):
function is_url (line 50) | def is_url(input_url):
FILE: eval/opencompass/multimodal/models/mplug_owl/mplug_owl.py
class MplugOwl (line 15) | class MplugOwl(nn.Module):
method __init__ (line 17) | def __init__(self,
method forward (line 49) | def forward(self, batch):
method generate (line 53) | def generate(self, batch):
FILE: eval/opencompass/multimodal/models/mplug_owl/post_processor.py
class MplugOwlMMBenchPostProcessor (line 6) | class MplugOwlMMBenchPostProcessor:
method __init__ (line 9) | def __init__(self) -> None:
method __call__ (line 12) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
FILE: eval/opencompass/multimodal/models/mplug_owl/prompt_constructor.py
class MplugOwlMMBenchPromptConstructor (line 6) | class MplugOwlMMBenchPromptConstructor:
method __init__ (line 14) | def __init__(self, image_prompt: str = '', reply_prompt: str = '') -> ...
method __call__ (line 18) | def __call__(self, inputs: dict) -> dict:
method _process (line 33) | def _process(self, data_samples: List[DataSample]) -> str:
FILE: eval/opencompass/multimodal/models/openflamingo/openflamingo.py
class OpenFlamingoInferencer (line 12) | class OpenFlamingoInferencer(Flamingo):
method __init__ (line 23) | def __init__(self,
method preprocess_text (line 37) | def preprocess_text(self, data_samples: List[DataSample],
method forward (line 70) | def forward(self, batch: dict) -> Union[DataSample, List[DataSample]]:
method generate (line 77) | def generate(self, batch: dict) -> Union[DataSample, List[DataSample]]:
FILE: eval/opencompass/multimodal/models/otter/otter.py
class Otter (line 11) | class Otter(nn.Module):
method __init__ (line 24) | def __init__(self, model_path, load_bit, prompt_constructor,
method forward (line 39) | def forward(self, batch):
method generate (line 47) | def generate(self, batch):
FILE: eval/opencompass/multimodal/models/otter/post_processor.py
class OTTERMMBenchPostProcessor (line 7) | class OTTERMMBenchPostProcessor:
method __init__ (line 10) | def __init__(self) -> None:
method __call__ (line 13) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
method _extract_key_words (line 24) | def _extract_key_words(self, output_text: str) -> str:
class OTTERCOCOCaptionPostProcessor (line 34) | class OTTERCOCOCaptionPostProcessor:
method __init__ (line 37) | def __init__(self) -> None:
method __call__ (line 40) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
class OTTERScienceQAPostProcessor (line 57) | class OTTERScienceQAPostProcessor:
method __init__ (line 60) | def __init__(self) -> None:
method __call__ (line 63) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
class OTTERVQAPostProcessor (line 82) | class OTTERVQAPostProcessor:
method __init__ (line 85) | def __init__(self) -> None:
method __call__ (line 88) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
class OTTERVSRPostProcessor (line 101) | class OTTERVSRPostProcessor:
method __init__ (line 104) | def __init__(self) -> None:
method __call__ (line 107) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
class OTTERMMEPostProcessor (line 121) | class OTTERMMEPostProcessor(OTTERMMBenchPostProcessor):
method __init__ (line 124) | def __init__(self) -> None:
method __call__ (line 127) | def __call__(self, output_token: torch.tensor, tokenizer) -> str:
FILE: eval/opencompass/multimodal/models/otter/prompt_constructor.py
class OTTERMMBenchPromptConstructor (line 7) | class OTTERMMBenchPromptConstructor:
method __init__ (line 15) | def __init__(self, user_label: str = '', model_label: str = '') -> None:
method __call__ (line 21) | def __call__(self, inputs: dict) -> dict:
method _process (line 40) | def _process(self, data_samples: List[DataSample]) -> str:
class OTTERCOCOCaotionPromptConstructor (line 63) | class OTTERCOCOCaotionPromptConstructor(OTTERMMBenchPromptConstructor):
method _process (line 66) | def _process(self, data_samples: List[DataSample]) -> str:
class OTTERScienceQAPromptConstructor (line 72) | class OTTERScienceQAPromptConstructor(OTTERMMBenchPromptConstructor):
method _process (line 77) | def _process(self, data_samples: List[DataSample]) -> str:
class OTTERVQAPromptConstructor (line 102) | class OTTERVQAPromptConstructor(OTTERMMBenchPromptConstructor):
method _process (line 105) | def _process(self, data_samples: List[DataSample]) -> str:
class OTTERVSRPromptConstructor (line 115) | class OTTERVSRPromptConstructor(OTTERMMBenchPromptConstructor):
method _process (line 118) | def _process(self, data_samples: List[DataSample]) -> str:
class OTTERSEEDBenchPromptConstructor (line 128) | class OTTERSEEDBenchPromptConstructor(OTTERMMBenchPromptConstructor):
method _process (line 130) | def _process(self, data_samples: List[DataSample]) -> str:
class OTTERMMEPromptConstructor (line 148) | class OTTERMMEPromptConstructor(OTTERMMBenchPromptConstructor):
method _process (line 156) | def _process(self, data_samples: List[DataSample]) -> str:
FILE: eval/opencompass/multimodal/models/qwen/generation_utils.py
function pad_batch (line 18) | def pad_batch(batch: BatchTokensType, pad_id: int,
function get_ltor_masks_and_position_ids (line 27) | def get_ltor_masks_and_position_ids(
function get_batch (line 91) | def get_batch(context_tokens: torch.LongTensor, eod_id: int):
function get_stop_words_ids (line 106) | def get_stop_words_ids(chat_format: str, tokenizer: PreTrainedTokenizer):
function make_context (line 116) | def make_context(
function _decode_default (line 187) | def _decode_default(
function _decode_chatml (line 220) | def _decode_chatml(tokens: List[int],
function decode_tokens (line 256) | def decode_tokens(
FILE: eval/opencompass/multimodal/models/qwen/post_processor.py
class QwenVLBasePostProcessor (line 6) | class QwenVLBasePostProcessor:
method __init__ (line 9) | def __init__(self) -> None:
method __call__ (line 12) | def __call__(self, pred: torch.tensor, tokenizer: Any,
FILE: eval/opencompass/multimodal/models/qwen/prompt_constructor.py
class QwenVLMMBenchPromptConstructor (line 1) | class QwenVLMMBenchPromptConstructor:
method __init__ (line 7) | def __init__(self) -> None:
method __call__ (line 10) | def __call__(self, inputs: dict) -> str:
FILE: eval/opencompass/multimodal/models/qwen/qwen.py
class QwenVLBase (line 18) | class QwenVLBase(nn.Module):
method __init__ (line 33) | def __init__(
method _build_embeds (line 62) | def _build_embeds(self, images, input_ids):
method generate (line 80) | def generate(self, batch):
method forward (line 104) | def forward(self, batch):
class QwenVLChat (line 109) | class QwenVLChat(QwenVLBase):
method __init__ (line 121) | def __init__(self,
method generate (line 129) | def generate(self, batch):
function forward_hack (line 165) | def forward_hack(self,
FILE: eval/opencompass/multimodal/models/visualglm/post_processor.py
class VisualGLMBasePostProcessor (line 6) | class VisualGLMBasePostProcessor:
method __init__ (line 9) | def __init__(self) -> None:
method __call__ (line 12) | def __call__(self, output_token: torch.tensor, tokenizer: Any,
class VisualGLMVSRPostProcessor (line 17) | class VisualGLMVSRPostProcessor(VisualGLMBasePostProcessor):
method __init__ (line 20) | def __init__(self) -> None:
method __call__ (line 23) | def __call__(self, output_token: torch.tensor, tokenizer: Any,
FILE: eval/opencompass/multimodal/models/visualglm/prompt_constructor.py
class VisualGLMMMBenchPromptConstructor (line 4) | class VisualGLMMMBenchPromptConstructor:
method __init__ (line 16) | def __init__(self,
method __call__ (line 26) | def __call__(self, batch: dict) -> tuple:
class VisualGLMBasePromptConstructor (line 58) | class VisualGLMBasePromptConstructor:
method __init__ (line 66) | def __init__(self, system_prompt='') -> None:
method __call__ (line 69) | def __call__(self, batch: dict) -> tuple:
class VisualGLMVQAPromptConstructor (line 93) | class VisualGLMVQAPromptConstructor(VisualGLMBasePromptConstructor):
method __init__ (line 101) | def __init__(self, system_prompt='') -> None:
method __call__ (line 104) | def __call__(self, batch: dict) -> tuple:
class VisualGLMScienceQAPromptConstructor (line 129) | class VisualGLMScienceQAPromptConstructor(VisualGLMBasePromptConstructor):
method __init__ (line 139) | def __init__(self, system_prompt='') -> None:
method __call__ (line 142) | def __call__(self, batch: dict) -> tuple:
class VisualGLMIconQAPromptConstructor (line 181) | class VisualGLMIconQAPromptConstructor(VisualGLMBasePromptConstructor):
method __init__ (line 189) | def __init__(self, system_prompt='') -> None:
method __call__ (line 192) | def __call__(self, batch: dict) -> tuple:
FILE: eval/opencompass/multimodal/models/visualglm/visualglm.py
class VisualGLM (line 13) | class VisualGLM(nn.Module):
method __init__ (line 27) | def __init__(self,
method encode_by_tokenizer (line 49) | def encode_by_tokenizer(self, multi_prompts, image_position):
method generate (line 73) | def generate(self, batch):
method forward (line 106) | def forward(self, batch):
FILE: eval/opencompass/openicl/icl_dataset_reader.py
class DatasetReader (line 17) | class DatasetReader:
method __init__ (line 58) | def __init__(self,
method generate_input_field_prompt (line 97) | def generate_input_field_prompt(self, entry: Dict) -> str:
method generate_input_field_corpus (line 115) | def generate_input_field_corpus(self,
method generate_output_field_prompt (line 138) | def generate_output_field_prompt(self, entry: Dict) -> str:
method generate_output_field_corpus (line 156) | def generate_output_field_corpus(self,
method generate_input_output_field_prompt (line 179) | def generate_input_output_field_prompt(self, entry: Dict) -> str:
method _check_dataset_reader (line 198) | def _check_dataset_reader(obj) -> 'DatasetReader':
method __len__ (line 204) | def __len__(self):
method __getitem__ (line 207) | def __getitem__(self, idx):
method __repr__ (line 210) | def __repr__(self):
function load_partial_dataset (line 216) | def load_partial_dataset(
class DatasetEncoder (line 245) | class DatasetEncoder(torch.utils.data.Dataset):
method __init__ (line 247) | def __init__(self,
method init_dataset (line 265) | def init_dataset(self):
method __len__ (line 283) | def __len__(self):
method __getitem__ (line 286) | def __getitem__(self, idx):
FILE: eval/opencompass/openicl/icl_evaluator/icl_aucroc_evaluator.py
class AUCROCEvaluator (line 12) | class AUCROCEvaluator(BaseEvaluator):
method __init__ (line 21) | def __init__(self) -> None:
method score (line 24) | def score(self, predictions: List, references: List) -> dict:
FILE: eval/opencompass/openicl/icl_evaluator/icl_base_evaluator.py
class BaseEvaluator (line 4) | class BaseEvaluator:
method __init__ (line 6) | def __init__(self) -> None:
method score (line 9) | def score(self):
FILE: eval/opencompass/openicl/icl_evaluator/icl_em_evaluator.py
class EMEvaluator (line 8) | class EMEvaluator(BaseEvaluator):
method __init__ (line 11) | def __init__(self) -> None:
method score (line 14) | def score(self, predictions, references):
FILE: eval/opencompass/openicl/icl_evaluator/icl_hf_evaluator.py
class HuggingfaceEvaluator (line 12) | class HuggingfaceEvaluator(BaseEvaluator):
method __init__ (line 22) | def __init__(self, metric: str, seed: int = 0) -> None:
method _preprocess (line 27) | def _preprocess(self, predictions: List, references: List) -> dict:
method _postprocess (line 42) | def _postprocess(self, scores: dict) -> dict:
method score (line 53) | def score(self, predictions: List, references: List) -> dict:
class AccEvaluator (line 84) | class AccEvaluator(HuggingfaceEvaluator):
method __init__ (line 87) | def __init__(self) -> None:
method _preprocess (line 90) | def _preprocess(self, predictions: List, references: List) -> dict:
method _postprocess (line 115) | def _postprocess(self, scores: dict) -> dict:
class RougeEvaluator (line 129) | class RougeEvaluator(HuggingfaceEvaluator):
method __init__ (line 132) | def __init__(self) -> None:
method _postprocess (line 135) | def _postprocess(self, scores: dict) -> dict:
class BleuEvaluator (line 148) | class BleuEvaluator(HuggingfaceEvaluator):
method __init__ (line 151) | def __init__(self) -> None:
class MccEvaluator (line 156) | class MccEvaluator(AccEvaluator):
method __init__ (line 159) | def __init__(self) -> None:
method _postprocess (line 162) | def _postprocess(self, scores: dict) -> dict:
class SquadEvaluator (line 176) | class SquadEvaluator(HuggingfaceEvaluator):
method __init__ (line 179) | def __init__(self) -> None:
method _preprocess (line 182) | def _preprocess(self, predictions: List, references: List) -> dict:
method _postprocess (line 208) | def _postprocess(self, scores: dict) -> dict:
class EDAccEvaluator (line 221) | class EDAccEvaluator(AccEvaluator):
method __init__ (line 238) | def __init__(self) -> None:
method _preprocess (line 243) | def _preprocess(self, predictions: List, references: List) -> dict:
FILE: eval/opencompass/openicl/icl_evaluator/icl_toxic_evaluator.py
class PerspectiveAPIClient (line 19) | class PerspectiveAPIClient:
method __init__ (line 31) | def __init__(self, key: str, batch_size: int, max_length: int = 20480):
method _initialize (line 47) | def _initialize(self) -> None:
method create_request_body (line 60) | def create_request_body(text: str) -> dict:
method extract_toxicity_attributes (line 79) | def extract_toxicity_attributes(self, response: dict) -> dict:
method get_toxicity_scores (line 98) | def get_toxicity_scores(self, predictions: List) -> dict:
class ToxicEvaluator (line 153) | class ToxicEvaluator(BaseEvaluator):
method __init__ (line 166) | def __init__(self,
method get_scores (line 174) | def get_scores(self, predictions: List) -> dict:
method get_metrics (line 185) | def get_metrics(self, scores: dict) -> dict:
method score (line 216) | def score(self, predictions: List, references: List) -> dict:
FILE: eval/opencompass/openicl/icl_inferencer/icl_attack_inferencer.py
class AttackInferencer (line 24) | class AttackInferencer(BaseInferencer):
method __init__ (line 50) | def __init__(
method predict (line 87) | def predict(self, adv_prompt) -> List:
method get_generation_prompt_list_from_retriever_indices (line 171) | def get_generation_prompt_list_from_retriever_indices(
FILE: eval/opencompass/openicl/icl_inferencer/icl_base_inferencer.py
class BaseInferencer (line 15) | class BaseInferencer:
method __init__ (line 34) | def __init__(
method inference (line 53) | def inference(self,
method get_dataloader (line 85) | def get_dataloader(datalist: List[List], batch_size: int) -> DataLoader:
function dump_results_dict (line 93) | def dump_results_dict(results_dict, filename):
class GenInferencerOutputHandler (line 98) | class GenInferencerOutputHandler:
method __init__ (line 104) | def __init__(self) -> None:
method write_to_json (line 107) | def write_to_json(self, save_dir: str, filename: str):
method save_results (line 111) | def save_results(self, origin_prompt, prediction, idx):
class PPLInferencerOutputHandler (line 118) | class PPLInferencerOutputHandler:
method __init__ (line 121) | def __init__(self) -> None:
method write_to_json (line 124) | def write_to_json(self, save_dir: str, filename: str):
method save_ice (line 128) | def save_ice(self, ice):
method save_predictions (line 134) | def save_predictions(self, predictions):
method save_prompt_and_ppl (line 140) | def save_prompt_and_ppl(self, label, input, prompt, ppl, idx):
class CLPInferencerOutputHandler (line 151) | class CLPInferencerOutputHandler:
method __init__ (line 154) | def __init__(self) -> None:
method write_to_json (line 157) | def write_to_json(self, save_dir: str, filename: str):
method save_ice (line 161) | def save_ice(self, ice):
method save_prompt_and_condprob (line 167) | def save_prompt_and_condprob(self, input, prompt, cond_prob, idx, choi...
FILE: eval/opencompass/openicl/icl_inferencer/icl_clp_inferencer.py
class CLPInferencer (line 22) | class CLPInferencer(BaseInferencer):
method __init__ (line 50) | def __init__(
method inference (line 74) | def inference(self,
method __get_cond_prob (line 207) | def __get_cond_prob(self,
FILE: eval/opencompass/openicl/icl_inferencer/icl_gen_inferencer.py
class GenInferencer (line 23) | class GenInferencer(BaseInferencer):
method __init__ (line 44) | def __init__(
method inference (line 73) | def inference(self,
method get_generation_prompt_list_from_retriever_indices (line 150) | def get_generation_prompt_list_from_retriever_indices(
class GLMChoiceInferencer (line 187) | class GLMChoiceInferencer(GenInferencer):
method __init__ (line 189) | def __init__(self, *args, choices=['A', 'B', 'C', 'D'], **kwargs):
method inference (line 193) | def inference(self,
FILE: eval/opencompass/openicl/icl_inferencer/icl_ppl_inferencer.py
class PPLInferencer (line 21) | class PPLInferencer(BaseInferencer):
method __init__ (line 36) | def __init__(
method inference (line 58) | def inference(self,
FILE: eval/opencompass/openicl/icl_inferencer/icl_sc_inferencer.py
class SCInferencer (line 21) | class SCInferencer(BaseInferencer):
method __init__ (line 45) | def __init__(
method inference (line 79) | def inference(self,
method get_generation_prompt_list_from_retriever_indices (line 163) | def get_generation_prompt_list_from_retriever_indices(
FILE: eval/opencompass/openicl/icl_inferencer/icl_tot_inferencer.py
class ToTInferencer (line 25) | class ToTInferencer(GenInferencer):
method __init__ (line 69) | def __init__(
method get_value (line 116) | def get_value(self,
method get_values (line 146) | def get_values(self,
method get_votes (line 177) | def get_votes(self, x: str, ys: List[str],
method get_proposals (line 199) | def get_proposals(self, x: str, y: str) -> List[str]:
method get_samples (line 218) | def get_samples(self, x: str, y: str, n_generate_sample: int,
method tot_solve (line 245) | def tot_solve(self, x: str) -> str:
method inference (line 307) | def inference(self,
FILE: eval/opencompass/openicl/icl_prompt_template.py
class PromptTemplate (line 13) | class PromptTemplate:
method __init__ (line 32) | def __init__(
method _check_template_legacy (line 46) | def _check_template_legacy(self):
method generate_ice_item (line 71) | def generate_ice_item(self, entry: Dict, label: Hashable) -> PromptType:
method generate_label_prompt_item (line 105) | def generate_label_prompt_item(self,
method generate_item (line 146) | def generate_item(
method _check_prompt_template (line 199) | def _check_prompt_template(obj) -> 'PromptTemplate':
method __repr__ (line 205) | def __repr__(self):
method _encode_template (line 209) | def _encode_template(self, prompt_template: Union[List[Union[str, Dict]],
FILE: eval/opencompass/openicl/icl_retriever/icl_base_retriever.py
class BaseRetriever (line 11) | class BaseRetriever:
method __init__ (line 30) | def __init__(self,
method retrieve (line 44) | def retrieve(self) -> List[List[int]]:
method get_labels (line 47) | def get_labels(
method generate_ice (line 73) | def generate_ice(self,
method generate_label_prompt (line 114) | def generate_label_prompt(self,
method generate_prompt_for_generate_task (line 157) | def generate_prompt_for_generate_task(
method generate_prompt_for_adv_generate_task (line 210) | def generate_prompt_for_adv_generate_task(
FILE: eval/opencompass/openicl/icl_retriever/icl_bm25_retriever.py
class BM25Retriever (line 18) | class BM25Retriever(BaseRetriever):
method __init__ (line 47) | def __init__(self,
method retrieve (line 63) | def retrieve(self) -> List[List]:
FILE: eval/opencompass/openicl/icl_retriever/icl_dpp_retriever.py
class DPPRetriever (line 15) | class DPPRetriever(TopkRetriever):
method __init__ (line 25) | def __init__(self,
method dpp_search (line 44) | def dpp_search(self):
method retrieve (line 74) | def retrieve(self):
method get_kernel (line 77) | def get_kernel(self, embed, candidates):
function fast_map_dpp (line 103) | def fast_map_dpp(kernel_matrix, max_length):
FILE: eval/opencompass/openicl/icl_retriever/icl_fix_k_retriever.py
class FixKRetriever (line 15) | class FixKRetriever(BaseRetriever):
method __init__ (line 32) | def __init__(self,
method retrieve (line 39) | def retrieve(self, id_list: List[int]):
FILE: eval/opencompass/openicl/icl_retriever/icl_mdl_retriever.py
class MDLRetriever (line 19) | class MDLRetriever(TopkRetriever):
method __init__ (line 57) | def __init__(self,
method topk_search (line 87) | def topk_search(self):
method retrieve (line 140) | def retrieve(self):
method cal_ce (line 145) | def cal_ce(self, input_texts: List[str], mask_length=None):
function entropy (line 184) | def entropy(probs: np.array, label_dim: int = 0, mask=None):
FILE: eval/opencompass/openicl/icl_retriever/icl_random_retriever.py
class RandomRetriever (line 14) | class RandomRetriever(BaseRetriever):
method __init__ (line 22) | def __init__(self,
method retrieve (line 31) | def retrieve(self):
FILE: eval/opencompass/openicl/icl_retriever/icl_topk_retriever.py
class TopkRetriever (line 25) | class TopkRetriever(BaseRetriever):
method __init__ (line 50) | def __init__(self,
method create_index (line 86) | def create_index(self):
method knn_search (line 106) | def knn_search(self, ice_num):
method forward (line 119) | def forward(self, dataloader, process_bar=False, information=''):
method retrieve (line 140) | def retrieve(self):
class ListWrapper (line 145) | class ListWrapper:
method __init__ (line 147) | def __init__(self, data: List[Any]):
method to (line 150) | def to(self, device):
function ignore_pad_dict (line 154) | def ignore_pad_dict(features):
class DataCollatorWithPaddingAndCuda (line 163) | class DataCollatorWithPaddingAndCuda:
method __call__ (line 170) | def __call__(
FILE: eval/opencompass/openicl/icl_retriever/icl_votek_retriever.py
class VotekRetriever (line 15) | class VotekRetriever(TopkRetriever):
method __init__ (line 22) | def __init__(self,
method votek_select (line 37) | def votek_select(self,
method vote_k_search (line 91) | def vote_k_search(self):
method retrieve (line 98) | def retrieve(self):
FILE: eval/opencompass/openicl/icl_retriever/icl_zero_retriever.py
class ZeroRetriever (line 11) | class ZeroRetriever(BaseRetriever):
method __init__ (line 22) | def __init__(self, dataset, ice_eos_token: Optional[str] = '') -> None:
method retrieve (line 25) | def retrieve(self, id_list: List[int] = None) -> List[List]:
FILE: eval/opencompass/openicl/utils/logging.py
function get_logger (line 10) | def get_logger(name, level=LOG_LEVEL, log_file=None, file_mode='w'):
FILE: eval/opencompass/partitioners/base.py
class BasePartitioner (line 10) | class BasePartitioner:
method __init__ (line 18) | def __init__(self, out_dir: str):
method __call__ (line 22) | def __call__(self, cfg: ConfigDict) -> List[Dict]:
method partition (line 57) | def partition(self, models: List[ConfigDict], datasets: List[ConfigDict],
FILE: eval/opencompass/partitioners/mm_naive.py
class MultimodalNaivePartitioner (line 12) | class MultimodalNaivePartitioner(BasePartitioner):
method partition (line 22) | def partition(self, models: List[ConfigDict], datasets: List[ConfigDict],
method __call__ (line 75) | def __call__(self, cfg: ConfigDict) -> List[Dict]:
FILE: eval/opencompass/partitioners/naive.py
class NaivePartitioner (line 13) | class NaivePartitioner(BasePartitioner):
method partition (line 21) | def partition(self, models: List[ConfigDict], datasets: List[ConfigDict],
FILE: eval/opencompass/partitioners/size.py
class SizePartitioner (line 18) | class SizePartitioner(BasePartitioner):
method __init__ (line 30) | def __init__(self,
method partition (line 40) | def partition(self, models: List[ConfigDict], datasets: List[ConfigDict],
method dataset_size (line 113) | def dataset_size(self):
method split_dataset (line 121) | def split_dataset(self, dataset_cfg: ConfigDict) -> List[ConfigDict]:
method get_factor (line 138) | def get_factor(self, dataset: ConfigDict) -> int:
method get_cost (line 162) | def get_cost(self,
FILE: eval/opencompass/runners/base.py
class BaseRunner (line 10) | class BaseRunner:
method __init__ (line 20) | def __init__(self,
method __call__ (line 31) | def __call__(self, tasks: List[Dict[str, Any]]):
method launch (line 42) | def launch(self, tasks: List[Dict[str, Any]]) -> List[Tuple[str, int]]:
method summarize (line 53) | def summarize(self, status: List[Tuple[str, int]]) -> None:
FILE: eval/opencompass/runners/dlc.py
class DLCRunner (line 20) | class DLCRunner(BaseRunner):
method __init__ (line 34) | def __init__(self,
method launch (line 46) | def launch(self, tasks: List[Dict[str, Any]]) -> List[Tuple[str, int]]:
method _launch (line 66) | def _launch(self, task_cfg: ConfigDict, random_sleep: bool = True):
method _job_failed (line 155) | def _job_failed(self, return_code: int, output_paths: List[str]) -> bool:
FILE: eval/opencompass/runners/local.py
class LocalRunner (line 23) | class LocalRunner(BaseRunner):
method __init__ (line 36) | def __init__(self,
method launch (line 46) | def launch(self, tasks: List[Dict[str, Any]]) -> List[Tuple[str, int]]:
method _launch (line 131) | def _launch(self, task, gpu_ids, index):
FILE: eval/opencompass/runners/slurm.py
class SlurmRunner (line 20) | class SlurmRunner(BaseRunner):
method __init__ (line 36) | def __init__(self,
method launch (line 52) | def launch(self, tasks: List[Dict[str, Any]]) -> List[Tuple[str, int]]:
method _launch (line 72) | def _launch(self, task_cfg: ConfigDict, random_sleep: bool = True):
method _job_failed (line 154) | def _job_failed(self, return_code: int, output_paths: List[str]) -> bool:
FILE: eval/opencompass/tasks/base.py
class BaseTask (line 11) | class BaseTask:
method __init__ (line 28) | def __init__(self, cfg: ConfigDict):
method run (line 36) | def run(self):
method get_command (line 40) | def get_command(self, cfg_path, template) -> str:
method name (line 50) | def name(self) -> str:
method __repr__ (line 57) | def __repr__(self) -> str:
method get_log_path (line 60) | def get_log_path(self, file_extension: str = 'json') -> str:
method get_output_paths (line 71) | def get_output_paths(self, file_extension: str = 'json') -> List[str]:
FILE: eval/opencompass/tasks/llm_eval.py
class ModelEvaluator (line 12) | class ModelEvaluator:
method __init__ (line 15) | def __init__(
method parse_cfg (line 28) | def parse_cfg(self, cfg: ConfigDict):
method evaluate (line 34) | def evaluate(self):
method _load_dataset (line 46) | def _load_dataset(self, dataset_abbr: str):
method _evaluate_dataset (line 61) | def _evaluate_dataset(self, dataset_abbr: str):
method _make_prompt (line 73) | def _make_prompt(self, question: str, responses: List[str]) -> str:
method _rank_models (line 85) | def _rank_models(self, output: str,
FILE: eval/opencompass/tasks/mm_infer.py
function build_model (line 25) | def build_model(cfg):
class MultimodalInferTask (line 46) | class MultimodalInferTask:
method __init__ (line 52) | def __init__(self, cfg: ConfigDict):
method name (line 62) | def name(self) -> str:
method get_log_path (line 68) | def get_log_path(self, file_extension: str = 'json') -> str:
method get_output_paths (line 82) | def get_output_paths(self, file_extension: str = 'json') -> List[str]:
method get_command (line 98) | def get_command(self, cfg_path, template):
method run (line 117) | def run(self):
function parse_args (line 144) | def parse_args():
FILE: eval/opencompass/tasks/openicl_attack.py
class OpenICLAttackTask (line 19) | class OpenICLAttackTask(BaseTask):
method __init__ (line 29) | def __init__(self, cfg: ConfigDict):
method get_command (line 36) | def get_command(self, cfg_path, template):
method prompt_selection (line 55) | def prompt_selection(self, inferencer, prompts):
method run (line 68) | def run(self):
method _inference (line 91) | def _inference(self):
method _set_default_value (line 184) | def _set_default_value(self, cfg: ConfigDict, key: str, value: Any):
function parse_args (line 190) | def parse_args():
FILE: eval/opencompass/tasks/openicl_eval.py
class OpenICLEvalTask (line 21) | class OpenICLEvalTask(BaseTask):
method __init__ (line 32) | def __init__(self, cfg: ConfigDict):
method get_command (line 37) | def get_command(self, cfg_path, template):
method run (line 42) | def run(self):
method _score (line 70) | def _score(self):
method _extract_role_pred (line 175) | def _extract_role_pred(self, s: str, begin_str: Optional[str],
function parse_args (line 206) | def parse_args():
FILE: eval/opencompass/tasks/openicl_infer.py
class OpenICLInferTask (line 19) | class OpenICLInferTask(BaseTask):
method __init__ (line 29) | def __init__(self, cfg: ConfigDict):
method get_command (line 36) | def get_command(self, cfg_path, template):
method run (line 55) | def run(self):
method _inference (line 78) | def _inference(self):
method _set_default_value (line 129) | def _set_default_value(self, cfg: ConfigDict, key: str, value: Any):
function parse_args (line 135) | def parse_args():
FILE: eval/opencompass/utils/abbr.py
function model_abbr_from_cfg (line 7) | def model_abbr_from_cfg(cfg: ConfigDict) -> str:
function dataset_abbr_from_cfg (line 17) | def dataset_abbr_from_cfg(cfg: ConfigDict) -> str:
function task_abbr_from_cfg (line 28) | def task_abbr_from_cfg(task: Dict) -> str:
function get_infer_output_path (line 38) | def get_infer_output_path(model_cfg: ConfigDict,
FILE: eval/opencompass/utils/build.py
function build_dataset_from_cfg (line 8) | def build_dataset_from_cfg(dataset_cfg: ConfigDict) -> ConfigDict:
function build_model_from_cfg (line 16) | def build_model_from_cfg(model_cfg: ConfigDict) -> ConfigDict:
FILE: eval/opencompass/utils/collect_env.py
function collect_env (line 7) | def collect_env():
FILE: eval/opencompass/utils/dependency.py
function satisfy_requirement (line 7) | def satisfy_requirement(dep):
FILE: eval/opencompass/utils/file.py
function match_files (line 6) | def match_files(path: str,
FILE: eval/opencompass/utils/fileio.py
function patch_func (line 8) | def patch_func(module, fn_name_to_wrap):
function patch_fileio (line 23) | def patch_fileio(global_vars=None):
function patch_hf_auto_model (line 118) | def patch_hf_auto_model(cache_dir=None):
FILE: eval/opencompass/utils/lark.py
class LarkReporter (line 8) | class LarkReporter:
method __init__ (line 10) | def __init__(self, url: str):
method post (line 13) | def post(self,
function parse_args (line 43) | def parse_args():
FILE: eval/opencompass/utils/logging.py
function get_logger (line 18) | def get_logger(log_level='INFO', filter_duplicate_level=None) -> MMLogger:
class FilterDuplicateMessage (line 45) | class FilterDuplicateMessage(logging.Filter):
method __init__ (line 52) | def __init__(self, name, filter_duplicate_level):
method filter (line 66) | def filter(self, record: logging.LogRecord) -> bool:
FILE: eval/opencompass/utils/menu.py
class Menu (line 4) | class Menu:
method __init__ (line 15) | def __init__(self, lists, prompts=None):
method draw_menu (line 21) | def draw_menu(self, stdscr, selected_row_idx, offset, max_rows):
method run (line 37) | def run(self):
method main_loop (line 41) | def main_loop(self, stdscr):
FILE: eval/opencompass/utils/prompt.py
function safe_format (line 11) | def safe_format(input_str: str, **kwargs) -> str:
function get_prompt_hash (line 27) | def get_prompt_hash(dataset_cfg: Union[ConfigDict, List[ConfigDict]]) ->...
class PromptList (line 64) | class PromptList(list):
method format (line 67) | def format(self, **kwargs) -> PromptList:
method replace (line 92) | def replace(self, src: str, dst: Union[str, PromptList]) -> PromptList:
method __add__ (line 134) | def __add__(self, other: Union[str, PromptList]) -> PromptList:
method __radd__ (line 150) | def __radd__(self, other: Union[str, PromptList]) -> PromptList:
method __iadd__ (line 167) | def __iadd__(self, other: Union[str, PromptList]) -> PromptList:
method __str__ (line 184) | def __str__(self) -> str:
FILE: eval/opencompass/utils/run.py
function match_cfg_file (line 12) | def match_cfg_file(workdir: str, pattern: Union[str, List[str]]) -> List...
function get_config_from_arg (line 49) | def get_config_from_arg(args) -> Config:
function exec_mm_infer_runner (line 110) | def exec_mm_infer_runner(tasks, args, cfg):
function get_config_type (line 131) | def get_config_type(obj) -> str:
function fill_infer_cfg (line 135) | def fill_infer_cfg(cfg, args):
function fill_eval_cfg (line 164) | def fill_eval_cfg(cfg, args):
FILE: eval/opencompass/utils/summarizer.py
class Summarizer (line 19) | class Summarizer:
method __init__ (line 22) | def __init__(self, config: ConfigDict) -> None:
method summarize (line 32) | def summarize(
FILE: eval/opencompass/utils/text_postprocessors.py
function general_postprocess (line 7) | def general_postprocess(text: str) -> str:
function general_cn_postprocess (line 27) | def general_cn_postprocess(text: str) -> str:
function first_capital_postprocess (line 44) | def first_capital_postprocess(text: str) -> str:
function first_option_postprocess (line 51) | def first_option_postprocess(text: str, options: str) -> str:
function first_capital_postprocess_multi (line 77) | def first_capital_postprocess_multi(text: str) -> str:
function last_option_postprocess (line 84) | def last_option_postprocess(text: str, options: str) -> str:
FILE: eval/opencompass/utils/types.py
function _check_type_list (line 6) | def _check_type_list(obj, typelist: List):
function _check_dataset (line 18) | def _check_dataset(obj) -> Union[Dataset, DatasetDict]:
function _check_list (line 27) | def _check_list(obj) -> List:
function _check_str (line 34) | def _check_str(obj) -> str:
function _check_dict (line 41) | def _check_dict(obj) -> Dict:
FILE: eval/run.py
function parse_args (line 17) | def parse_args():
function parse_slurm_args (line 140) | def parse_slurm_args(slurm_parser):
function parse_dlc_args (line 158) | def parse_dlc_args(dlc_parser):
function parse_hf_args (line 166) | def parse_hf_args(hf_parser):
function main (line 183) | def main():
FILE: eval/setup.py
class DownloadNLTK (line 5) | class DownloadNLTK(install):
method run (line 7) | def run(self):
function readme (line 13) | def readme():
function parse_requirements (line 19) | def parse_requirements(fname='requirements.txt', with_version=True):
function get_version (line 98) | def get_version():
function do_setup (line 105) | def do_setup():
FILE: eval/tests/dataset/test_humaneval.py
function run_humaneval_check (line 6) | def run_humaneval_check(completion):
class TestHumaneval (line 18) | class TestHumaneval(unittest.TestCase):
method test_vanilla (line 20) | def test_vanilla(self):
method test_python_quote (line 24) | def test_python_quote(self):
method test_bare_quote (line 33) | def test_bare_quote(self):
method test_error_space_quote (line 42) | def test_error_space_quote(self):
method test_import_1 (line 51) | def test_import_1(self):
method test_import_2 (line 63) | def test_import_2(self):
method test_import_3 (line 74) | def test_import_3(self):
method test_comment (line 85) | def test_comment(self):
method test_additional (line 97) | def test_additional(self):
FILE: eval/tests/openicl/test_prompt_template.py
class TestPromptTemplate (line 7) | class TestPromptTemplate(unittest.TestCase):
method setUp (line 9) | def setUp(self) -> None:
method test_init (line 28) | def test_init(self):
method test_generate_ice_item (line 34) | def test_generate_ice_item(self):
method test_generate_label_prompt_item (line 87) | def test_generate_label_prompt_item(self):
method test_generate_item (line 172) | def test_generate_item(self):
FILE: eval/tests/prompt/test_api_template_parser.py
class TestAPITemplateParser (line 7) | class TestAPITemplateParser(unittest.TestCase):
method setUp (line 9) | def setUp(self):
method test_parse_template_str_input (line 77) | def test_parse_template_str_input(self):
method test_parse_template_list_input (line 83) | def test_parse_template_list_input(self):
method test_parse_template_PromptList_input_no_meta_template (line 89) | def test_parse_template_PromptList_input_no_meta_template(self):
method test_parse_template_PromptList_input_with_meta_template (line 97) | def test_parse_template_PromptList_input_with_meta_template(self):
FILE: eval/tests/prompt/test_lm_template_parser.py
class TestLMTemplateParser (line 7) | class TestLMTemplateParser(unittest.TestCase):
method setUp (line 9) | def setUp(self):
method test_parse_template_str_input (line 78) | def test_parse_template_str_input(self):
method test_parse_template_list_input (line 84) | def test_parse_template_list_input(self):
method test_parse_template_PromptList_input_no_meta_template (line 90) | def test_parse_template_PromptList_input_no_meta_template(self):
method test_parse_template_PromptList_input_with_meta_template (line 98) | def test_parse_template_PromptList_input_with_meta_template(self):
FILE: eval/tests/prompt/test_prompt_list.py
class TestPromptList (line 6) | class TestPromptList(unittest.TestCase):
method test_initialization (line 8) | def test_initialization(self):
method test_format (line 15) | def test_format(self):
method test_replace (line 26) | def test_replace(self):
method test_add (line 55) | def test_add(self):
method test_str (line 70) | def test_str(self):
FILE: eval/tools/case_analyzer.py
function parse_args (line 15) | def parse_args():
class BadcaseShower (line 37) | class BadcaseShower:
method __init__ (line 40) | def __init__(self, cfg: ConfigDict) -> None:
method run (line 51) | def run(self):
function dispatch_tasks (line 168) | def dispatch_tasks(cfg, force=False):
function main (line 182) | def main():
FILE: eval/tools/collect_code_preds.py
function parse_args (line 16) | def parse_args():
function gpt_python_postprocess (line 46) | def gpt_python_postprocess(ori_prompt: str, text: str) -> str:
function wizardcoder_postprocess (line 73) | def wizardcoder_postprocess(text: str) -> str:
function collect_preds (line 91) | def collect_preds(filename: str):
function main (line 127) | def main():
FILE: eval/tools/eval_mmbench.py
function double_log (line 20) | def double_log(msg, fout=None):
function dump (line 27) | def dump(data, f):
function load (line 59) | def load(f):
function report_acc (line 95) | def report_acc(df, group='category'):
function build_option_str (line 123) | def build_option_str(option_list):
function extract_options (line 134) | def extract_options(item):
function build_choices (line 144) | def build_choices(item):
function build_prompt (line 152) | def build_prompt(question, options, prediction):
function can_infer_option (line 174) | def can_infer_option(answer, num_choice=5):
function can_infer_text (line 206) | def can_infer_text(answer, choices):
function can_infer (line 221) | def can_infer(answer, choices):
function prefetch_answer (line 226) | def prefetch_answer(item):
function extract_answer_from_item (line 232) | def extract_answer_from_item(model, item):
function eval_sub_data (line 273) | def eval_sub_data(model, sub_data, answer_map):
function eval_result (line 296) | def eval_result(eval_file, eval_method, meta_file):
function parse_args (line 383) | def parse_args():
FILE: eval/tools/list_configs.py
function parse_args (line 8) | def parse_args():
function main (line 20) | def main():
FILE: eval/tools/prediction_merger.py
function parse_args (line 12) | def parse_args():
class PredictionMerger (line 29) | class PredictionMerger:
method __init__ (line 32) | def __init__(self, cfg: ConfigDict) -> None:
method run (line 39) | def run(self):
function dispatch_tasks (line 79) | def dispatch_tasks(cfg):
function main (line 89) | def main():
FILE: eval/tools/prompt_viewer.py
function parse_args (line 15) | def parse_args():
function parse_model_cfg (line 34) | def parse_model_cfg(model_cfg: ConfigDict) -> Dict[str, ConfigDict]:
function parse_dataset_cfg (line 41) | def parse_dataset_cfg(dataset_cfg: ConfigDict) -> Dict[str, ConfigDict]:
function print_prompts (line 48) | def print_prompts(model_cfg, dataset_cfg, count=1):
function main (line 175) | def main():
FILE: eval/tools/test_api_model.py
function test_model (line 156) | def test_model(model_cfg: ConfigDict):
function parse_args (line 173) | def parse_args():
function parse_model_cfg (line 182) | def parse_model_cfg(model_cfg: ConfigDict) -> Dict[str, ConfigDict]:
function main (line 189) | def main():
FILE: eval/tools/update_dataset_suffix.py
function get_prompt_hash (line 16) | def get_prompt_hash(dataset_cfg: Union[ConfigDict, List[ConfigDict]]) ->...
function get_hash (line 55) | def get_hash(path):
function check_and_rename (line 64) | def check_and_rename(filepath):
function update_imports (line 80) | def update_imports(data):
function main (line 97) | def main():
FILE: model/infer/chatmusician_web_demo.py
function _get_args (line 31) | def _get_args():
function get_uuid (line 51) | def get_uuid():
function _load_model_tokenizer (line 54) | def _load_model_tokenizer(args):
function log_conversation (line 83) | def log_conversation(conversation_id, history, messages, response, gener...
function _parse_text (line 96) | def _parse_text(text):
function convert_history_to_text (line 128) | def convert_history_to_text(task_history):
function postprocess_abc (line 137) | def postprocess_abc(text, conversation_id):
function _launch_demo (line 165) | def _launch_demo(args, model, tokenizer):
function main (line 344) | def main():
FILE: model/infer/predict.py
function generate_prompt (line 45) | def generate_prompt(input_text):
FILE: model/train/data_preprocess.py
function main (line 6) | def main(args):
FILE: model/train/llama/configuration_llama.py
class LlamaConfig (line 31) | class LlamaConfig(PretrainedConfig):
method __init__ (line 76) | def __init__(
FILE: model/train/llama/convert_llama_weights_to_hf.py
function compute_intermediate_size (line 59) | def compute_intermediate_size(n):
function read_json (line 63) | def read_json(path):
function write_json (line 68) | def write_json(text, path):
function write_model (line 73) | def write_model(model_path, input_base_path, model_size):
function write_tokenizer (line 232) | def write_tokenizer(tokenizer_path, input_tokenizer_path):
function main (line 240) | def main():
FILE: model/train/llama/modeling_llama.py
function _make_causal_mask (line 42) | def _make_causal_mask(
function _expand_mask (line 60) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option...
class LlamaRMSNorm (line 74) | class LlamaRMSNorm(nn.Module):
method __init__ (line 75) | def __init__(self, hidden_size, eps=1e-6):
method forward (line 83) | def forward(self, hidden_states):
class LlamaRotaryEmbedding (line 94) | class LlamaRotaryEmbedding(torch.nn.Module):
method __init__ (line 95) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi...
method forward (line 109) | def forward(self, x, seq_len=None):
function rotate_half (line 126) | def rotate_half(x):
function apply_rotary_pos_emb (line 133) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids):
class LlamaMLP (line 143) | class LlamaMLP(nn.Module):
method __init__ (line 144) | def __init__(
method forward (line 156) | def forward(self, x):
class LlamaAttention (line 160) | class LlamaAttention(nn.Module):
method __init__ (line 163) | def __init__(self, config: LlamaConfig):
method _shape (line 182) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int):
method forward (line 185) | def forward(
class LlamaDecoderLayer (line 251) | class LlamaDecoderLayer(nn.Module):
method __init__ (line 252) | def __init__(self, config: LlamaConfig):
method forward (line 264) | def forward(
class LlamaPreTrainedModel (line 338) | class LlamaPreTrainedModel(PreTrainedModel):
method _init_weights (line 345) | def _init_weights(self, module):
method _set_gradient_checkpointing (line 356) | def _set_gradient_checkpointing(self, module, value=False):
class LlamaModel (line 418) | class LlamaModel(LlamaPreTrainedModel):
method __init__ (line 425) | def __init__(self, config: LlamaConfig):
method get_input_embeddings (line 438) | def get_input_embeddings(self):
method set_input_embeddings (line 441) | def set_input_embeddings(self, value):
method _prepare_decoder_attention_mask (line 445) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,...
method forward (line 469) | def forward(
class LlamaForCausalLM (line 597) | class LlamaForCausalLM(LlamaPreTrainedModel):
method __init__ (line 598) | def __init__(self, config):
method get_input_embeddings (line 607) | def get_input_embeddings(self):
method set_input_embeddings (line 610) | def set_input_embeddings(self, value):
method get_output_embeddings (line 613) | def get_output_embeddings(self):
method set_output_embeddings (line 616) | def set_output_embeddings(self, new_embeddings):
method set_decoder (line 619) | def set_decoder(self, decoder):
method get_decoder (line 622) | def get_decoder(self):
method forward (line 627) | def forward(
method prepare_inputs_for_generation (line 707) | def prepare_inputs_for_generation(
method _reorder_cache (line 738) | def _reorder_cache(past_key_values, beam_idx):
class LlamaForSequenceClassification (line 758) | class LlamaForSequenceClassification(LlamaPreTrainedModel):
method __init__ (line 761) | def __init__(self, config):
method get_input_embeddings (line 770) | def get_input_embeddings(self):
method set_input_embeddings (line 773) | def set_input_embeddings(self, value):
method forward (line 777) | def forward(
FILE: model/train/llama/tokenization_llama.py
class LlamaTokenizer (line 49) | class LlamaTokenizer(PreTrainedTokenizer):
method __init__ (line 62) | def __init__(
method __getstate__ (line 97) | def __getstate__(self):
method __setstate__ (line 102) | def __setstate__(self, d):
method vocab_size (line 108) | def vocab_size(self):
method get_vocab (line 112) | def get_vocab(self):
method _tokenize (line 118) | def _tokenize(self, text):
method _convert_token_to_id (line 122) | def _convert_token_to_id(self, token):
method _convert_id_to_token (line 126) | def _convert_id_to_token(self, index):
method convert_tokens_to_string (line 131) | def convert_tokens_to_string(self, tokens):
method save_vocabulary (line 150) | def save_vocabulary(self, save_directory, filename_prefix: Optional[st...
method build_inputs_with_special_tokens (line 175) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No...
method get_special_tokens_mask (line 186) | def get_special_tokens_mask(
method create_token_type_ids_from_sequences (line 221) | def create_token_type_ids_from_sequences(
FILE: model/train/merge.py
function set_args (line 7) | def set_args():
FILE: model/train/train.py
function parse_args (line 26) | def parse_args():
function main (line 66) | def main():
FILE: model/train/utils.py
class DataCollator (line 8) | class DataCollator(object):
method __init__ (line 9) | def __init__(self, tokenizer):
method __call__ (line 13) | def __call__(self, batch):
function print_trainable_parameters (line 32) | def print_trainable_parameters(model):
function print_rank_0 (line 47) | def print_rank_0(msg, rank=0):
function to_device (line 52) | def to_device(batch, device):
function set_random_seed (line 62) | def set_random_seed(seed):
function save_model (line 71) | def save_model(model, tokenizer, output_dir, model_name, state_dict=None):
Condensed preview — 1073 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,785K chars).
[
{
"path": "README.md",
"chars": 9331,
"preview": "# 🎼 ChatMusician: Understanding and Generating Music Intrinsically with LLM\n\n[**🌐 DemoPage**](https://ezmonyi.github.io/"
},
{
"path": "eval/LICENSE",
"chars": 11408,
"preview": "Copyright 2020 OpenCompass Authors. All rights reserved.\n\n Apache License\n "
},
{
"path": "eval/README.md",
"chars": 851,
"preview": "# Evaluation with Massive Multitask Language Understanding (MMLU) Benchmark and MusicTheoryBench\n\n## Installation\n\nBelow"
},
{
"path": "eval/configs/datasets/ARC_c/ARC_c_gen.py",
"chars": 126,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .ARC_c_gen_1e0de5 import ARC_c_datasets # noqa: F401,"
},
{
"path": "eval/configs/datasets/ARC_c/ARC_c_gen_1e0de5.py",
"chars": 1333,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/ARC_c/ARC_c_ppl.py",
"chars": 126,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .ARC_c_ppl_a450bd import ARC_c_datasets # noqa: F401,"
},
{
"path": "eval/configs/datasets/ARC_c/ARC_c_ppl_2ef631.py",
"chars": 1207,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/ARC_c/ARC_c_ppl_a450bd.py",
"chars": 1775,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/ARC_c/ARC_c_ppl_d52a21.py",
"chars": 1138,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/ARC_e/ARC_e_gen.py",
"chars": 126,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .ARC_e_gen_1e0de5 import ARC_e_datasets # noqa: F401,"
},
{
"path": "eval/configs/datasets/ARC_e/ARC_e_gen_1e0de5.py",
"chars": 1328,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/ARC_e/ARC_e_ppl.py",
"chars": 126,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .ARC_e_ppl_a450bd import ARC_e_datasets # noqa: F401,"
},
{
"path": "eval/configs/datasets/ARC_e/ARC_e_ppl_2ef631.py",
"chars": 1202,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/ARC_e/ARC_e_ppl_a450bd.py",
"chars": 1770,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/ARC_e/ARC_e_ppl_d52a21.py",
"chars": 1133,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_C3/CLUE_C3_gen.py",
"chars": 125,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .CLUE_C3_gen_8c358f import C3_datasets # noqa: F401, "
},
{
"path": "eval/configs/datasets/CLUE_C3/CLUE_C3_gen_8c358f.py",
"chars": 1369,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_C3/CLUE_C3_ppl.py",
"chars": 125,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .CLUE_C3_ppl_e24a31 import C3_datasets # noqa: F401, "
},
{
"path": "eval/configs/datasets/CLUE_C3/CLUE_C3_ppl_56b537.py",
"chars": 1153,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_C3/CLUE_C3_ppl_e24a31.py",
"chars": 1122,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_CMRC/CLUE_CMRC_gen.py",
"chars": 129,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .CLUE_CMRC_gen_1bd3c8 import CMRC_datasets # noqa: F4"
},
{
"path": "eval/configs/datasets/CLUE_CMRC/CLUE_CMRC_gen_1bd3c8.py",
"chars": 1114,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_CMRC/CLUE_CMRC_gen_3749cd.py",
"chars": 1020,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_CMRC/CLUE_CMRC_gen_8484b9.py",
"chars": 892,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_CMRC/CLUE_CMRC_gen_941108.py",
"chars": 1016,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_DRCD/CLUE_DRCD_gen.py",
"chars": 129,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .CLUE_DRCD_gen_1bd3c8 import DRCD_datasets # noqa: F4"
},
{
"path": "eval/configs/datasets/CLUE_DRCD/CLUE_DRCD_gen_1bd3c8.py",
"chars": 1115,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_DRCD/CLUE_DRCD_gen_3749cd.py",
"chars": 1020,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_DRCD/CLUE_DRCD_gen_8484b9.py",
"chars": 892,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_DRCD/CLUE_DRCD_gen_941108.py",
"chars": 1016,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_afqmc/CLUE_afqmc_gen.py",
"chars": 131,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .CLUE_afqmc_gen_901306 import afqmc_datasets # noqa: "
},
{
"path": "eval/configs/datasets/CLUE_afqmc/CLUE_afqmc_gen_901306.py",
"chars": 1317,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_afqmc/CLUE_afqmc_ppl.py",
"chars": 131,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .CLUE_afqmc_ppl_6507d7 import afqmc_datasets # noqa: "
},
{
"path": "eval/configs/datasets/CLUE_afqmc/CLUE_afqmc_ppl_378c5b.py",
"chars": 1353,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_afqmc/CLUE_afqmc_ppl_6507d7.py",
"chars": 1551,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_afqmc/CLUE_afqmc_ppl_7b0c1e.py",
"chars": 1033,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_cmnli/CLUE_cmnli_gen.py",
"chars": 131,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .CLUE_cmnli_gen_1abf97 import cmnli_datasets # noqa: "
},
{
"path": "eval/configs/datasets/CLUE_cmnli/CLUE_cmnli_gen_1abf97.py",
"chars": 1307,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_cmnli/CLUE_cmnli_gen_51e956.py",
"chars": 1296,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_cmnli/CLUE_cmnli_ppl.py",
"chars": 131,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .CLUE_cmnli_ppl_fdc6de import cmnli_datasets # noqa: "
},
{
"path": "eval/configs/datasets/CLUE_cmnli/CLUE_cmnli_ppl_98dd6e.py",
"chars": 1185,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_cmnli/CLUE_cmnli_ppl_ef69e7.py",
"chars": 1651,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_cmnli/CLUE_cmnli_ppl_fdc6de.py",
"chars": 1756,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_ocnli/CLUE_ocnli_gen.py",
"chars": 131,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .CLUE_ocnli_gen_c4cb6c import ocnli_datasets # noqa: "
},
{
"path": "eval/configs/datasets/CLUE_ocnli/CLUE_ocnli_gen_51e956.py",
"chars": 1342,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_ocnli/CLUE_ocnli_gen_c4cb6c.py",
"chars": 1355,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_ocnli/CLUE_ocnli_ppl.py",
"chars": 131,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .CLUE_ocnli_ppl_fdc6de import ocnli_datasets # noqa: "
},
{
"path": "eval/configs/datasets/CLUE_ocnli/CLUE_ocnli_ppl_98dd6e.py",
"chars": 1185,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_ocnli/CLUE_ocnli_ppl_ef69e7.py",
"chars": 1651,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/CLUE_ocnli/CLUE_ocnli_ppl_fdc6de.py",
"chars": 1756,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_bustm/FewCLUE_bustm_gen.py",
"chars": 134,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .FewCLUE_bustm_gen_634f41 import bustm_datasets # noq"
},
{
"path": "eval/configs/datasets/FewCLUE_bustm/FewCLUE_bustm_gen_634f41.py",
"chars": 1625,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_bustm/FewCLUE_bustm_ppl.py",
"chars": 134,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .FewCLUE_bustm_ppl_e53034 import bustm_datasets # noq"
},
{
"path": "eval/configs/datasets/FewCLUE_bustm/FewCLUE_bustm_ppl_4b16c0.py",
"chars": 2060,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_bustm/FewCLUE_bustm_ppl_9ef540.py",
"chars": 1338,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_bustm/FewCLUE_bustm_ppl_e53034.py",
"chars": 1814,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_chid/FewCLUE_chid_gen.py",
"chars": 132,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .FewCLUE_chid_gen_0a29a2 import chid_datasets # noqa:"
},
{
"path": "eval/configs/datasets/FewCLUE_chid/FewCLUE_chid_gen_0a29a2.py",
"chars": 1574,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_chid/FewCLUE_chid_ppl.py",
"chars": 132,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .FewCLUE_chid_ppl_8f2872 import chid_datasets # noqa:"
},
{
"path": "eval/configs/datasets/FewCLUE_chid/FewCLUE_chid_ppl_8f2872.py",
"chars": 1429,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_chid/FewCLUE_chid_ppl_acccb5.py",
"chars": 1267,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_cluewsc/FewCLUE_cluewsc_gen.py",
"chars": 138,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .FewCLUE_cluewsc_gen_c68933 import cluewsc_datasets #"
},
{
"path": "eval/configs/datasets/FewCLUE_cluewsc/FewCLUE_cluewsc_gen_c68933.py",
"chars": 1539,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_cluewsc/FewCLUE_cluewsc_ppl.py",
"chars": 138,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .FewCLUE_cluewsc_ppl_868415 import cluewsc_datasets #"
},
{
"path": "eval/configs/datasets/FewCLUE_cluewsc/FewCLUE_cluewsc_ppl_12e4e0.py",
"chars": 1849,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_cluewsc/FewCLUE_cluewsc_ppl_4284a0.py",
"chars": 1461,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_cluewsc/FewCLUE_cluewsc_ppl_868415.py",
"chars": 1712,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_csl/FewCLUE_csl_gen.py",
"chars": 130,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .FewCLUE_csl_gen_28b223 import csl_datasets # noqa: F"
},
{
"path": "eval/configs/datasets/FewCLUE_csl/FewCLUE_csl_gen_28b223.py",
"chars": 1571,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_csl/FewCLUE_csl_gen_87f4a8.py",
"chars": 1462,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_csl/FewCLUE_csl_ppl.py",
"chars": 130,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .FewCLUE_csl_ppl_841b62 import csl_datasets # noqa: F"
},
{
"path": "eval/configs/datasets/FewCLUE_csl/FewCLUE_csl_ppl_769f8d.py",
"chars": 1385,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_csl/FewCLUE_csl_ppl_841b62.py",
"chars": 1237,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_eprstmt/FewCLUE_eprstmt_gen.py",
"chars": 138,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .FewCLUE_eprstmt_gen_740ea0 import eprstmt_datasets #"
},
{
"path": "eval/configs/datasets/FewCLUE_eprstmt/FewCLUE_eprstmt_gen_740ea0.py",
"chars": 1524,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_eprstmt/FewCLUE_eprstmt_ppl.py",
"chars": 138,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .FewCLUE_eprstmt_ppl_f1e631 import eprstmt_datasets #"
},
{
"path": "eval/configs/datasets/FewCLUE_eprstmt/FewCLUE_eprstmt_ppl_1ce587.py",
"chars": 1339,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_eprstmt/FewCLUE_eprstmt_ppl_f1e631.py",
"chars": 1593,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_ocnli_fc/FewCLUE_ocnli_fc_gen.py",
"chars": 140,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .FewCLUE_ocnli_fc_gen_f97a97 import ocnli_fc_datasets "
},
{
"path": "eval/configs/datasets/FewCLUE_ocnli_fc/FewCLUE_ocnli_fc_gen_f97a97.py",
"chars": 1657,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_ocnli_fc/FewCLUE_ocnli_fc_ppl.py",
"chars": 140,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .FewCLUE_ocnli_fc_ppl_c08300 import ocnli_fc_datasets "
},
{
"path": "eval/configs/datasets/FewCLUE_ocnli_fc/FewCLUE_ocnli_fc_ppl_9e8b3d.py",
"chars": 1959,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_ocnli_fc/FewCLUE_ocnli_fc_ppl_c08300.py",
"chars": 1493,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_tnews/FewCLUE_tnews_gen.py",
"chars": 134,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .FewCLUE_tnews_gen_b90e4a import tnews_datasets # noq"
},
{
"path": "eval/configs/datasets/FewCLUE_tnews/FewCLUE_tnews_gen_b90e4a.py",
"chars": 2305,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_tnews/FewCLUE_tnews_ppl.py",
"chars": 134,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .FewCLUE_tnews_ppl_d10e8a import tnews_datasets # noq"
},
{
"path": "eval/configs/datasets/FewCLUE_tnews/FewCLUE_tnews_ppl_7d1c07.py",
"chars": 1430,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_tnews/FewCLUE_tnews_ppl_d10e8a.py",
"chars": 1561,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/FewCLUE_tnews/FewCLUE_tnews_ppl_fff486.py",
"chars": 1560,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/GaokaoBench/GaokaoBench_gen.py",
"chars": 138,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .GaokaoBench_gen_5cfe9e import GaokaoBench_datasets #"
},
{
"path": "eval/configs/datasets/GaokaoBench/GaokaoBench_gen_5cfe9e.py",
"chars": 13038,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/GaokaoBench/GaokaoBench_mixed.py",
"chars": 140,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .GaokaoBench_mixed_f2038e import GaokaoBench_datasets "
},
{
"path": "eval/configs/datasets/GaokaoBench/GaokaoBench_mixed_f2038e.py",
"chars": 14539,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/PJExam/PJExam_gen.py",
"chars": 128,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .PJExam_gen_8cd97c import PJExam_datasets # noqa: F40"
},
{
"path": "eval/configs/datasets/PJExam/PJExam_gen_8cd97c.py",
"chars": 1687,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_AX_b/SuperGLUE_AX_b_gen.py",
"chars": 134,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_AX_b_gen_4dfefa import AX_b_datasets # noq"
},
{
"path": "eval/configs/datasets/SuperGLUE_AX_b/SuperGLUE_AX_b_gen_4dfefa.py",
"chars": 1283,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_AX_b/SuperGLUE_AX_b_ppl.py",
"chars": 134,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_AX_b_ppl_6db806 import AX_b_datasets # noq"
},
{
"path": "eval/configs/datasets/SuperGLUE_AX_b/SuperGLUE_AX_b_ppl_0748aa.py",
"chars": 1074,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_AX_b/SuperGLUE_AX_b_ppl_6db806.py",
"chars": 1593,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_gen.py",
"chars": 134,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_AX_g_gen_68aac7 import AX_g_datasets # noq"
},
{
"path": "eval/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_gen_68aac7.py",
"chars": 1281,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl.py",
"chars": 134,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_AX_g_ppl_66caf3 import AX_g_datasets # noq"
},
{
"path": "eval/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl_50f8f6.py",
"chars": 1071,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_AX_g/SuperGLUE_AX_g_ppl_66caf3.py",
"chars": 1590,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_gen.py",
"chars": 136,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_BoolQ_gen_883d50 import BoolQ_datasets # n"
},
{
"path": "eval/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_gen_883d50.py",
"chars": 1204,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl.py",
"chars": 136,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_BoolQ_ppl_314b96 import BoolQ_datasets # n"
},
{
"path": "eval/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_314797.py",
"chars": 1328,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_314b96.py",
"chars": 1328,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_4da4db.py",
"chars": 1328,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_BoolQ/SuperGLUE_BoolQ_ppl_9619db.py",
"chars": 1094,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_gen.py",
"chars": 130,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_CB_gen_854c6c import CB_datasets # noqa: F"
},
{
"path": "eval/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_gen_854c6c.py",
"chars": 1326,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_ppl.py",
"chars": 130,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_CB_ppl_0143fe import CB_datasets # noqa: F"
},
{
"path": "eval/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_ppl_0143fe.py",
"chars": 1871,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_CB/SuperGLUE_CB_ppl_11c175.py",
"chars": 1082,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_COPA/SuperGLUE_COPA_gen.py",
"chars": 134,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_COPA_gen_91ca53 import COPA_datasets # noq"
},
{
"path": "eval/configs/datasets/SuperGLUE_COPA/SuperGLUE_COPA_gen_91ca53.py",
"chars": 1327,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_COPA/SuperGLUE_COPA_ppl.py",
"chars": 134,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_COPA_ppl_9f3618 import COPA_datasets # noq"
},
{
"path": "eval/configs/datasets/SuperGLUE_COPA/SuperGLUE_COPA_ppl_54058d.py",
"chars": 1113,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_COPA/SuperGLUE_COPA_ppl_5c24f1.py",
"chars": 1363,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_COPA/SuperGLUE_COPA_ppl_9f3618.py",
"chars": 1479,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_MultiRC/SuperGLUE_MultiRC_gen.py",
"chars": 140,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_MultiRC_gen_27071f import MultiRC_datasets "
},
{
"path": "eval/configs/datasets/SuperGLUE_MultiRC/SuperGLUE_MultiRC_gen_27071f.py",
"chars": 1303,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_MultiRC/SuperGLUE_MultiRC_ppl.py",
"chars": 140,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_MultiRC_ppl_ced824 import MultiRC_datasets "
},
{
"path": "eval/configs/datasets/SuperGLUE_MultiRC/SuperGLUE_MultiRC_ppl_866273.py",
"chars": 1072,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_MultiRC/SuperGLUE_MultiRC_ppl_ced824.py",
"chars": 1447,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_RTE/SuperGLUE_RTE_gen.py",
"chars": 132,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_RTE_gen_68aac7 import RTE_datasets # noqa:"
},
{
"path": "eval/configs/datasets/SuperGLUE_RTE/SuperGLUE_RTE_gen_68aac7.py",
"chars": 1308,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_RTE/SuperGLUE_RTE_ppl.py",
"chars": 132,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_RTE_ppl_66caf3 import RTE_datasets # noqa:"
},
{
"path": "eval/configs/datasets/SuperGLUE_RTE/SuperGLUE_RTE_ppl_50f8f6.py",
"chars": 1061,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_RTE/SuperGLUE_RTE_ppl_66caf3.py",
"chars": 1580,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_ReCoRD/SuperGLUE_ReCoRD_gen.py",
"chars": 138,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_ReCoRD_gen_30dea0 import ReCoRD_datasets #"
},
{
"path": "eval/configs/datasets/SuperGLUE_ReCoRD/SuperGLUE_ReCoRD_gen_0f7784.py",
"chars": 1067,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_ReCoRD/SuperGLUE_ReCoRD_gen_30dea0.py",
"chars": 1205,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_ReCoRD/SuperGLUE_ReCoRD_gen_a69961.py",
"chars": 1179,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_WSC/SuperGLUE_WSC_gen.py",
"chars": 132,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_WSC_gen_8a881c import WSC_datasets # noqa:"
},
{
"path": "eval/configs/datasets/SuperGLUE_WSC/SuperGLUE_WSC_gen_6dc406.py",
"chars": 1267,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_WSC/SuperGLUE_WSC_gen_8a881c.py",
"chars": 1251,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_WSC/SuperGLUE_WSC_ppl.py",
"chars": 132,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_WSC_ppl_cbf31c import WSC_datasets # noqa:"
},
{
"path": "eval/configs/datasets/SuperGLUE_WSC/SuperGLUE_WSC_ppl_003529.py",
"chars": 1132,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_WSC/SuperGLUE_WSC_ppl_cbf31c.py",
"chars": 1481,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_WSC/SuperGLUE_WSC_ppl_d0f531.py",
"chars": 1508,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_WSC/SuperGLUE_WSC_ppl_f37e78.py",
"chars": 977,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_WiC/SuperGLUE_WiC_gen.py",
"chars": 132,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_WiC_gen_d06864 import WiC_datasets # noqa:"
},
{
"path": "eval/configs/datasets/SuperGLUE_WiC/SuperGLUE_WiC_gen_d06864.py",
"chars": 1322,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_WiC/SuperGLUE_WiC_ppl.py",
"chars": 132,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .SuperGLUE_WiC_ppl_312de9 import WiC_datasets # noqa:"
},
{
"path": "eval/configs/datasets/SuperGLUE_WiC/SuperGLUE_WiC_ppl_312de9.py",
"chars": 1546,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_WiC/SuperGLUE_WiC_ppl_3fb6fd.py",
"chars": 1103,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/SuperGLUE_WiC/SuperGLUE_WiC_ppl_c926be.py",
"chars": 1327,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/TheoremQA/TheoremQA_gen.py",
"chars": 134,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .TheoremQA_gen_7009de import TheoremQA_datasets # noq"
},
{
"path": "eval/configs/datasets/TheoremQA/TheoremQA_gen_424e0a.py",
"chars": 2022,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/TheoremQA/TheoremQA_gen_7009de.py",
"chars": 1772,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/TheoremQA/TheoremQA_gen_ef26ca.py",
"chars": 1575,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/XCOPA/XCOPA_ppl.py",
"chars": 126,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .XCOPA_ppl_54058d import XCOPA_datasets # noqa: F401,"
},
{
"path": "eval/configs/datasets/XCOPA/XCOPA_ppl_54058d.py",
"chars": 1029,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/XLSum/XLSum_gen.py",
"chars": 126,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .XLSum_gen_2bb71c import XLSum_datasets # noqa: F401,"
},
{
"path": "eval/configs/datasets/XLSum/XLSum_gen_2bb71c.py",
"chars": 973,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/Xsum/Xsum_gen.py",
"chars": 124,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .Xsum_gen_31397e import Xsum_datasets # noqa: F401, F"
},
{
"path": "eval/configs/datasets/Xsum/Xsum_gen_31397e.py",
"chars": 1121,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/Xsum/Xsum_gen_8ea5f8.py",
"chars": 998,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/adv_glue/__init__.py",
"chars": 543,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .adv_glue_sst2.adv_glue_sst2_gen import adv_sst2_datas"
},
{
"path": "eval/configs/datasets/adv_glue/adv_glue_mnli/adv_glue_mnli_gen.py",
"chars": 137,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .adv_glue_mnli_gen_bd8ef0 import adv_mnli_datasets # "
},
{
"path": "eval/configs/datasets/adv_glue/adv_glue_mnli/adv_glue_mnli_gen_bd8ef0.py",
"chars": 1340,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/adv_glue/adv_glue_mnli_mm/adv_glue_mnli_mm_gen.py",
"chars": 143,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .adv_glue_mnli_mm_gen_bd8ef0 import adv_mnli_mm_datase"
},
{
"path": "eval/configs/datasets/adv_glue/adv_glue_mnli_mm/adv_glue_mnli_mm_gen_bd8ef0.py",
"chars": 1368,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/adv_glue/adv_glue_qnli/adv_glue_qnli_gen.py",
"chars": 137,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .adv_glue_qnli_gen_0b7326 import adv_qnli_datasets # "
},
{
"path": "eval/configs/datasets/adv_glue/adv_glue_qnli/adv_glue_qnli_gen_0b7326.py",
"chars": 1323,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/adv_glue/adv_glue_qqp/adv_glue_qqp_gen.py",
"chars": 135,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .adv_glue_qqp_gen_cdc277 import adv_qqp_datasets # no"
},
{
"path": "eval/configs/datasets/adv_glue/adv_glue_qqp/adv_glue_qqp_gen_cdc277.py",
"chars": 1333,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/adv_glue/adv_glue_rte/adv_glue_rte_gen.py",
"chars": 135,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .adv_glue_rte_gen_8cc547 import adv_rte_datasets # no"
},
{
"path": "eval/configs/datasets/adv_glue/adv_glue_rte/adv_glue_rte_gen_8cc547.py",
"chars": 1319,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/adv_glue/adv_glue_sst2/adv_glue_sst2_gen.py",
"chars": 137,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .adv_glue_sst2_gen_ee8d3b import adv_sst2_datasets # "
},
{
"path": "eval/configs/datasets/adv_glue/adv_glue_sst2/adv_glue_sst2_gen_ee8d3b.py",
"chars": 1327,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/agieval/agieval_gen.py",
"chars": 130,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .agieval_gen_64afd3 import agieval_datasets # noqa: F"
},
{
"path": "eval/configs/datasets/agieval/agieval_gen_64afd3.py",
"chars": 6627,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/agieval/agieval_gen_a0c741.py",
"chars": 2747,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/agieval/agieval_mixed.py",
"chars": 132,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .agieval_mixed_2f14ad import agieval_datasets # noqa:"
},
{
"path": "eval/configs/datasets/agieval/agieval_mixed_2f14ad.py",
"chars": 7174,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/anli/anli_gen.py",
"chars": 124,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .anli_gen_fc7328 import anli_datasets # noqa: F401, F"
},
{
"path": "eval/configs/datasets/anli/anli_gen_fc7328.py",
"chars": 1542,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/anli/anli_ppl.py",
"chars": 124,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .anli_ppl_1d290e import anli_datasets # noqa: F401, F"
},
{
"path": "eval/configs/datasets/anli/anli_ppl_1d290e.py",
"chars": 1807,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/apps/apps_gen.py",
"chars": 124,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .apps_gen_7fbb95 import apps_datasets # noqa: F401, F"
},
{
"path": "eval/configs/datasets/apps/apps_gen_5b4254.py",
"chars": 1079,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/apps/apps_gen_7fbb95.py",
"chars": 1265,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/apps/apps_gen_b4dee3.py",
"chars": 950,
"preview": "from opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever import ZeroRet"
},
{
"path": "eval/configs/datasets/bbh/bbh_gen.py",
"chars": 122,
"preview": "from mmengine.config import read_base\n\nwith read_base():\n from .bbh_gen_5b92b0 import bbh_datasets # noqa: F401, F40"
},
{
"path": "eval/configs/datasets/bbh/bbh_gen_5b92b0.py",
"chars": 3400,
"preview": "import os\nfrom opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever impo"
},
{
"path": "eval/configs/datasets/bbh/bbh_gen_5bf00b.py",
"chars": 3350,
"preview": "import os\nfrom opencompass.openicl.icl_prompt_template import PromptTemplate\nfrom opencompass.openicl.icl_retriever impo"
},
{
"path": "eval/configs/datasets/bbh/lib_prompt/boolean_expressions.txt",
"chars": 1780,
"preview": "Evaluate the result of a random Boolean expression.\n\nQ: not ( ( not not True ) ) is\nA: Let's think step by step.\nRemembe"
},
{
"path": "eval/configs/datasets/bbh/lib_prompt/causal_judgement.txt",
"chars": 3652,
"preview": "Answer questions about causal attribution.\n\nQ: How would a typical person answer each of the following questions about c"
},
{
"path": "eval/configs/datasets/bbh/lib_prompt/date_understanding.txt",
"chars": 1166,
"preview": "Infer the date from context.\n\nQ: Today is Christmas Eve of 1937. What is the date 10 days ago in MM/DD/YYYY?\nOptions:\n(A"
},
{
"path": "eval/configs/datasets/bbh/lib_prompt/disambiguation_qa.txt",
"chars": 3567,
"preview": "Clarify the meaning of sentences with ambiguous pronouns.\n\nQ: In the following sentences, explain the antecedent of the "
},
{
"path": "eval/configs/datasets/bbh/lib_prompt/dyck_languages.txt",
"chars": 2404,
"preview": "Correctly close a Dyck-n word.\n\nQ: Complete the rest of the sequence, making sure that the parentheses are closed proper"
},
{
"path": "eval/configs/datasets/bbh/lib_prompt/formal_fallacies.txt",
"chars": 4470,
"preview": "Distinguish deductively valid arguments from formal fallacies.\n\nQ: \"It is not always easy to see who is related to whom "
},
{
"path": "eval/configs/datasets/bbh/lib_prompt/geometric_shapes.txt",
"chars": 4830,
"preview": "Name geometric shapes from their SVG paths.\n\nQ: This SVG path element <path d=\"M 31.00,73.00 L 32.00,59.00 L 44.00,50.00"
},
{
"path": "eval/configs/datasets/bbh/lib_prompt/hyperbaton.txt",
"chars": 3113,
"preview": "Order adjectives correctly in English sentences.\n\nQ: Which sentence has the correct adjective order:\nOptions:\n(A) rubber"
},
{
"path": "eval/configs/datasets/bbh/lib_prompt/logical_deduction_five_objects.txt",
"chars": 2504,
"preview": "A logical deduction task which requires deducing the order of a sequence of objects.\n\nQ: The following paragraphs each d"
}
]
// ... and 873 more files (download for full content)
About this extraction
This page contains the full source code of the hf-lin/ChatMusician GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1073 files (2.4 MB), approximately 699.3k tokens, and a symbol index with 1323 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.