Unverified Commit 6c68fd16 authored by Daniel Furman's avatar Daniel Furman Committed by GitHub
Browse files

Merge branch 'EleutherAI:main' into main

parents 337c084b ecb1df28
...@@ -301,14 +301,10 @@ The best way to get support is to open an issue on this repo or join the [Eleuth ...@@ -301,14 +301,10 @@ The best way to get support is to open an issue on this repo or join the [Eleuth
## Cite as ## Cite as
``` ```
@misc{eval-harness, @article{gao2021framework,
author = {Gao, Leo and Tow, Jonathan and Abbasi, Baber and Biderman, Stella and Black, Sid and DiPofi, Anthony and Foster, Charles and Golding, Laurence and Hsu, Jeffrey and Le Noac'h, Alain and Li, Haonan and McDonell, Kyle and Muennighoff, Niklas and Ociepa, Chris and Phang, Jason and Reynolds, Laria and Schoelkopf, Hailey and Skowron, Aviya and Sutawika, Lintang and Tang, Eric and Thite, Anish and Wang, Ben and Wang, Kevin and Zou, Andy}, title={A framework for few-shot language model evaluation},
title = {A framework for few-shot language model evaluation}, author={Gao, Leo and Tow, Jonathan and Biderman, Stella and Black, Sid and DiPofi, Anthony and Foster, Charles and Golding, Laurence and Hsu, Jeffrey and McDonell, Kyle and Muennighoff, Niklas and others},
month = 12, journal={Version v0. 0.1. Sept},
year = 2023, year={2021}
publisher = {Zenodo},
version = {v0.4.0},
doi = {10.5281/zenodo.10256836},
url = {https://zenodo.org/records/10256836}
} }
``` ```
...@@ -787,16 +787,19 @@ class ConfigurableTask(Task): ...@@ -787,16 +787,19 @@ class ConfigurableTask(Task):
) )
example = self.doc_to_text(doc) example = self.doc_to_text(doc)
if isinstance(example, str): if self.multiple_input:
return labeled_examples + example return labeled_examples
elif isinstance(example, list): else:
return [labeled_examples + ex for ex in example] if isinstance(example, str):
elif isinstance(example, int): return labeled_examples + example
if self.config.doc_to_choice is not None: elif isinstance(example, list):
choices = self.doc_to_choice(doc) return [labeled_examples + ex for ex in example]
return labeled_examples + choices[example] elif isinstance(example, int):
else: if self.config.doc_to_choice is not None:
return labeled_examples + str(example) choices = self.doc_to_choice(doc)
return labeled_examples + choices[example]
else:
return labeled_examples + str(example)
def apply_filters(self): def apply_filters(self):
if hasattr(self, "_filters"): if hasattr(self, "_filters"):
...@@ -952,7 +955,9 @@ class ConfigurableTask(Task): ...@@ -952,7 +955,9 @@ class ConfigurableTask(Task):
if self.multiple_input: if self.multiple_input:
# If there are multiple inputs, choices are placed in the ctx # If there are multiple inputs, choices are placed in the ctx
cont = self.doc_to_target(doc) cont = self.doc_to_target(doc)
arguments = [(ctx, f"{target_delimiter}{cont}") for ctx in choices] arguments = [
(ctx + choice, f"{target_delimiter}{cont}") for choice in choices
]
else: else:
# Otherwise they are placed in the continuation # Otherwise they are placed in the continuation
arguments = [(ctx, f"{target_delimiter}{cont}") for cont in choices] arguments = [(ctx, f"{target_delimiter}{cont}") for cont in choices]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment