lm_eval/tasks/lambada_cloze/lambada_openai_cloze.yaml (20 lines of code) (raw):

tag: - lambada_cloze task: lambada_openai_cloze_yaml dataset_path: EleutherAI/lambada_openai dataset_name: default output_type: loglikelihood test_split: test doc_to_text: "{{text.split(' ')[:-1]|join(' ')}} ____. ->" doc_to_target: "{{' '+text.split(' ')[-1]}}" should_decontaminate: true doc_to_decontamination_query: "{{text}}" metric_list: - metric: perplexity aggregation: perplexity higher_is_better: false - metric: acc aggregation: mean higher_is_better: true metadata: version: 1.0