diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/__init__.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..317c0291b96f68e5dafe73fa0d704bd33e0eaa9a --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/__init__.py @@ -0,0 +1 @@ +from .evaluator import evaluate, simple_evaluate diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/__main__.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..ab68781939599c9fe959c5b642ff385db1067510 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/__main__.py @@ -0,0 +1,461 @@ +import argparse +import json +import logging +import os +import sys +from functools import partial +from typing import Union + +from lm_eval import evaluator, utils +from lm_eval.evaluator import request_caching_arg_to_dict +from lm_eval.loggers import EvaluationTracker, WandbLogger +from lm_eval.tasks import TaskManager +from lm_eval.utils import handle_non_serializable, make_table, simple_parse_args_string + + +def _int_or_none_list_arg_type( + min_len: int, max_len: int, defaults: str, value: str, split_char: str = "," +): + def parse_value(item): + item = item.strip().lower() + if item == "none": + return None + try: + return int(item) + except ValueError: + raise argparse.ArgumentTypeError(f"{item} is not an integer or None") + + items = [parse_value(v) for v in value.split(split_char)] + num_items = len(items) + + if num_items == 1: + # Makes downstream handling the same for single and multiple values + items = items * max_len + elif num_items < min_len or num_items > max_len: + raise argparse.ArgumentTypeError( + f"Argument requires {max_len} integers or None, separated by '{split_char}'" + ) + elif num_items != max_len: + logging.warning( + f"Argument requires {max_len} integers or None, separated by '{split_char}'. " + "Missing values will be filled with defaults." + ) + default_items = [parse_value(v) for v in defaults.split(split_char)] + items.extend( + default_items[num_items:] + ) # extend items list with missing defaults + + return items + + +def check_argument_types(parser: argparse.ArgumentParser): + """ + Check to make sure all CLI args are typed, raises error if not + """ + for action in parser._actions: + if action.dest != "help" and not action.const: + if action.type is None: + raise ValueError( + f"Argument '{action.dest}' doesn't have a type specified." + ) + else: + continue + + +def setup_parser() -> argparse.ArgumentParser: + parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter) + parser.add_argument( + "--model", "-m", type=str, default="hf", help="Name of model e.g. `hf`" + ) + parser.add_argument( + "--tasks", + "-t", + default=None, + type=str, + metavar="task1,task2", + help="Comma-separated list of task names or task groupings to evaluate on.\nTo get full list of tasks, use one of the commands `lm-eval --tasks {{list_groups,list_subtasks,list_tags,list}}` to list out all available names for task groupings; only (sub)tasks; tags; or all of the above", + ) + parser.add_argument( + "--model_args", + "-a", + default="", + type=str, + help="Comma separated string arguments for model, e.g. `pretrained=EleutherAI/pythia-160m,dtype=float32`", + ) + parser.add_argument( + "--num_fewshot", + "-f", + type=int, + default=None, + metavar="N", + help="Number of examples in few-shot context", + ) + parser.add_argument( + "--batch_size", + "-b", + type=str, + default=1, + metavar="auto|auto:N|N", + help="Acceptable values are 'auto', 'auto:N' or N, where N is an integer. Default 1.", + ) + parser.add_argument( + "--max_batch_size", + type=int, + default=None, + metavar="N", + help="Maximal batch size to try with --batch_size auto.", + ) + parser.add_argument( + "--device", + type=str, + default=None, + help="Device to use (e.g. cuda, cuda:0, cpu).", + ) + parser.add_argument( + "--output_path", + "-o", + default=None, + type=str, + metavar="DIR|DIR/file.json", + help="The path to the output file where the result metrics will be saved. If the path is a directory and log_samples is true, the results will be saved in the directory. Else the parent directory will be used.", + ) + parser.add_argument( + "--limit", + "-L", + type=float, + default=None, + metavar="N|0 argparse.Namespace: + check_argument_types(parser) + return parser.parse_args() + + +def cli_evaluate(args: Union[argparse.Namespace, None] = None) -> None: + if not args: + # we allow for args to be passed externally, else we parse them ourselves + parser = setup_parser() + args = parse_eval_args(parser) + + if args.wandb_args: + wandb_logger = WandbLogger(**simple_parse_args_string(args.wandb_args)) + + eval_logger = utils.eval_logger + eval_logger.setLevel(getattr(logging, f"{args.verbosity}")) + eval_logger.info(f"Verbosity set to {args.verbosity}") + os.environ["TOKENIZERS_PARALLELISM"] = "false" + + # update the evaluation tracker args with the output path and the HF token + if args.output_path: + args.hf_hub_log_args += f",output_path={args.output_path}" + if os.environ.get("HF_TOKEN", None): + args.hf_hub_log_args += f",token={os.environ.get('HF_TOKEN')}" + evaluation_tracker_args = simple_parse_args_string(args.hf_hub_log_args) + evaluation_tracker = EvaluationTracker(**evaluation_tracker_args) + + if args.predict_only: + args.log_samples = True + if (args.log_samples or args.predict_only) and not args.output_path: + raise ValueError( + "Specify --output_path if providing --log_samples or --predict_only" + ) + + if args.fewshot_as_multiturn and args.apply_chat_template is False: + raise ValueError( + "When `fewshot_as_multiturn` is selected, `apply_chat_template` must be set (either to `True` or to the chosen template name)." + ) + + if args.include_path is not None: + eval_logger.info(f"Including path: {args.include_path}") + task_manager = TaskManager(args.verbosity, include_path=args.include_path) + + if "push_samples_to_hub" in evaluation_tracker_args and not args.log_samples: + eval_logger.warning( + "Pushing samples to the Hub requires --log_samples to be set. Samples will not be pushed to the Hub." + ) + + if args.limit: + eval_logger.warning( + " --limit SHOULD ONLY BE USED FOR TESTING." + "REAL METRICS SHOULD NOT BE COMPUTED USING LIMIT." + ) + + if args.tasks is None: + eval_logger.error("Need to specify task to evaluate.") + sys.exit() + elif args.tasks == "list": + print(task_manager.list_all_tasks()) + sys.exit() + elif args.tasks == "list_groups": + print(task_manager.list_all_tasks(list_subtasks=False, list_tags=False)) + sys.exit() + elif args.tasks == "list_tags": + print(task_manager.list_all_tasks(list_groups=False, list_subtasks=False)) + sys.exit() + elif args.tasks == "list_subtasks": + print(task_manager.list_all_tasks(list_groups=False, list_tags=False)) + sys.exit() + else: + if os.path.isdir(args.tasks): + import glob + + task_names = [] + yaml_path = os.path.join(args.tasks, "*.yaml") + for yaml_file in glob.glob(yaml_path): + config = utils.load_yaml_config(yaml_file) + task_names.append(config) + else: + task_list = args.tasks.split(",") + task_names = task_manager.match_tasks(task_list) + for task in [task for task in task_list if task not in task_names]: + if os.path.isfile(task): + config = utils.load_yaml_config(task) + task_names.append(config) + task_missing = [ + task for task in task_list if task not in task_names and "*" not in task + ] # we don't want errors if a wildcard ("*") task name was used + + if task_missing: + missing = ", ".join(task_missing) + eval_logger.error( + f"Tasks were not found: {missing}\n" + f"{utils.SPACING}Try `lm-eval --tasks list` for list of available tasks", + ) + raise ValueError( + f"Tasks not found: {missing}. Try `lm-eval --tasks {{list_groups,list_subtasks,list_tags,list}}` to list out all available names for task groupings; only (sub)tasks; tags; or all of the above, or pass '--verbosity DEBUG' to troubleshoot task registration issues." + ) + + # Respect user's value passed in via CLI, otherwise default to True and add to comma-separated model args + if args.trust_remote_code: + eval_logger.info( + "Passed `--trust_remote_code`, setting environment variable `HF_DATASETS_TRUST_REMOTE_CODE=true`" + ) + # HACK: import datasets and override its HF_DATASETS_TRUST_REMOTE_CODE value internally, + # because it's already been determined based on the prior env var before launching our + # script--`datasets` gets imported by lm_eval internally before these lines can update the env. + import datasets + + datasets.config.HF_DATASETS_TRUST_REMOTE_CODE = True + + args.model_args = args.model_args + ",trust_remote_code=True" + + eval_logger.info(f"Selected Tasks: {task_names}") + + request_caching_args = request_caching_arg_to_dict( + cache_requests=args.cache_requests + ) + + results = evaluator.simple_evaluate( + model=args.model, + model_args=args.model_args, + tasks=task_names, + num_fewshot=args.num_fewshot, + batch_size=args.batch_size, + max_batch_size=args.max_batch_size, + device=args.device, + use_cache=args.use_cache, + limit=args.limit, + check_integrity=args.check_integrity, + write_out=args.write_out, + log_samples=args.log_samples, + evaluation_tracker=evaluation_tracker, + system_instruction=args.system_instruction, + apply_chat_template=args.apply_chat_template, + fewshot_as_multiturn=args.fewshot_as_multiturn, + gen_kwargs=args.gen_kwargs, + task_manager=task_manager, + verbosity=args.verbosity, + predict_only=args.predict_only, + random_seed=args.seed[0], + numpy_random_seed=args.seed[1], + torch_random_seed=args.seed[2], + fewshot_random_seed=args.seed[3], + **request_caching_args, + ) + + if results is not None: + if args.log_samples: + samples = results.pop("samples") + dumped = json.dumps( + results, indent=2, default=handle_non_serializable, ensure_ascii=False + ) + if args.show_config: + print(dumped) + + batch_sizes = ",".join(map(str, results["config"]["batch_sizes"])) + + # Add W&B logging + if args.wandb_args: + try: + wandb_logger.post_init(results) + wandb_logger.log_eval_result() + if args.log_samples: + wandb_logger.log_eval_samples(samples) + except Exception as e: + eval_logger.info(f"Logging to Weights and Biases failed due to {e}") + + evaluation_tracker.save_results_aggregated( + results=results, samples=samples if args.log_samples else None + ) + + if args.log_samples: + for task_name, config in results["configs"].items(): + evaluation_tracker.save_results_samples( + task_name=task_name, samples=samples[task_name] + ) + + if ( + evaluation_tracker.push_results_to_hub + or evaluation_tracker.push_samples_to_hub + ): + evaluation_tracker.recreate_metadata_card() + + print( + f"{args.model} ({args.model_args}), gen_kwargs: ({args.gen_kwargs}), limit: {args.limit}, num_fewshot: {args.num_fewshot}, " + f"batch_size: {args.batch_size}{f' ({batch_sizes})' if batch_sizes else ''}" + ) + print(make_table(results)) + if "groups" in results: + print(make_table(results, "groups")) + + if args.wandb_args: + # Tear down wandb run once all the logging is done. + wandb_logger.run.finish() + + +if __name__ == "__main__": + cli_evaluate() diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/evaluator.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/evaluator.py new file mode 100644 index 0000000000000000000000000000000000000000..52a8d00d7422377d3c7e1e568e7e4a6adde52b75 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/evaluator.py @@ -0,0 +1,657 @@ +import itertools +import json +import logging +import random +import time +from collections import defaultdict +from typing import TYPE_CHECKING, List, Optional, Union + +import numpy as np +import torch + +import lm_eval.api.metrics +import lm_eval.api.registry +import lm_eval.api.task +import lm_eval.models +from lm_eval.caching.cache import delete_cache +from lm_eval.evaluator_utils import ( + consolidate_group_results, + consolidate_results, + get_sample_size, + get_subtask_list, + get_task_list, + prepare_print_tasks, + print_writeout, + run_task_tests, +) +from lm_eval.loggers import EvaluationTracker +from lm_eval.loggers.utils import add_env_info, add_tokenizer_info, get_git_commit_hash +from lm_eval.tasks import ( + TaskManager, + get_task_dict, +) +from lm_eval.utils import ( + eval_logger, + handle_non_serializable, + hash_string, + positional_deprecated, + simple_parse_args_string, +) + + +if TYPE_CHECKING: + from lm_eval.api.model import LM + from lm_eval.api.task import Task + + +@positional_deprecated +def simple_evaluate( + model, + model_args: Optional[Union[str, dict]] = None, + tasks: Optional[List[Union[str, dict, object]]] = None, + num_fewshot: Optional[int] = None, + batch_size: Optional[Union[int, str]] = None, + max_batch_size: Optional[int] = None, + device: Optional[str] = None, + use_cache: Optional[str] = None, + cache_requests: bool = False, + rewrite_requests_cache: bool = False, + delete_requests_cache: bool = False, + limit: Optional[Union[int, float]] = None, + bootstrap_iters: int = 100000, + check_integrity: bool = False, + write_out: bool = False, + log_samples: bool = True, + evaluation_tracker: Optional[EvaluationTracker] = None, + system_instruction: Optional[str] = None, + apply_chat_template: Union[bool, str] = False, + fewshot_as_multiturn: bool = False, + gen_kwargs: Optional[str] = None, + task_manager: Optional[TaskManager] = None, + verbosity: str = "INFO", + predict_only: bool = False, + random_seed: int = 0, + numpy_random_seed: int = 1234, + torch_random_seed: int = 1234, + fewshot_random_seed: int = 1234, +): + """Instantiate and evaluate a model on a list of tasks. + + :param model: Union[str, LM] + Name of model or LM object, see lm_eval.models.get_model + :param model_args: Optional[str, dict] + String or dict arguments for each model class, see LM.create_from_arg_string and LM.create_from_arg_object. + Ignored if `model` argument is a LM object. + :param tasks: list[Union[str, dict, Task]] + List of task names or Task objects. Task objects will be taken to have name task.EVAL_HARNESS_NAME if defined and type(task).__name__ otherwise. + :param num_fewshot: int + Number of examples in few-shot context + :param batch_size: int or str, optional + Batch size for model + :param max_batch_size: int, optional + Maximal batch size to try with automatic batch size detection + :param device: str, optional + PyTorch device (e.g. "cpu" or "cuda:0") for running models + :param use_cache: str, optional + A path to a sqlite db file for caching model responses. `None` if not caching. + :param cache_requests: bool, optional + Speed up evaluation by caching the building of dataset requests. `None` if not caching. + :param rewrite_requests_cache: bool, optional + Rewrites all of the request cache if set to `True`. `None` if not desired. + :param delete_requests_cache: bool, optional + Deletes all of the request cache if set to `True`. `None` if not desired. + :param limit: int or float, optional + Limit the number of examples per task (only use this for testing), If <1, limit is a percentage of the total number of examples. + :param bootstrap_iters: + Number of iterations for bootstrap statistics, used when calculating stderrs. set to 0 for no stderr calculations to be performed. + :param check_integrity: bool + Whether to run the relevant part of the test suite for the tasks + :param write_out: bool + If True, write out an example document and model input for checking task integrity + :param log_samples: bool + If True, write out all model outputs and documents for per-sample measurement and post-hoc analysis + :param system_instruction: str + System instruction to be applied to the prompt + :param apply_chat_template: Union[bool, str] + Specifies whether to apply a chat template to the prompt. + - If set to True, the default chat template is applied. + - If set to a string, applies the specified chat template by name. + Defaults to False (no chat template applied). + :param fewshot_as_multiturn: bool + Whether to provide the fewshot examples as a multiturn conversation or a single user turn. + :param gen_kwargs: str + String arguments for model generation + Ignored for all tasks with loglikelihood output_type + :param predict_only: bool + If true only model outputs will be generated and returned. Metrics will not be evaluated + :param random_seed: int + Random seed for python's random module. If set to None, the seed will not be set. + :param numpy_random_seed: int + Random seed for numpy. If set to None, the seed will not be set. + :param torch_random_seed: int + Random seed for torch. If set to None, the seed will not be set. + :param fewshot_random_seed: int + Random seed for fewshot sampler random generator. If set to None, the seed of generator will be set to None. + + :return + Dictionary of results + """ + eval_logger.setLevel(getattr(logging, f"{verbosity}")) + start_date = time.time() + + if delete_requests_cache: + eval_logger.info("Deleting requests cache...") + delete_cache() + + seed_message = [] + if random_seed is not None: + # See https://github.com/EleutherAI/lm-evaluation-harness/pull/1412 + seed_message.append(f"Setting random seed to {random_seed}") + random.seed(random_seed) + + if numpy_random_seed is not None: + seed_message.append(f"Setting numpy seed to {numpy_random_seed}") + np.random.seed(numpy_random_seed) + + if torch_random_seed is not None: + seed_message.append(f"Setting torch manual seed to {torch_random_seed}") + torch.manual_seed(torch_random_seed) + + if seed_message: + eval_logger.info(" | ".join(seed_message)) + + if tasks is None: + tasks = [] + if len(tasks) == 0: + raise ValueError( + "No tasks specified, or no tasks found. Please verify the task names." + ) + + if gen_kwargs is not None: + gen_kwargs = simple_parse_args_string(gen_kwargs) + eval_logger.warning( + "generation_kwargs specified through cli, these settings will update set parameters in yaml tasks. " + "Ensure 'do_sample=True' for non-greedy decoding!" + ) + if gen_kwargs == "": + gen_kwargs = None + + if isinstance(model, str): + if model_args is None: + eval_logger.warning("model_args not specified. Using defaults.") + model_args = "" + + if isinstance(model_args, dict): + eval_logger.info( + f"Initializing {model} model, with arguments: {model_args}" + ) + lm = lm_eval.api.registry.get_model(model).create_from_arg_obj( + model_args, + { + "batch_size": batch_size, + "max_batch_size": max_batch_size, + "device": device, + }, + ) + + else: + eval_logger.info( + f"Initializing {model} model, with arguments: {simple_parse_args_string(model_args)}" + ) + lm = lm_eval.api.registry.get_model(model).create_from_arg_string( + model_args, + { + "batch_size": batch_size, + "max_batch_size": max_batch_size, + "device": device, + }, + ) + else: + if not isinstance(model, lm_eval.api.model.LM): + raise TypeError( + f"The value of `model` passed to simple_evaluate() was of type {type(model)}, but is required to be a subclass of lm_eval.api.model.LM . This may be because you are passing an initialized Hugging Face PreTrainedModel without having wrapped it in `lm_eval.models.huggingface.HFLM(pretrained=my_model)` first." + ) + eval_logger.info("Using pre-initialized model") + lm = model + + if use_cache is not None: + eval_logger.info(f"Using cache at {use_cache + '_rank' + str(lm.rank) + '.db'}") + lm = lm_eval.api.model.CachingLM( + lm, + use_cache + # each rank receives a different cache db. + # necessary to avoid multiple writes to cache at once + + "_rank" + + str(lm.rank) + + ".db", + ) + + if task_manager is None: + task_manager = TaskManager(verbosity) + + task_dict = get_task_dict(tasks, task_manager) + + # helper function to recursively apply config overrides to leaf subtasks, skipping their constituent groups. + # (setting of num_fewshot ; bypassing metric calculation ; setting fewshot seed) + def _adjust_config(task_dict): + adjusted_task_dict = {} + for task_name, task_obj in task_dict.items(): + if isinstance(task_obj, dict): + adjusted_task_dict = { + **adjusted_task_dict, + **{task_name: _adjust_config(task_obj)}, + } + + else: + if task_obj.get_config("output_type") == "generate_until": + if gen_kwargs is not None: + task_obj.set_config( + key="generation_kwargs", value=gen_kwargs, update=True + ) + + if predict_only: + eval_logger.info( + f"Processing {task_name} in output-only mode. Metrics will not be calculated!" + ) + # we have to change the class properties post-hoc. This is pretty hacky. + task_obj.override_metric(metric_name="bypass") + + # override tasks' fewshot values to the provided num_fewshot arg value + # except if tasks have it set to 0 manually in their configs--then we should never overwrite that + if num_fewshot is not None: + if (default_num_fewshot := task_obj.get_config("num_fewshot")) == 0: + eval_logger.info( + f"num_fewshot has been set to 0 for {task_name} in its config. Manual configuration will be ignored." + ) + else: + eval_logger.warning( + f"Overwriting default num_fewshot of {task_name} from {default_num_fewshot} to {num_fewshot}" + ) + task_obj.set_config(key="num_fewshot", value=num_fewshot) + else: + # if num_fewshot not provided, and the task does not define a default one, default to 0 + if ( + default_num_fewshot := task_obj.get_config("num_fewshot") + ) is None: + task_obj.set_config(key="num_fewshot", value=0) + # fewshot_random_seed set for tasks, even with a default num_fewshot (e.g. in the YAML file) + task_obj.set_fewshot_seed(seed=fewshot_random_seed) + eval_logger.info( + f"Setting fewshot random generator seed to {fewshot_random_seed}" + ) + + adjusted_task_dict[task_name] = task_obj + + return adjusted_task_dict + + task_dict = _adjust_config(task_dict) + + if check_integrity: + run_task_tests(task_list=tasks) + + if evaluation_tracker is not None: + evaluation_tracker.general_config_tracker.log_experiment_args( + model_source=model, + model_args=model_args, + system_instruction=system_instruction, + chat_template=lm.chat_template(apply_chat_template), + fewshot_as_multiturn=fewshot_as_multiturn, + ) + + results = evaluate( + lm=lm, + task_dict=task_dict, + limit=limit, + cache_requests=cache_requests, + rewrite_requests_cache=rewrite_requests_cache, + bootstrap_iters=bootstrap_iters, + write_out=write_out, + log_samples=True if predict_only else log_samples, + system_instruction=system_instruction, + apply_chat_template=apply_chat_template, + fewshot_as_multiturn=fewshot_as_multiturn, + verbosity=verbosity, + ) + + if lm.rank == 0: + if isinstance(model, str): + model_name = model + elif hasattr(model, "config") and hasattr(model.config, "_name_or_path"): + model_name = model.config._name_or_path + else: + model_name = type(model).__name__ + + # add info about the model and few shot config + results["config"] = { + "model": model_name, + "model_args": model_args, + } + # add more detailed model info if available + if isinstance(lm, lm_eval.models.huggingface.HFLM): + results["config"].update(lm.get_model_info()) + # add info about execution + results["config"].update( + { + "batch_size": batch_size, + "batch_sizes": ( + list(lm.batch_sizes.values()) if hasattr(lm, "batch_sizes") else [] + ), + "device": device, + "use_cache": use_cache, + "limit": limit, + "bootstrap_iters": bootstrap_iters, + "gen_kwargs": gen_kwargs, + "random_seed": random_seed, + "numpy_seed": numpy_random_seed, + "torch_seed": torch_random_seed, + "fewshot_seed": fewshot_random_seed, + } + ) + results["git_hash"] = get_git_commit_hash() + results["date"] = start_date + add_env_info(results) # additional environment info to results + add_tokenizer_info(results, lm) # additional info about tokenizer + return results + else: + return None + + +@positional_deprecated +def evaluate( + lm: "LM", + task_dict, + limit: Optional[int] = None, + cache_requests: bool = False, + rewrite_requests_cache: bool = False, + bootstrap_iters: Optional[int] = 100000, + write_out: bool = False, + log_samples: bool = True, + system_instruction: Optional[str] = None, + apply_chat_template: Union[bool, str] = False, + fewshot_as_multiturn: bool = False, + verbosity: str = "INFO", +): + """Instantiate and evaluate a model on a list of tasks. + + :param lm: obj + Language Model + :param task_dict: dict[str, Task] + Dictionary of tasks. Tasks will be taken to have name type(task).config.task . + :param limit: int, optional + Limit the number of examples per task (only use this for testing) + :param bootstrap_iters: + Number of iterations for bootstrap statistics, used when calculating stderr. Set to 0 for skipping all stderr calculations. + :param write_out: bool + If True, write out an example document and model input for checking task integrity + :param log_samples: bool + If True, write out all model outputs and documents for per-sample measurement and post-hoc analysis + :param system_instruction: str + System instruction to be applied to the prompt + :param apply_chat_template: Union[bool, str] + Specifies whether to apply a chat template to the prompt. + - If set to True, the default chat template is applied. + - If set to a string, applies the specified chat template by name. + Defaults to False (no chat template applied). + :param fewshot_as_multiturn: bool + Whether to provide the fewshot examples as a multiturn conversation or a single user turn. + :return + Dictionary of results + """ + + eval_logger.setLevel(getattr(logging, f"{verbosity}")) + + # tracks all Instances/requests a model must generate output on. + requests = defaultdict(list) + # stores the amount to pad out reqs per req. type so that + # number of fwd passes per distributed rank is equal + padding_requests = defaultdict(int) + + # get lists of group hierarchy and each type of request + eval_tasks = get_task_list(task_dict) + if not log_samples: + if not all( + "bypass" not in getattr(task_output.task, "_metric_fn_list", {}).keys() + for task_output in eval_tasks + ): + raise ValueError("log_samples must be True for 'bypass' metric-only tasks") + for task_output in eval_tasks: + task: Task = task_output.task + limit = get_sample_size(task, limit) + task.build_all_requests( + limit=limit, + rank=lm.rank, + world_size=lm.world_size, + cache_requests=cache_requests, + rewrite_requests_cache=rewrite_requests_cache, + system_instruction=system_instruction, + apply_chat_template=bool(apply_chat_template), + fewshot_as_multiturn=fewshot_as_multiturn, + chat_template=getattr(lm, "apply_chat_template") + if apply_chat_template + else None, + tokenizer_name=getattr(lm, "tokenizer_name", "") + if apply_chat_template + else "", + ) + eval_logger.debug( + f"Task: {task_output.task_name}; number of requests on this rank: {len(task.instances)}" + ) + if write_out: + print_writeout(task) + # aggregate Instances by LM method requested to get output. + for instance in task.instances: + reqtype = instance.request_type + requests[reqtype].append(instance) + + if lm.world_size > 1: + instances_rnk = torch.tensor(len(task._instances), device=lm.device) + gathered_item = ( + lm.accelerator.gather(instances_rnk).cpu().detach().numpy().tolist() + ) + # "multiple_choice" task types dispatch (several) "loglikelihood" request types + reqtype = ( + "loglikelihood" + if task.OUTPUT_TYPE == "multiple_choice" + else task.OUTPUT_TYPE + ) + # compute number of pseudo-batches to pad with (FSDP/DDP require even batches among ranks) + numpad = max(gathered_item) - gathered_item[lm.rank] + # todo: may not account for padding in cases like SquadV2 which has multiple req types + padding_requests[reqtype] += numpad + + ### Run LM on inputs, get all outputs ### + # execute each type of request + for reqtype, reqs in requests.items(): + eval_logger.info(f"Running {reqtype} requests") + # create `K` copies of each request `req` based off `K = req.repeats` + cloned_reqs = [] + for req in reqs: + cloned_reqs.extend([req] * req.repeats) + + if (lm.world_size > 1) and (padding_requests[reqtype] > 0): + for _ in range(padding_requests[reqtype]): + cloned_reqs.extend([req] * req.repeats) + + # run requests through model + resps = getattr(lm, reqtype)(cloned_reqs) + + # put responses from model into a list of length K for each request. + for x, req in zip(resps, cloned_reqs): + req.resps.append(x) + + if lm.world_size > 1: + lm.accelerator.wait_for_everyone() + + RANK = lm.rank + WORLD_SIZE = lm.world_size + ### Postprocess outputs ### + # TODO: del model here, maybe (idea: allow user to specify device of e.g. reward model separately) + for task_output in eval_tasks: + task = task_output.task + task.apply_filters() + + ### Collect values of metrics on all datapoints ### + # # unpack results and sort back in order and return control to Task + # TODO: make it possible to use a different metric per filter + # Pre-process task.instances to group by doc_id + instances_by_doc_id = defaultdict(list) + for instance in task.instances: + instances_by_doc_id[instance.doc_id].append(instance) + # Sort instances within each group + for instances in instances_by_doc_id.values(): + instances.sort(key=lambda x: x.idx) + # iterate over different filters used + for filter_key in task.instances[0].filtered_resps.keys(): + doc_iterator = task.doc_iterator( + rank=RANK, limit=limit, world_size=WORLD_SIZE + ) + for doc_id, doc in doc_iterator: + requests = instances_by_doc_id[doc_id] + metrics = task.process_results( + doc, [req.filtered_resps[filter_key] for req in requests] + ) + if log_samples: + target = task.doc_to_target(doc) + example = { + "doc_id": doc_id, + "doc": doc, + "target": target, + "arguments": [req.args for req in requests], + "resps": [req.resps for req in requests], + "filtered_resps": [ + req.filtered_resps[filter_key] for req in requests + ], + "doc_hash": hash_string( + json.dumps( + requests[0].doc, + indent=2, + default=handle_non_serializable, + ensure_ascii=False, + ) + ), + "prompt_hash": hash_string(requests[0].arguments[0]), + "target_hash": hash_string(str(target)), + } + example.update(metrics) + task_output.logged_samples.append(example) + for metric, value in metrics.items(): + task_output.sample_metrics[(metric, filter_key)].append(value) + + if WORLD_SIZE > 1: + # if multigpu, then gather data across all ranks to rank 0 + # first gather logged samples across all ranks + for task_output in eval_tasks: + if log_samples: + # for task_name, task_samples in list(samples.items()): + full_samples = [None] * WORLD_SIZE if RANK == 0 else None + torch.distributed.gather_object( + obj=task_output.logged_samples, + object_gather_list=full_samples, + dst=0, + ) + + if RANK == 0: + task_output.logged_samples = list( + itertools.chain.from_iterable(full_samples) + ) + + # then collect metrics across all ranks + for metrics in task_output.sample_metrics: + metric_list = [None] * WORLD_SIZE if RANK == 0 else None + torch.distributed.gather_object( + obj=task_output.sample_metrics[metrics], + object_gather_list=metric_list, + dst=0, + ) + if RANK == 0: + task_output.sample_metrics[metrics] = list( + itertools.chain.from_iterable(metric_list) + ) + + if RANK == 0: + ### Aggregate results over all datapoints ### + # aggregate results ; run bootstrap CIs + for task_output in eval_tasks: + task_output.calculate_aggregate_metric(bootstrap_iters=bootstrap_iters) + ( + results, + samples, + configs, + versions, + num_fewshot, + higher_is_better, + ) = consolidate_results(eval_tasks) + + ### Calculate group metrics ### + if bool(results): + results, versions, show_group_table, *_ = consolidate_group_results( + results, versions, task_dict + ) + + results_agg, group_agg = prepare_print_tasks(task_dict, results) + subtask_list = get_subtask_list(task_dict) + + # collect all higher_is_better values for metrics + # in the group's subtasks. + # TODO: clean this up ; unify with the below metric_list loop? + _higher_is_better = {} + for group, task_list in subtask_list.items(): + if ( + len(task_list) != 0 + ): # subtask list will list "task_name": [] for solo tasks + for task in task_list: + for m, h in higher_is_better[task].items(): + if m not in _higher_is_better.keys(): + _higher_is_better[m] = h + + if ( + m in _higher_is_better + and _higher_is_better[m] is not None + and _higher_is_better[m] != h + ): + eval_logger.warning( + f"Higher_is_better values for metric {m} in group {group} are not consistent. Defaulting to None." + ) + _higher_is_better[m] = None + higher_is_better[group] = _higher_is_better + + results_dict = { + "results": dict(results_agg.items()), + **( + {"groups": dict(group_agg.items())} + if (bool(group_agg) & show_group_table) + else {} + ), + "group_subtasks": dict(reversed(subtask_list.items())), + "configs": dict(sorted(configs.items())), + "versions": dict(sorted(versions.items())), + "n-shot": dict(sorted(num_fewshot.items())), + "higher_is_better": dict(sorted(higher_is_better.items())), + "n-samples": { + task_output.task_name: { + "original": len(task_output.task.eval_docs), + "effective": min( + limit if limit else len(task_output.task.eval_docs), + len(task_output.task.eval_docs), + ), + } + for task_output in eval_tasks + }, + } + if log_samples: + results_dict["samples"] = dict(samples) + + return results_dict + + else: + return None + + +def request_caching_arg_to_dict(cache_requests: str) -> dict: + request_caching_args = { + "cache_requests": cache_requests in {"true", "refresh"}, + "rewrite_requests_cache": cache_requests == "refresh", + "delete_requests_cache": cache_requests == "delete", + } + + return request_caching_args diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/evaluator_utils.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/evaluator_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..d5a08326014279335521dcd1f5f70c1fe12c5003 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/evaluator_utils.py @@ -0,0 +1,544 @@ +import collections +import math +import pathlib +import sys +from typing import List, Optional, Tuple, Union + +from lm_eval.api.group import ConfigurableGroup +from lm_eval.api.metrics import ( + aggregate_subtask_metrics, + pooled_sample_stderr, + stderr_for_metric, +) +from lm_eval.api.task import Task +from lm_eval.utils import eval_logger, positional_deprecated + + +class TaskOutput: + """ + Wrapper class for Task outputs.It contains various attributes and methods to manage and calculate metrics for the task. + + Attributes: + task (object): The task object. + task_name (str): The name of the task. + task_config (dict): The configuration of the task. + version (str): The version of the task. + group_name (str): The name of the task group. + n_shot (int): The number of shots for the task. + task_alias (str): The alias of the task. + group_alias (str): The alias of the task group. + is_group (bool): Indicates if the task is a group. + logged_samples (list): The list of logged samples. + sample_len (int): The length of the samples. + sample_metrics (defaultdict): The dictionary of samples' metrics. + agg_metrics (defaultdict): The dictionary of aggregate metrics. + + Methods: + from_taskdict(cls, task_name: str, task): + Creates a TaskOutput instance from a task dictionary. + + calculate_aggregate_metric(bootstrap_iters=100000) -> None: + Calculates the aggregate metrics for the task. + """ + + def __init__( + self, + task=None, + task_name=None, + task_config=None, + version=None, + group_name=None, + n_shot=None, + task_alias=None, + group_alias=None, + is_group=None, + ): + self.task = task + self.task_config = task_config + self.task_name = task_name + self.group_name = group_name + self.version = version + self.n_shot = n_shot + self.task_alias = task_alias + self.group_alias = group_alias + self.is_group = is_group + self.logged_samples = [] + self.sample_len = None + self.sample_metrics = collections.defaultdict(list) + self.agg_metrics = collections.defaultdict(list) + + @classmethod + def from_taskdict(cls, task_name: str, task): + if isinstance(task, tuple): + group_name, task = task + else: + group_name = None + if not task: + # these gets filtered out in get_task_list + # once they are added to group hierarchy + is_group = True + return cls( + task=task, task_name=task_name, is_group=is_group, group_name=group_name + ) + version = task.VERSION + task_config = dict(task.dump_config()) + if (n_shot := task_config.get("num_fewshot")) == 0: + n_shot = task_config.get("metadata", {}).get("num_fewshot", 0) + task_alias = task_config.get("alias") + group_alias = task_config.get("group_alias") + return cls( + task=task, + task_name=task_name, + task_config=task_config, + group_name=group_name, + version=version, + n_shot=n_shot, + task_alias=task_alias, + group_alias=group_alias, + ) + + def calculate_aggregate_metric(self, bootstrap_iters=100000) -> None: + for (metric, filter_key), items in self.sample_metrics.items(): + agg_fn = self.task.aggregation()[metric] + metric_key = f"{metric},{filter_key}" + self.agg_metrics[metric_key] = agg_fn(items) + self.sample_len = len(items) # TODO: same sample size for each metric? + if isinstance(bootstrap_iters, int): + stderr_fn = stderr_for_metric( + metric=agg_fn, + bootstrap_iters=min(bootstrap_iters, 100) + if metric in ["bleu", "chrf", "ter"] + else bootstrap_iters, + ) + self.agg_metrics[f"{metric}_stderr,{filter_key}"] = ( + stderr_fn(items) if (stderr_fn and len(items) > 1) else "N/A" + ) + else: + raise ValueError( + f"Received bootstrap_iters '{bootstrap_iters}' but expected an integer. Set to 0 to turn off stderr calculations." + ) + + def __repr__(self): + return ( + f"TaskOutput(task_name={self.task_name}, " + f"group_name={self.group_name}, " + f"version={self.version}, " + f"n_shot={self.n_shot}, " + f"task_alias={self.task_alias}, " + f"group_alias={self.group_alias})" + ) + + +def get_task_list(task_dict: dict) -> List[TaskOutput]: + outputs = [] + for task_name, task_obj in task_dict.items(): + if isinstance(task_obj, dict): + _outputs = get_task_list(task_obj) + outputs.extend(_outputs) + else: + task_output = TaskOutput.from_taskdict(task_name, task_obj) + outputs.append(task_output) + + return outputs + + +def get_subtask_list(task_dict, task_root=None, depth=0): + subtask_list = {} + for group_obj, task_obj in task_dict.items(): + if isinstance(group_obj, ConfigurableGroup): + # group_name = group_obj.group_name + group_name = group_obj.group_name + else: + group_name = group_obj + if isinstance(task_obj, dict): + _subtask_list = get_subtask_list( + task_obj, task_root=group_name, depth=depth + 1 + ) + if task_root: + subtask_list.setdefault((task_root, depth), []).extend( + [ + _task + for (_task, _depth) in _subtask_list.keys() + if (_depth - 1) == depth + ] + ) + + subtask_list = {**subtask_list, **_subtask_list} + else: + if isinstance(task_obj, ConfigurableGroup): + # group_or_task_name = task_obj.group_name + group_or_task_name = task_obj.group_name + elif isinstance(task_obj, Task): + # group_or_task_name = task_obj.task_name + group_or_task_name = task_obj.task_name + + if task_root is None: + subtask_list.setdefault((group_or_task_name, depth), []) + else: + subtask_list.setdefault((task_root, depth), []).append( + group_or_task_name + ) + + if depth == 0: + _subtask_list = {} + for group_key, task_list in subtask_list.items(): + group_name, depth = group_key + _subtask_list[group_name] = task_list + subtask_list = _subtask_list + + return subtask_list + + +def print_writeout(task) -> None: + for inst in task.instances: + # print the prompt for the first few documents + if inst.doc_id < 1: + eval_logger.info( + f"Task: {task}; document {inst.doc_id}; context prompt (starting on next line):\ + \n{inst.args[0]}\n(end of prompt on previous line)\ntarget string or answer choice index (starting on next line):\n{task.doc_to_target(inst.doc)}\n(end of target on previous line)" + ) + eval_logger.info(f"Request: {str(inst)}") + + +def get_sample_size(task, limit: Optional[int]) -> Union[int, None]: + if limit is not None: + limit = ( + int(math.ceil(len(task.eval_docs) * limit)) if limit < 1.0 else int(limit) + ) + return limit + + +def prepare_print_tasks( + task_dict: dict, + results: dict, + task_depth=0, + group_depth=0, +) -> Tuple[dict, dict]: + """ + @param task_dict: Dictionary representing the group hierarchy of tasks. Each key is a group name and its + value is a list of task names. + @param results: Dictionary containing the results of each task. Each key is a + group name and its value is a dictionary of task results. + @param task_depth: The indentation level for printing the task + hierarchy. Default is 0. + @param group_depth: The indentation level for printing the group + hierarchy. Default is 0. + @return: A tuple of two dictionaries: results_agg and groups_agg. results_agg contains + aggregated results for each task, and groups_agg contains aggregated results for each group. + + Prepares the task hierarchy and aggregates the results for each task and group recursively for printing. + """ + + def _sort_task_dict(task_dict): + """ + Helper utility. Sorts the task dict at the current level of the hierarchy based on alphabetized task name. + Required so that we end up sorting within each sub-header correctly. + """ + + return dict( + sorted( + task_dict.items(), + key=lambda item: item[0].group_name + if isinstance(item[0], ConfigurableGroup) + else item[0], + ) + ) + + task_agg = collections.defaultdict(dict) + group_agg = collections.defaultdict(dict) + task_dict = _sort_task_dict(task_dict) + for task_or_group_name, task_or_group_obj in task_dict.items(): + tab_string = " " * task_depth + "- " if task_depth > 0 else "" + if isinstance(task_or_group_name, ConfigurableGroup): + # string_name = task_or_group_name.group_name + name = task_or_group_name.group_name + from_configurable_group = True + task_or_group_obj = _sort_task_dict(task_or_group_obj) + elif isinstance(task_or_group_name, str): + name = task_or_group_name + if isinstance(task_or_group_obj, Task): + # string_name = task_or_group_obj.task_name + name = task_or_group_obj.task_name + from_configurable_group = False + + task_agg[name] = results[name].copy() + if from_configurable_group: + if task_or_group_name.group_alias is not None: + alias = task_or_group_name.group_alias + else: + alias = task_or_group_name.group + else: + if "alias" in task_agg[name]: + alias = task_agg[name]["alias"] + else: + alias = name + + task_agg[name]["alias"] = tab_string + alias + if "samples" in task_agg[name]: + task_agg[name].pop("samples") + + if from_configurable_group and (" " not in results[name]): + group_tab_string = " " * group_depth + "- " if group_depth > 0 else "" + group_agg[name] = results[name].copy() + group_agg[name]["alias"] = group_tab_string + alias + if "samples" in group_agg[name]: + group_agg[name].pop("samples") + + if isinstance(task_or_group_obj, dict): + task_depth += 1 + group_depth += 1 + _task_agg, _group_agg = prepare_print_tasks( + task_or_group_obj, results, task_depth, group_depth + ) + task_agg = { + **task_agg, + **_task_agg, + } + group_agg = {**group_agg, **_group_agg} + task_depth -= 1 + group_depth -= 1 + return task_agg, group_agg + + +def consolidate_results( + eval_tasks: List[TaskOutput], +) -> Tuple[dict, dict, dict, dict, dict, dict]: + """ + @param eval_tasks: list(TaskOutput). + @return: A tuple containing the consolidated results, samples, configs, versions, and num_fewshot. + + Consolidates the results of multiple evaluation tasks into a single structure. + + The method iterates over each evaluation instance and extracts relevant information to create the consolidated + results structure. The consolidated results structure has the following properties: + + - results: A defaultdict with task names as keys and dictionaries as values. Each dictionary contains + metric/filter pairs as keys and corresponding metric values as values. The "alias" key is used to store task + aliases specified in the task configuration. + - samples: A defaultdict with task names as keys and lists of log samples as values. + - configs: A defaultdict with task names as keys and task configurations as values. + - versions: A defaultdict with task names as keys and task versions as values. + - num_fewshot: A defaultdict with task names as keys and number of few-shot samples as values. + - higher_is_better: A defaultdict with task names as keys and indicators of whether higher values are better + for each metric as values. + + The method then returns the consolidated results, samples, configs, versions, and num_fewshot as a tuple. + """ + # stores the final result for each task, for each metric/filter pair. + results = collections.defaultdict(dict) + # logs info about each document evaluated. + samples = collections.defaultdict(list) + # store num-fewshot value per task + num_fewshot = collections.defaultdict(int) + # Tracks the YAML configs of all chosen task + configs = collections.defaultdict(dict) + # Tracks each task's version. + versions = collections.defaultdict(dict) + # Track `higher_is_better` for each metric + higher_is_better = collections.defaultdict(dict) + + for task_output in eval_tasks: + if "task_alias" in (task_config := task_output.task_config): + results[task_output.task_name]["alias"] = task_config["task_alias"] + else: + results[task_output.task_name]["alias"] = task_output.task_name + if group_alias := task_output.group_alias: + if group_alias not in results and (group_name := task_output.group_name): + results[group_name]["alias"] = group_alias + num_fewshot[task_output.task_name] = task_output.n_shot + configs[task_output.task_name] = task_output.task_config + versions[task_output.task_name] = task_output.version + samples[task_output.task_name] = task_output.logged_samples + higher_is_better[task_output.task_name] = task_output.task.higher_is_better() + for (metric, filter_key), items in task_output.sample_metrics.items(): + metric_key = f"{metric},{filter_key}" + results[task_output.task_name][metric_key] = task_output.agg_metrics[ + metric_key + ] + results[task_output.task_name]["samples"] = task_output.sample_len + results[task_output.task_name][f"{metric}_stderr,{filter_key}"] = ( + task_output.agg_metrics[f"{metric}_stderr,{filter_key}"] + ) + return results, samples, configs, versions, num_fewshot, higher_is_better + + +def consolidate_group_results( + results, + versions, + task_dict, + task_root=None, + show_group_table=False, + task_aggregation_list=None, +) -> Tuple[dict, dict, bool, Union[None,]]: + """ + (Recursively) calculates groups' aggregated metrics and updates the results and versions dictionaries with this info. + + @return: a tuple [results, versions, show_group_table, task_aggregation_list] with formats described below: + + - results: A defaultdict with task names (and, after this function is called, group names of + groups that perform aggregation) as keys, and dictionaries with "alias" and metric,filter_name pairs as keys. + - versions: A defaultdict with task names (and, after this function is called, group names of + groups that perform aggregation) as keys, and float values representing the task or group's version if a version is specified. (defaulting to None). + - show_group_table: a boolean which is true if there exists a group that requires printing of its aggregated scores in a group table. + - task_aggregation_list: a defaultdict listing the subtasks to average over to produce a given group's end metric. + + The method then returns the updated results, versions, show_group_table, and task_aggregation_list as a tuple. + In the top-level invocation of this function, task_aggregation_list is ignored. + """ + if task_root is None: + task_root = {} + + if task_aggregation_list is None: + task_aggregation_list = {} + + for group_or_task, group_or_task_info in task_dict.items(): + # Convert to string + if isinstance(group_or_task, ConfigurableGroup): + group_config = group_or_task.config + group_or_task = group_or_task.group_name + else: + group_config = None + + if isinstance(group_or_task_info, Task): + if task_root: + task_aggregation_list.setdefault(task_root, []).append( + group_or_task_info.task_name + ) + else: + ( + results, + versions, + show_group_table, + _task_aggregation_list, + ) = consolidate_group_results( + results, + versions, + group_or_task_info, + group_or_task, + show_group_table, + task_aggregation_list, + ) + if task_root: + task_aggregation_list.setdefault(task_root, []).extend( + task_aggregation_list.get(group_or_task, []) + ) + + if (group_config is None) or ( + group_config["aggregate_metric_list"] is None + ): + results[group_or_task][" "] = " " + continue + + if "aggregate_metric_list" in group_config: + agg_metric_list = group_config["aggregate_metric_list"] + + show_group_table = show_group_table | bool( + group_config["aggregate_metric_list"] + ) + + task_list = _task_aggregation_list[group_or_task] + + metric_list = list( + { + key + for task in task_list + for key in results[task].keys() + if "_stderr" not in key and key not in ["task", "alias", "samples"] + } + ) + for metric in metric_list: + stderr = "_stderr,".join(metric.split(",")) + + # gather metrics, sizes, and stderrs from subtasks + metrics = [ + results[task][metric] + for task in task_list + if metric in results[task] + ] # TODO: copy? + stderrs = [ + results[task][stderr] + for task in task_list + if stderr in results[task] + ] + sizes = [ + results[task]["samples"] + for task in task_list + if metric in results[task] + ] + + for metric_config in agg_metric_list: + for filter_name in metric_config["filter_list"]: + if metric != ",".join([metric_config["metric"], filter_name]): + continue + + # compute group's pooled metric and stderr + if metric_config["aggregation"] == "mean": + aggregate_fn = aggregate_subtask_metrics + elif callable(metric_config["aggregation"]): + aggregate_fn = metric_config["aggregation"] + else: + raise ValueError( + f"Currently, only 'mean' is supported for automatically aggregating scores across groups' subtasks. Got '{metric_config['aggregation']}' for group '{group_or_task}'" + ) + + results[group_or_task][metric] = aggregate_fn( + metrics, + sizes, + metric_config["weight_by_size"], + ) + # TODO: calculate groups' metrics using arbitrary agg fns + if "N/A" in stderrs: + results[group_or_task][stderr] = "N/A" + else: + # NOTE: this assumes we are using the mean to aggregate. There are warnings about this elsewhere + results[group_or_task][stderr] = pooled_sample_stderr( + stderrs, sizes + ) + + results[group_or_task]["samples"] = sum(sizes) + group_metadata = group_config.get("metadata", None) + if group_metadata is not None: + versions[group_or_task] = group_metadata.get("version", None) + # print(results) + return results, versions, show_group_table, task_aggregation_list + + +@positional_deprecated +def find_test_root(start_path: pathlib.Path) -> pathlib.Path: + """ + Search upward in the directory tree to a maximum of three layers + to find and return the package root (containing the 'tests' folder) + """ + cur_path = start_path.resolve() + max_layers = 3 + for _ in range(max_layers): + if (cur_path / "tests" / "test_version_stable.py").exists(): + return cur_path + else: + cur_path = cur_path.parent.resolve() + raise FileNotFoundError( + f"Unable to find package root within {max_layers} upwards" + f"of {start_path}" + ) + + +@positional_deprecated +def run_task_tests(task_list: List[str]): + """ + Find the package root and run the tests for the given tasks + """ + import pytest + + package_root = find_test_root(start_path=pathlib.Path(__file__)) + task_string = " or ".join(task_list) + args = [ + f"{package_root}/tests/test_version_stable.py", + f"--rootdir={package_root}", + "-k", + f"{task_string}", + ] + sys.path.append(str(package_root)) + pytest_return_val = pytest.main(args) + if pytest_return_val: + raise ValueError( + f"Not all tests for the specified tasks ({task_list}) ran successfully! Error code: {pytest_return_val}" + ) diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/loggers/__init__.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/loggers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..02b7a6834c6486fde35ef02d715e90be3fba223a --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/loggers/__init__.py @@ -0,0 +1,2 @@ +from .evaluation_tracker import EvaluationTracker +from .wandb_logger import WandbLogger diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/loggers/evaluation_tracker.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/loggers/evaluation_tracker.py new file mode 100644 index 0000000000000000000000000000000000000000..067b047b599fac2a0045f3a32e42b6ecec0afcaf --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/loggers/evaluation_tracker.py @@ -0,0 +1,521 @@ +import json +import os +import re +import time +from collections import defaultdict +from dataclasses import asdict, dataclass +from datetime import datetime +from pathlib import Path + +from datasets import load_dataset +from datasets.utils.metadata import MetadataConfigs +from huggingface_hub import ( + DatasetCard, + DatasetCardData, + HfApi, + hf_hub_url, +) +from huggingface_hub.utils import build_hf_headers, get_session, hf_raise_for_status + +from lm_eval.utils import ( + eval_logger, + get_file_datetime, + get_file_task_name, + get_results_filenames, + get_sample_results_filenames, + handle_non_serializable, + hash_string, + sanitize_list, + sanitize_model_name, + sanitize_task_name, +) + + +@dataclass(init=False) +class GeneralConfigTracker: + """ + Tracker for the evaluation parameters. + + Attributes: + model_source (str): Source of the model (e.g. Hugging Face, GGUF, etc.) + model_name (str): Name of the model. + model_name_sanitized (str): Sanitized model name for directory creation. + start_time (float): Start time of the experiment. Logged at class init. + end_time (float): Start time of the experiment. Logged when calling [`GeneralConfigTracker.log_end_time`] + total_evaluation_time_seconds (str): Inferred total evaluation time in seconds (from the start and end times). + """ + + model_source: str = None + model_name: str = None + model_name_sanitized: str = None + system_instruction: str = None + system_instruction_sha: str = None + fewshot_as_multiturn: bool = None + chat_template: str = None + chat_template_sha: str = None + start_time: float = None + end_time: float = None + total_evaluation_time_seconds: str = None + + def __init__(self) -> None: + """Starts the evaluation timer.""" + self.start_time = time.perf_counter() + + @staticmethod + def _get_model_name(model_args: str) -> str: + """Extracts the model name from the model arguments.""" + + def extract_model_name(model_args: str, key: str) -> str: + """Extracts the model name from the model arguments using a key.""" + args_after_key = model_args.split(key)[1] + return args_after_key.split(",")[0] + + # order does matter, e.g. peft and delta are provided together with pretrained + prefixes = ["peft=", "delta=", "pretrained=", "model=", "path=", "engine="] + for prefix in prefixes: + if prefix in model_args: + return extract_model_name(model_args, prefix) + return "" + + def log_experiment_args( + self, + model_source: str, + model_args: str, + system_instruction: str, + chat_template: str, + fewshot_as_multiturn: bool, + ) -> None: + """Logs model parameters and job ID.""" + self.model_source = model_source + self.model_name = GeneralConfigTracker._get_model_name(model_args) + self.model_name_sanitized = sanitize_model_name(self.model_name) + self.system_instruction = system_instruction + self.system_instruction_sha = ( + hash_string(system_instruction) if system_instruction else None + ) + self.chat_template = chat_template + self.chat_template_sha = hash_string(chat_template) if chat_template else None + self.fewshot_as_multiturn = fewshot_as_multiturn + + def log_end_time(self) -> None: + """Logs the end time of the evaluation and calculates the total evaluation time.""" + self.end_time = time.perf_counter() + self.total_evaluation_time_seconds = str(self.end_time - self.start_time) + + +class EvaluationTracker: + """ + Keeps track and saves relevant information of the evaluation process. + Compiles the data from trackers and writes it to files, which can be published to the Hugging Face hub if requested. + """ + + def __init__( + self, + output_path: str = None, + hub_results_org: str = "", + hub_repo_name: str = "", + details_repo_name: str = "", + results_repo_name: str = "", + push_results_to_hub: bool = False, + push_samples_to_hub: bool = False, + public_repo: bool = False, + token: str = "", + leaderboard_url: str = "", + point_of_contact: str = "", + gated: bool = False, + ) -> None: + """ + Creates all the necessary loggers for evaluation tracking. + + Args: + output_path (str): Path to save the results. If not provided, the results won't be saved. + hub_results_org (str): The Hugging Face organization to push the results to. If not provided, the results will be pushed to the owner of the Hugging Face token. + hub_repo_name (str): The name of the Hugging Face repository to push the results to. If not provided, the results will be pushed to `lm-eval-results`. + details_repo_name (str): The name of the Hugging Face repository to push the details to. If not provided, the results will be pushed to `lm-eval-results`. + result_repo_name (str): The name of the Hugging Face repository to push the results to. If not provided, the results will not be pushed and will be found in the details_hub_repo. + push_results_to_hub (bool): Whether to push the results to the Hugging Face hub. + push_samples_to_hub (bool): Whether to push the samples to the Hugging Face hub. + public_repo (bool): Whether to push the results to a public or private repository. + token (str): Token to use when pushing to the Hugging Face hub. This token should have write access to `hub_results_org`. + leaderboard_url (str): URL to the leaderboard on the Hugging Face hub on the dataset card. + point_of_contact (str): Contact information on the Hugging Face hub dataset card. + gated (bool): Whether to gate the repository. + """ + self.general_config_tracker = GeneralConfigTracker() + + self.output_path = output_path + self.push_results_to_hub = push_results_to_hub + self.push_samples_to_hub = push_samples_to_hub + self.public_repo = public_repo + self.leaderboard_url = leaderboard_url + self.point_of_contact = point_of_contact + self.api = HfApi(token=token) if token else None + self.gated_repo = gated + + if not self.api and (push_results_to_hub or push_samples_to_hub): + raise ValueError( + "Hugging Face token is not defined, but 'push_results_to_hub' or 'push_samples_to_hub' is set to True. " + "Please provide a valid Hugging Face token by setting the HF_TOKEN environment variable." + ) + + if ( + self.api + and hub_results_org == "" + and (push_results_to_hub or push_samples_to_hub) + ): + hub_results_org = self.api.whoami()["name"] + eval_logger.warning( + f"hub_results_org was not specified. Results will be pushed to '{hub_results_org}'." + ) + + if hub_repo_name == "": + details_repo_name = ( + details_repo_name if details_repo_name != "" else "lm-eval-results" + ) + results_repo_name = ( + results_repo_name if results_repo_name != "" else details_repo_name + ) + else: + details_repo_name = hub_repo_name + results_repo_name = hub_repo_name + eval_logger.warning( + "hub_repo_name was specified. Both details and results will be pushed to the same repository. Using hub_repo_name is no longer recommended, details_repo_name and results_repo_name should be used instead." + ) + + self.details_repo = f"{hub_results_org}/{details_repo_name}" + self.details_repo_private = f"{hub_results_org}/{details_repo_name}-private" + self.results_repo = f"{hub_results_org}/{results_repo_name}" + self.results_repo_private = f"{hub_results_org}/{results_repo_name}-private" + + def save_results_aggregated( + self, + results: dict, + samples: dict, + ) -> None: + """ + Saves the aggregated results and samples to the output path and pushes them to the Hugging Face hub if requested. + + Args: + results (dict): The aggregated results to save. + samples (dict): The samples results to save. + """ + self.general_config_tracker.log_end_time() + + if self.output_path: + try: + eval_logger.info("Saving results aggregated") + + # calculate cumulative hash for each task - only if samples are provided + task_hashes = {} + if samples: + for task_name, task_samples in samples.items(): + sample_hashes = [ + s["doc_hash"] + s["prompt_hash"] + s["target_hash"] + for s in task_samples + ] + task_hashes[task_name] = hash_string("".join(sample_hashes)) + + # update initial results dict + results.update({"task_hashes": task_hashes}) + results.update(asdict(self.general_config_tracker)) + dumped = json.dumps( + results, + indent=2, + default=handle_non_serializable, + ensure_ascii=False, + ) + + path = Path(self.output_path if self.output_path else Path.cwd()) + path = path.joinpath(self.general_config_tracker.model_name_sanitized) + path.mkdir(parents=True, exist_ok=True) + + self.date_id = datetime.now().isoformat().replace(":", "-") + file_results_aggregated = path.joinpath(f"results_{self.date_id}.json") + file_results_aggregated.open("w", encoding="utf-8").write(dumped) + + if self.api and self.push_results_to_hub: + repo_id = ( + self.results_repo + if self.public_repo + else self.results_repo_private + ) + self.api.create_repo( + repo_id=repo_id, + repo_type="dataset", + private=not self.public_repo, + exist_ok=True, + ) + self.api.upload_file( + repo_id=repo_id, + path_or_fileobj=str( + path.joinpath(f"results_{self.date_id}.json") + ), + path_in_repo=os.path.join( + self.general_config_tracker.model_name, + f"results_{self.date_id}.json", + ), + repo_type="dataset", + commit_message=f"Adding aggregated results for {self.general_config_tracker.model_name}", + ) + eval_logger.info( + "Successfully pushed aggregated results to the Hugging Face Hub. " + f"You can find them at: {repo_id}" + ) + + except Exception as e: + eval_logger.warning("Could not save results aggregated") + eval_logger.info(repr(e)) + else: + eval_logger.info( + "Output path not provided, skipping saving results aggregated" + ) + + def save_results_samples( + self, + task_name: str, + samples: dict, + ) -> None: + """ + Saves the samples results to the output path and pushes them to the Hugging Face hub if requested. + + Args: + task_name (str): The task name to save the samples for. + samples (dict): The samples results to save. + """ + if self.output_path: + try: + eval_logger.info(f"Saving per-sample results for: {task_name}") + + path = Path(self.output_path if self.output_path else Path.cwd()) + path = path.joinpath(self.general_config_tracker.model_name_sanitized) + path.mkdir(parents=True, exist_ok=True) + + file_results_samples = path.joinpath( + f"samples_{task_name}_{self.date_id}.jsonl" + ) + + for sample in samples: + # we first need to sanitize arguments and resps + # otherwise we won't be able to load the dataset + # using the datasets library + arguments = {} + for i, arg in enumerate(sample["arguments"]): + arguments[f"gen_args_{i}"] = {} + for j, tmp in enumerate(arg): + arguments[f"gen_args_{i}"][f"arg_{j}"] = tmp + + sample["resps"] = sanitize_list(sample["resps"]) + sample["filtered_resps"] = sanitize_list(sample["filtered_resps"]) + sample["arguments"] = arguments + sample["target"] = str(sample["target"]) + + sample_dump = ( + json.dumps( + sample, + default=handle_non_serializable, + ensure_ascii=False, + ) + + "\n" + ) + + with open(file_results_samples, "a", encoding="utf-8") as f: + f.write(sample_dump) + + if self.api and self.push_samples_to_hub: + repo_id = ( + self.details_repo + if self.public_repo + else self.details_repo_private + ) + self.api.create_repo( + repo_id=repo_id, + repo_type="dataset", + private=not self.public_repo, + exist_ok=True, + ) + try: + if self.gated_repo: + headers = build_hf_headers() + r = get_session().put( + url=f"https://huggingface.co/api/datasets/{repo_id}/settings", + headers=headers, + json={"gated": "auto"}, + ) + hf_raise_for_status(r) + except Exception as e: + eval_logger.warning("Could not gate the repository") + eval_logger.info(repr(e)) + self.api.upload_folder( + repo_id=repo_id, + folder_path=str(path), + path_in_repo=self.general_config_tracker.model_name_sanitized, + repo_type="dataset", + commit_message=f"Adding samples results for {task_name} to {self.general_config_tracker.model_name}", + ) + eval_logger.info( + f"Successfully pushed sample results for task: {task_name} to the Hugging Face Hub. " + f"You can find them at: {repo_id}" + ) + + except Exception as e: + eval_logger.warning("Could not save sample results") + eval_logger.info(repr(e)) + else: + eval_logger.info("Output path not provided, skipping saving sample results") + + def recreate_metadata_card(self) -> None: + """ + Creates a metadata card for the evaluation results dataset and pushes it to the Hugging Face hub. + """ + + eval_logger.info("Recreating metadata card") + repo_id = self.details_repo if self.public_repo else self.details_repo_private + + files_in_repo = self.api.list_repo_files(repo_id=repo_id, repo_type="dataset") + results_files = get_results_filenames(files_in_repo) + sample_files = get_sample_results_filenames(files_in_repo) + + # Build a dictionary to store the latest evaluation datetime for: + # - Each tested model and its aggregated results + # - Each task and sample results, if existing + # i.e. { + # "org__model_name__gsm8k": "2021-09-01T12:00:00", + # "org__model_name__ifeval": "2021-09-01T12:00:00", + # "org__model_name__results": "2021-09-01T12:00:00" + # } + latest_task_results_datetime = defaultdict(lambda: datetime.min.isoformat()) + + for file_path in sample_files: + file_path = Path(file_path) + filename = file_path.name + model_name = file_path.parent + task_name = get_file_task_name(filename) + results_datetime = get_file_datetime(filename) + task_name_sanitized = sanitize_task_name(task_name) + # Results and sample results for the same model and task will have the same datetime + samples_key = f"{model_name}__{task_name_sanitized}" + results_key = f"{model_name}__results" + latest_datetime = max( + latest_task_results_datetime[samples_key], + results_datetime, + ) + latest_task_results_datetime[samples_key] = latest_datetime + latest_task_results_datetime[results_key] = max( + latest_task_results_datetime[results_key], + latest_datetime, + ) + + # Create metadata card + card_metadata = MetadataConfigs() + + # Add the latest aggregated results to the metadata card for easy access + for file_path in results_files: + file_path = Path(file_path) + results_filename = file_path.name + model_name = file_path.parent + eval_date = get_file_datetime(results_filename) + eval_date_sanitized = re.sub(r"[^\w\.]", "_", eval_date) + results_filename = Path("**") / Path(results_filename).name + config_name = f"{model_name}__results" + sanitized_last_eval_date_results = re.sub( + r"[^\w\.]", "_", latest_task_results_datetime[config_name] + ) + + if eval_date_sanitized == sanitized_last_eval_date_results: + # Ensure that all results files are listed in the metadata card + current_results = card_metadata.get(config_name, {"data_files": []}) + current_results["data_files"].append( + {"split": eval_date_sanitized, "path": [str(results_filename)]} + ) + card_metadata[config_name] = current_results + # If the results file is the newest, update the "latest" field in the metadata card + card_metadata[config_name]["data_files"].append( + {"split": "latest", "path": [str(results_filename)]} + ) + + # Add the tasks details configs + for file_path in sample_files: + file_path = Path(file_path) + filename = file_path.name + model_name = file_path.parent + task_name = get_file_task_name(filename) + eval_date = get_file_datetime(filename) + task_name_sanitized = sanitize_task_name(task_name) + eval_date_sanitized = re.sub(r"[^\w\.]", "_", eval_date) + results_filename = Path("**") / Path(filename).name + config_name = f"{model_name}__{task_name_sanitized}" + sanitized_last_eval_date_results = re.sub( + r"[^\w\.]", "_", latest_task_results_datetime[config_name] + ) + if eval_date_sanitized == sanitized_last_eval_date_results: + # Ensure that all sample results files are listed in the metadata card + current_details_for_task = card_metadata.get( + config_name, {"data_files": []} + ) + current_details_for_task["data_files"].append( + {"split": eval_date_sanitized, "path": [str(results_filename)]} + ) + card_metadata[config_name] = current_details_for_task + # If the samples results file is the newest, update the "latest" field in the metadata card + card_metadata[config_name]["data_files"].append( + {"split": "latest", "path": [str(results_filename)]} + ) + + # Get latest results and extract info to update metadata card examples + latest_datetime = max(latest_task_results_datetime.values()) + latest_model_name = max( + latest_task_results_datetime, key=lambda k: latest_task_results_datetime[k] + ) + last_results_file = [ + f for f in results_files if latest_datetime.replace(":", "-") in f + ][0] + last_results_file_path = hf_hub_url( + repo_id=repo_id, filename=last_results_file, repo_type="dataset" + ) + latest_results_file = load_dataset( + "json", data_files=last_results_file_path, split="train" + ) + results_dict = latest_results_file["results"][0] + new_dictionary = {"all": results_dict} + new_dictionary.update(results_dict) + results_string = json.dumps(new_dictionary, indent=4) + + dataset_summary = ( + "Dataset automatically created during the evaluation run of model " + ) + if self.general_config_tracker.model_source == "hf": + dataset_summary += f"[{self.general_config_tracker.model_name}](https://huggingface.co/{self.general_config_tracker.model_name})\n" + else: + dataset_summary += f"{self.general_config_tracker.model_name}\n" + dataset_summary += ( + f"The dataset is composed of {len(card_metadata)-1} configuration(s), each one corresponding to one of the evaluated task.\n\n" + f"The dataset has been created from {len(results_files)} run(s). Each run can be found as a specific split in each " + 'configuration, the split being named using the timestamp of the run.The "train" split is always pointing to the latest results.\n\n' + 'An additional configuration "results" store all the aggregated results of the run.\n\n' + "To load the details from a run, you can for instance do the following:\n" + ) + if self.general_config_tracker.model_source == "hf": + dataset_summary += ( + "```python\nfrom datasets import load_dataset\n" + f'data = load_dataset(\n\t"{repo_id}",\n\tname="{latest_model_name}",\n\tsplit="latest"\n)\n```\n\n' + ) + dataset_summary += ( + "## Latest results\n\n" + f'These are the [latest results from run {latest_datetime}]({last_results_file_path.replace("/resolve/", "/blob/")}) ' + "(note that there might be results for other tasks in the repos if successive evals didn't cover the same tasks. " + 'You find each in the results and the "latest" split for each eval):\n\n' + f"```python\n{results_string}\n```" + ) + card_data = DatasetCardData( + dataset_summary=dataset_summary, + repo_url=f"https://huggingface.co/{self.general_config_tracker.model_name}", + pretty_name=f"Evaluation run of {self.general_config_tracker.model_name}", + leaderboard_url=self.leaderboard_url, + point_of_contact=self.point_of_contact, + ) + card_metadata.to_dataset_card_data(card_data) + card = DatasetCard.from_template( + card_data, + pretty_name=card_data.pretty_name, + ) + card.push_to_hub(repo_id, repo_type="dataset") diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/loggers/utils.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/loggers/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..ded8f820ec8c8658becbcd5e18304158c294e91e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/loggers/utils.py @@ -0,0 +1,143 @@ +import logging +import os +import re +import subprocess +from pathlib import Path +from typing import Any, Dict, Optional, Tuple, Union + +import numpy as np +from torch.utils.collect_env import get_pretty_env_info +from transformers import __version__ as trans_version + + +logger = logging.getLogger(__name__) + + +def remove_none_pattern(input_string: str) -> Tuple[str, bool]: + """Remove the ',none' substring from the input_string if it exists at the end. + + Args: + input_string (str): The input string from which to remove the ',none' substring. + + Returns: + Tuple[str, bool]: A tuple containing the modified input_string with the ',none' substring removed + and a boolean indicating whether the modification was made (True) or not (False). + """ + # Define the pattern to match ',none' at the end of the string + pattern = re.compile(r",none$") + + # Use sub() to replace ',none' with an empty string + result = re.sub(pattern, "", input_string) + + # check if the input_string changed + removed = result != input_string + + return result, removed + + +def _handle_non_serializable(o: Any) -> Union[int, str, list]: + """Handle non-serializable objects by converting them to serializable types. + + Args: + o (Any): The object to be handled. + + Returns: + Union[int, str, list]: The converted object. If the object is of type np.int64 or np.int32, + it will be converted to int. If the object is of type set, it will be converted + to a list. Otherwise, it will be converted to str. + """ + if isinstance(o, np.int64) or isinstance(o, np.int32): + return int(o) + elif isinstance(o, set): + return list(o) + else: + return str(o) + + +def get_commit_from_path(repo_path: Union[Path, str]) -> Optional[str]: + try: + git_folder = Path(repo_path, ".git") + if git_folder.is_file(): + git_folder = Path( + git_folder.parent, + git_folder.read_text(encoding="utf-8").split("\n")[0].split(" ")[-1], + ) + if Path(git_folder, "HEAD").exists(): + head_name = ( + Path(git_folder, "HEAD") + .read_text(encoding="utf-8") + .split("\n")[0] + .split(" ")[-1] + ) + head_ref = Path(git_folder, head_name) + git_hash = head_ref.read_text(encoding="utf-8").replace("\n", "") + else: + git_hash = None + except Exception as err: + logger.debug( + f"Failed to retrieve a Git commit hash from path: {str(repo_path)}. Error: {err}" + ) + return None + return git_hash + + +def get_git_commit_hash(): + """ + Gets the git commit hash of your current repo (if it exists). + Source: https://github.com/EleutherAI/gpt-neox/blob/b608043be541602170bfcfb8ec9bf85e8a0799e0/megatron/neox_arguments/neox_args.py#L42 + """ + try: + git_hash = subprocess.check_output(["git", "describe", "--always"]).strip() + git_hash = git_hash.decode() + except (subprocess.CalledProcessError, FileNotFoundError): + # FileNotFoundError occurs when git not installed on system + git_hash = get_commit_from_path(os.getcwd()) # git hash of repo if exists + return git_hash + + +def add_env_info(storage: Dict[str, Any]): + try: + pretty_env_info = get_pretty_env_info() + except Exception as err: + pretty_env_info = str(err) + transformers_version = trans_version + upper_dir_commit = get_commit_from_path( + Path(os.getcwd(), "..") + ) # git hash of upper repo if exists + added_info = { + "pretty_env_info": pretty_env_info, + "transformers_version": transformers_version, + "upper_git_hash": upper_dir_commit, # in case this repo is submodule + } + storage.update(added_info) + + +def add_tokenizer_info(storage: Dict[str, Any], lm): + if getattr(lm, "tokenizer", False): + try: + tokenizer_info = { + "tokenizer_pad_token": [ + lm.tokenizer.pad_token, + str(lm.tokenizer.pad_token_id), + ], + "tokenizer_eos_token": [ + lm.tokenizer.eos_token, + str(lm.tokenizer.eos_token_id), + ], + "tokenizer_bos_token": [ + lm.tokenizer.bos_token, + str(lm.tokenizer.bos_token_id), + ], + "eot_token_id": getattr(lm, "eot_token_id", None), + "max_length": getattr(lm, "max_length", None), + } + storage.update(tokenizer_info) + except Exception as err: + logger.debug( + f"Logging detailed tokenizer info failed with {err}, skipping..." + ) + # seems gguf and textsynth do not have tokenizer + else: + logger.debug( + "LM does not have a 'tokenizer' attribute, not logging tokenizer metadata to results." + ) diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/loggers/wandb_logger.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/loggers/wandb_logger.py new file mode 100644 index 0000000000000000000000000000000000000000..c9715a0fe99ad443ac4925a951c7f2c785ceb11f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/loggers/wandb_logger.py @@ -0,0 +1,352 @@ +import copy +import json +import logging +from typing import Any, Dict, List, Literal, Tuple + +import numpy as np +import pandas as pd +from packaging.version import Version + +from lm_eval.loggers.utils import _handle_non_serializable, remove_none_pattern + + +logger = logging.getLogger(__name__) + + +def get_wandb_printer() -> Literal["Printer"]: + """Returns a wandb printer instance for pretty stdout.""" + from wandb.sdk.lib.printer import get_printer + from wandb.sdk.wandb_settings import Settings + + printer = get_printer(Settings()._jupyter) + return printer + + +class WandbLogger: + def __init__(self, **kwargs) -> None: + """Attaches to wandb logger if already initialized. Otherwise, passes kwargs to wandb.init() + + Args: + kwargs Optional[Any]: Arguments for configuration. + + Parse and log the results returned from evaluator.simple_evaluate() with: + wandb_logger.post_init(results) + wandb_logger.log_eval_result() + wandb_logger.log_eval_samples(results["samples"]) + """ + try: + import wandb + + assert Version(wandb.__version__) >= Version("0.13.6") + if Version(wandb.__version__) < Version("0.13.6"): + wandb.require("report-editing:v0") + except Exception as e: + logger.warning( + "To use the wandb reporting functionality please install wandb>=0.13.6.\n" + "To install the latest version of wandb run `pip install wandb --upgrade`\n" + f"{e}" + ) + + self.wandb_args: Dict[str, Any] = kwargs + + # initialize a W&B run + if wandb.run is None: + self.run = wandb.init(**self.wandb_args) + else: + self.run = wandb.run + + self.printer = get_wandb_printer() + + def post_init(self, results: Dict[str, Any]) -> None: + self.results: Dict[str, Any] = copy.deepcopy(results) + self.task_names: List[str] = list(results.get("results", {}).keys()) + self.group_names: List[str] = list(results.get("groups", {}).keys()) + + def _get_config(self) -> Dict[str, Any]: + """Get configuration parameters.""" + self.task_configs = self.results.get("configs", {}) + cli_configs = self.results.get("config", {}) + configs = { + "task_configs": self.task_configs, + "cli_configs": cli_configs, + } + + return configs + + def _sanitize_results_dict(self) -> Tuple[Dict[str, str], Dict[str, Any]]: + """Sanitize the results dictionary.""" + _results = copy.deepcopy(self.results.get("results", dict())) + + # Remove None from the metric string name + tmp_results = copy.deepcopy(_results) + for task_name in self.task_names: + task_result = tmp_results.get(task_name, dict()) + for metric_name, metric_value in task_result.items(): + _metric_name, removed = remove_none_pattern(metric_name) + if removed: + _results[task_name][_metric_name] = metric_value + _results[task_name].pop(metric_name) + + # remove string valued keys from the results dict + wandb_summary = {} + for task in self.task_names: + task_result = _results.get(task, dict()) + for metric_name, metric_value in task_result.items(): + if isinstance(metric_value, str): + wandb_summary[f"{task}/{metric_name}"] = metric_value + + for summary_metric, summary_value in wandb_summary.items(): + _task, _summary_metric = summary_metric.split("/") + _results[_task].pop(_summary_metric) + + tmp_results = copy.deepcopy(_results) + for task_name, task_results in tmp_results.items(): + for metric_name, metric_value in task_results.items(): + _results[f"{task_name}/{metric_name}"] = metric_value + _results[task_name].pop(metric_name) + for task in self.task_names: + _results.pop(task) + + return wandb_summary, _results + + def _log_results_as_table(self) -> None: + """Generate and log evaluation results as a table to W&B.""" + columns = [ + "Version", + "Filter", + "num_fewshot", + "Metric", + "Value", + "Stderr", + ] + + def make_table(columns: List[str], key: str = "results"): + import wandb + + table = wandb.Table(columns=columns) + results = copy.deepcopy(self.results) + + for k, dic in results.get(key).items(): + if k in self.group_names and not key == "groups": + continue + version = results.get("versions").get(k) + if version == "N/A": + version = None + n = results.get("n-shot").get(k) + + for (mf), v in dic.items(): + m, _, f = mf.partition(",") + if m.endswith("_stderr"): + continue + if m == "alias": + continue + + if m + "_stderr" + "," + f in dic: + se = dic[m + "_stderr" + "," + f] + if se != "N/A": + se = "%.4f" % se + table.add_data(*[k, version, f, n, m, str(v), str(se)]) + else: + table.add_data(*[k, version, f, n, m, str(v), ""]) + + return table + + # log the complete eval result to W&B Table + table = make_table(["Tasks"] + columns, "results") + self.run.log({"evaluation/eval_results": table}) + + if "groups" in self.results.keys(): + table = make_table(["Groups"] + columns, "groups") + self.run.log({"evaluation/group_eval_results": table}) + + def _log_results_as_artifact(self) -> None: + """Log results as JSON artifact to W&B.""" + import wandb + + dumped = json.dumps( + self.results, indent=2, default=_handle_non_serializable, ensure_ascii=False + ) + artifact = wandb.Artifact("results", type="eval_results") + with artifact.new_file("results.json", mode="w", encoding="utf-8") as f: + f.write(dumped) + self.run.log_artifact(artifact) + + def log_eval_result(self) -> None: + """Log evaluation results to W&B.""" + # Log configs to wandb + configs = self._get_config() + self.run.config.update(configs) + + wandb_summary, self.wandb_results = self._sanitize_results_dict() + # update wandb.run.summary with items that were removed + self.run.summary.update(wandb_summary) + # Log the evaluation metrics to wandb + self.run.log(self.wandb_results) + # Log the evaluation metrics as W&B Table + self._log_results_as_table() + # Log the results dict as json to W&B Artifacts + self._log_results_as_artifact() + + def _generate_dataset( + self, data: List[Dict[str, Any]], config: Dict[str, Any] + ) -> pd.DataFrame: + """Generate a dataset from evaluation data. + + Args: + data (List[Dict[str, Any]]): The data to generate a dataset for. + config (Dict[str, Any]): The configuration of the task. + + Returns: + pd.DataFrame: A dataframe that is ready to be uploaded to W&B. + """ + ids = [x["doc_id"] for x in data] + labels = [x["target"] for x in data] + instance = [""] * len(ids) + resps = [""] * len(ids) + filtered_resps = [""] * len(ids) + model_outputs = {} + + metrics_list = config["metric_list"] + metrics = {} + for metric in metrics_list: + metric = metric.get("metric") + if metric in ["word_perplexity", "byte_perplexity", "bits_per_byte"]: + metrics[f"{metric}_loglikelihood"] = [x[metric][0] for x in data] + if metric in ["byte_perplexity", "bits_per_byte"]: + metrics[f"{metric}_bytes"] = [x[metric][1] for x in data] + else: + metrics[f"{metric}_words"] = [x[metric][1] for x in data] + else: + metrics[metric] = [x[metric] for x in data] + + if config["output_type"] == "loglikelihood": + instance = [x["arguments"][0][0] for x in data] + labels = [x["arguments"][0][1] for x in data] + resps = [ + f'log probability of continuation is {x["resps"][0][0][0]} ' + + "\n\n" + + "continuation will {} generated with greedy sampling".format( + "not be" if not x["resps"][0][0][1] else "be" + ) + for x in data + ] + filtered_resps = [ + f'log probability of continuation is {x["filtered_resps"][0][0]} ' + + "\n\n" + + "continuation will {} generated with greedy sampling".format( + "not be" if not x["filtered_resps"][0][1] else "be" + ) + for x in data + ] + elif config["output_type"] == "multiple_choice": + instance = [x["arguments"][0][0] for x in data] + choices = [ + "\n".join([f"{idx}. {y[1]}" for idx, y in enumerate(x["arguments"])]) + for x in data + ] + resps = [np.argmax([n[0][0] for n in x["resps"]]) for x in data] + filtered_resps = [ + np.argmax([n[0] for n in x["filtered_resps"]]) for x in data + ] + elif config["output_type"] == "loglikelihood_rolling": + instance = [x["arguments"][0][0] for x in data] + resps = [x["resps"][0][0] for x in data] + filtered_resps = [x["filtered_resps"][0] for x in data] + elif config["output_type"] == "generate_until": + instance = [x["arguments"][0][0] for x in data] + resps = [x["resps"][0][0] for x in data] + filtered_resps = [x["filtered_resps"][0] for x in data] + + model_outputs["raw_predictions"] = resps + model_outputs["filtered_predictions"] = filtered_resps + + df_data = { + "id": ids, + "data": instance, + } + if config["output_type"] == "multiple_choice": + df_data["choices"] = choices + + tmp_data = { + "input_len": [len(x) for x in instance], + "labels": labels, + "output_type": config["output_type"], + } + df_data.update(tmp_data) + df_data.update(model_outputs) + df_data.update(metrics) + + return pd.DataFrame(df_data) + + def _log_samples_as_artifact( + self, data: List[Dict[str, Any]], task_name: str + ) -> None: + import wandb + + # log the samples as an artifact + dumped = json.dumps( + data, + indent=2, + default=_handle_non_serializable, + ensure_ascii=False, + ) + artifact = wandb.Artifact(f"{task_name}", type="samples_by_task") + with artifact.new_file( + f"{task_name}_eval_samples.json", mode="w", encoding="utf-8" + ) as f: + f.write(dumped) + self.run.log_artifact(artifact) + # artifact.wait() + + def log_eval_samples(self, samples: Dict[str, List[Dict[str, Any]]]) -> None: + """Log evaluation samples to W&B. + + Args: + samples (Dict[str, List[Dict[str, Any]]]): Evaluation samples for each task. + """ + task_names: List[str] = [ + x for x in self.task_names if x not in self.group_names + ] + + ungrouped_tasks = [] + tasks_by_groups = {} + + for task_name in task_names: + group_names = self.task_configs[task_name].get("group", None) + if group_names: + if isinstance(group_names, str): + group_names = [group_names] + + for group_name in group_names: + if not tasks_by_groups.get(group_name): + tasks_by_groups[group_name] = [task_name] + else: + tasks_by_groups[group_name].append(task_name) + else: + ungrouped_tasks.append(task_name) + + for task_name in ungrouped_tasks: + eval_preds = samples[task_name] + + # log the samples as a W&B Table + df = self._generate_dataset(eval_preds, self.task_configs.get(task_name)) + self.run.log({f"{task_name}_eval_results": df}) + + # log the samples as a json file as W&B Artifact + self._log_samples_as_artifact(eval_preds, task_name) + + for group, grouped_tasks in tasks_by_groups.items(): + grouped_df = pd.DataFrame() + for task_name in grouped_tasks: + eval_preds = samples[task_name] + df = self._generate_dataset( + eval_preds, self.task_configs.get(task_name) + ) + df["group"] = group + df["task"] = task_name + grouped_df = pd.concat([grouped_df, df], ignore_index=True) + + # log the samples as a json file as W&B Artifact + self._log_samples_as_artifact(eval_preds, task_name) + + self.run.log({f"{group}_eval_results": grouped_df}) diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/README.md b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/README.md new file mode 100644 index 0000000000000000000000000000000000000000..09a6dd797cc261a2500fc884fb77d2731bacc4f3 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/README.md @@ -0,0 +1,122 @@ + +# Tasks + + A list of supported tasks and task groupings can be viewed with `lm-eval --tasks list`. + + For more information, including a full list of task names and their precise meanings or sources, follow the links provided to the individual README.md files for each subfolder. + +| Task Family | Description | Language(s) | +|-------------|-------------|-------------| +| [aclue](aclue/README.md) | Tasks focusing on ancient Chinese language understanding and cultural aspects. | Ancient Chinese | +| [aexams](aexams/README.md) | Tasks in Arabic related to various academic exams covering a range of subjects. | Arabic | +| [agieval](agieval/README.md) | Tasks involving historical data or questions related to history and historical texts. | English, Chinese | +| [anli](anli/README.md) | Adversarial natural language inference tasks designed to test model robustness. | English | +| [arabic_leaderboard_complete](arabic_leaderboard_complete/README.md) | A full version of the tasks in the Open Arabic LLM Leaderboard, focusing on the evaluation of models that reflect the characteristics of Arabic language understanding and comprehension, culture, and heritage. Note that some of these tasks are machine-translated. | Arabic (Some MT) | +| [arabic_leaderboard_light](arabic_leaderboard_light/README.md) | A light version of the tasks in the Open Arabic LLM Leaderboard (i.e., 10% samples of the test set in the original benchmarks), focusing on the evaluation of models that reflect the characteristics of Arabic language understanding and comprehension, culture, and heritage. Note that some of these tasks are machine-translated. | Arabic (Some MT) | +| [arabicmmlu](arabicmmlu/README.md) | Localized Arabic version of MMLU with multiple-choice questions from 40 subjects. | Arabic | +| [arc](arc/README.md) | Tasks involving complex reasoning over a diverse set of questions. | English | +| [arithmetic](arithmetic/README.md) | Tasks involving numerical computations and arithmetic reasoning. | English | +| [asdiv](asdiv/README.md) | Tasks involving arithmetic and mathematical reasoning challenges. | English | +| [babi](babi/README.md) | Tasks designed as question and answering challenges based on simulated stories. | English | +| [basqueglue](basqueglue/README.md) | Tasks designed to evaluate language understanding in Basque language. | Basque | +| [bbh](bbh/README.md) | Tasks focused on deep semantic understanding through hypothesization and reasoning. | English, German | +| [belebele](belebele/README.md) | Language understanding tasks in a variety of languages and scripts. | Multiple (122 languages) | +| benchmarks | General benchmarking tasks that test a wide range of language understanding capabilities. | | +| [bertaqa](bertaqa/README.md) | Local Basque cultural trivia QA tests in English and Basque languages. | English, Basque, Basque (MT) | +| [bigbench](bigbench/README.md) | Broad tasks from the BIG-bench benchmark designed to push the boundaries of large models. | Multiple | +| [blimp](blimp/README.md) | Tasks testing grammatical phenomena to evaluate language model's linguistic capabilities. | English | +| [ceval](ceval/README.md) | Tasks that evaluate language understanding and reasoning in an educational context. | Chinese | +| [cmmlu](cmmlu/README.md) | Multi-subject multiple choice question tasks for comprehensive academic assessment. | Chinese | +| code_x_glue | Tasks that involve understanding and generating code across multiple programming languages. | Go, Java, JS, PHP, Python, Ruby | +| [commonsense_qa](commonsense_qa/README.md) | CommonsenseQA, a multiple-choice QA dataset for measuring commonsense knowledge. | English | +| [copal_id](copal_id/README.md) | Indonesian causal commonsense reasoning dataset that captures local nuances. | Indonesian | +| [coqa](coqa/README.md) | Conversational question answering tasks to test dialog understanding. | English | +| [crows_pairs](crows_pairs/README.md) | Tasks designed to test model biases in various sociodemographic groups. | English, French | +| csatqa | Tasks related to SAT and other standardized testing questions for academic assessment. | Korean | +| [drop](drop/README.md) | Tasks requiring numerical reasoning, reading comprehension, and question answering. | English | +| [eq_bench](eq_bench/README.md) | Tasks focused on equality and ethics in question answering and decision-making. | English | +| [eus_exams](eus_exams/README.md) | Tasks based on various professional and academic exams in the Basque language. | Basque | +| [eus_proficiency](eus_proficiency/README.md) | Tasks designed to test proficiency in the Basque language across various topics. | Basque | +| [eus_reading](eus_reading/README.md) | Reading comprehension tasks specifically designed for the Basque language. | Basque | +| [eus_trivia](eus_trivia/README.md) | Trivia and knowledge testing tasks in the Basque language. | Basque | +| [fda](fda/README.md) | Tasks for extracting key-value pairs from FDA documents to test information extraction. | English | +| [fld](fld/README.md) | Tasks involving free-form and directed dialogue understanding. | English | +| [french_bench](french_bench/README.md) | Set of tasks designed to assess language model performance in French. | French| +| [glue](glue/README.md) | General Language Understanding Evaluation benchmark to test broad language abilities. | English | +| [gpqa](gpqa/README.md) | Tasks designed for general public question answering and knowledge verification. | English | +| [gsm8k](gsm8k/README.md) | A benchmark of grade school math problems aimed at evaluating reasoning capabilities. | English | +| [haerae](haerae/README.md) | Tasks focused on assessing detailed factual and historical knowledge. | Korean | +| [headqa](headqa/README.md) | A high-level education-based question answering dataset to test specialized knowledge. | Spanish, English | +| [hellaswag](hellaswag/README.md) | Tasks to predict the ending of stories or scenarios, testing comprehension and creativity. | English | +| [hendrycks_ethics](hendrycks_ethics/README.md) | Tasks designed to evaluate the ethical reasoning capabilities of models. | English | +| [hendrycks_math](hendrycks_math/README.md) | Mathematical problem-solving tasks to test numerical reasoning and problem-solving. | English | +| [ifeval](ifeval/README.md) | Interactive fiction evaluation tasks for narrative understanding and reasoning. | English | +| [inverse_scaling](inverse_scaling/README.md) | Multiple-choice tasks from the Inverse Scaling Prize, designed to find settings where larger language models perform worse. | English | +| [kmmlu](kmmlu/README.md) | Knowledge-based multi-subject multiple choice questions for academic evaluation. | Korean | +| [kobest](kobest/README.md) | A collection of tasks designed to evaluate understanding in Korean language. | Korean | +| [kormedmcqa](kormedmcqa/README.md) | Medical question answering tasks in Korean to test specialized domain knowledge. | Korean | +| [lambada](lambada/README.md) | Tasks designed to predict the endings of text passages, testing language prediction skills. | English | +| [lambada_cloze](lambada_cloze/README.md) | Cloze-style LAMBADA dataset. | English | +| [lambada_multilingual](lambada_multilingual/README.md) | Multilingual LAMBADA dataset. This is a legacy version of the multilingual dataset, and users should instead use `lambada_multilingual_stablelm`. | German, English, Spanish, French, Italian | +| [lambada_multilingual_stablelm](lambada_multilingual_stablelm/README.md) | Multilingual LAMBADA dataset. Users should prefer evaluating on this version of the multilingual dataset instead of on `lambada_multilingual`. | German, English, Spanish, French, Italian, Dutch, Portuguese | +| [leaderboard](leaderboard/README.md) | Task group used by Hugging Face's [Open LLM Leaderboard v2](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard). Those tasks are static and will not change through time | English | +| [lingoly](lingoly/README.md) | Challenging logical reasoning benchmark in low-resource languages with controls for memorization | English, Multilingual | +| [logiqa](logiqa/README.md) | Logical reasoning tasks requiring advanced inference and deduction. | English, Chinese | +| [logiqa2](logiqa2/README.md) | Large-scale logical reasoning dataset adapted from the Chinese Civil Service Examination. | English, Chinese | +| [mathqa](mathqa/README.md) | Question answering tasks involving mathematical reasoning and problem-solving. | English | +| [mc_taco](mc_taco/README.md) | Question-answer pairs that require temporal commonsense comprehension. | English | +| [med_concepts_qa](med_concepts_qa/README.md) | Benchmark for evaluating LLMs on their abilities to interpret medical codes and distinguish between medical concept. | English | +| medmcqa | Medical multiple choice questions assessing detailed medical knowledge. | English | +| medqa | Multiple choice question answering based on the United States Medical License Exams. | | +| [mgsm](mgsm/README.md) | Benchmark of multilingual grade-school math problems. | Spanish, French, German, Russian, Chinese, Japanese, Thai, Swahili, Bengali, Telugu | +| [minerva_math](minerva_math/README.md) | Mathematics-focused tasks requiring numerical reasoning and problem-solving skills. | English | +| mmlu | Massive Multitask Language Understanding benchmark for broad domain language evaluation. Several variants are supported. | English | +| [mmlusr](mmlusr/README.md) | Variation of MMLU designed to be more rigorous. | English | +| model_written_evals | Evaluation tasks auto-generated for evaluating a collection of AI Safety concerns. | | +| [mutual](mutual/README.md) | A retrieval-based dataset for multi-turn dialogue reasoning. | English | +| [nq_open](nq_open/README.md) | Open domain question answering tasks based on the Natural Questions dataset. | English | +| [okapi/arc_multilingual](okapi/arc_multilingual/README.md) | Tasks that involve reading comprehension and information retrieval challenges. | Multiple (31 languages) **Machine Translated.** | +| [okapi/hellaswag_multilingual](okapi/hellaswag_multilingual/README.md) | Tasks that involve reading comprehension and information retrieval challenges. | Multiple (30 languages) **Machine Translated.** | +| okapi/mmlu_multilingual | Tasks that involve reading comprehension and information retrieval challenges. | Multiple (34 languages) **Machine Translated.** | +| [okapi/truthfulqa_multilingual](okapi/truthfulqa_multilingual/README.md) | Tasks that involve reading comprehension and information retrieval challenges. | Multiple (31 languages) **Machine Translated.** | +| [openbookqa](openbookqa/README.md) | Open-book question answering tasks that require external knowledge and reasoning. | English | +| [paloma](paloma/README.md) | Paloma is a comprehensive benchmark designed to evaluate open language models across a wide range of domains, ranging from niche artist communities to mental health forums on Reddit. | English | +| [paws-x](paws-x/README.md) | Paraphrase Adversaries from Word Scrambling, focusing on cross-lingual capabilities. | English, French, Spanish, German, Chinese, Japanese, Korean | +| [pile](pile/README.md) | Open source language modelling data set that consists of 22 smaller, high-quality datasets. | English | +| [pile_10k](pile_10k/README.md) | The first 10K elements of The Pile, useful for debugging models trained on it. | English | +| [piqa](piqa/README.md) | Physical Interaction Question Answering tasks to test physical commonsense reasoning. | English | +| [polemo2](polemo2/README.md) | Sentiment analysis and emotion detection tasks based on Polish language data. | Polish | +| [prost](prost/README.md) | Tasks requiring understanding of professional standards and ethics in various domains. | English | +| [pubmedqa](pubmedqa/README.md) | Question answering tasks based on PubMed research articles for biomedical understanding. | English | +| [qa4mre](qa4mre/README.md) | Question Answering for Machine Reading Evaluation, assessing comprehension and reasoning. | English | +| [qasper](qasper/README.md) | Question Answering dataset based on academic papers, testing in-depth scientific knowledge. | English | +| [race](race/README.md) | Reading comprehension assessment tasks based on English exams in China. | English | +| realtoxicityprompts | Tasks to evaluate language models for generating text with potential toxicity. | | +| [sciq](sciq/README.md) | Science Question Answering tasks to assess understanding of scientific concepts. | English | +| [scrolls](scrolls/README.md) | Tasks that involve long-form reading comprehension across various domains. | English | +| [siqa](siqa/README.md) | Social Interaction Question Answering to evaluate common sense and social reasoning. | English | +| [squad_completion](squad_completion/README.md) | A variant of the SQuAD question answering task designed for zero-shot evaluation of small LMs. | English | +| [squadv2](squadv2/README.md) | Stanford Question Answering Dataset version 2, a reading comprehension benchmark. | English | +| [storycloze](storycloze/README.md) | Tasks to predict story endings, focusing on narrative logic and coherence. | English | +| [super_glue](super_glue/README.md) | A suite of challenging tasks designed to test a range of language understanding skills. | English | +| [swag](swag/README.md) | Situations With Adversarial Generations, predicting the next event in videos. | English | +| [swde](swde/README.md) | Information extraction tasks from semi-structured web pages. | English | +| [tinyBenchmarks](tinyBenchmarks/README.md) | Evaluation of large language models with fewer examples using tiny versions of popular benchmarks. | English | +| [tmmluplus](tmmluplus/README.md) | An extended set of tasks under the TMMLU framework for broader academic assessments. | Traditional Chinese | +| [toxigen](toxigen/README.md) | Tasks designed to evaluate language models on their propensity to generate toxic content. | English | +| [translation](translation/README.md) | Tasks focused on evaluating the language translation capabilities of models. | Arabic, English, Spanish, Basque, Hindi, Indonesian, Burmese, Russian, Swahili, Telugu, Chinese | +| [triviaqa](triviaqa/README.md) | A large-scale dataset for trivia question answering to test general knowledge. | English | +| [truthfulqa](truthfulqa/README.md) | A QA task aimed at evaluating the truthfulness and factual accuracy of model responses. | English | +| [unitxt](unitxt/README.md) | A number of tasks implemented using the unitxt library for flexible, shareable, and reusable data preparation and evaluation for generative AI. | English | +| [unscramble](unscramble/README.md) | Tasks involving the rearrangement of scrambled sentences to test syntactic understanding. | English | +| [webqs](webqs/README.md) | Web-based question answering tasks designed to evaluate internet search and retrieval. | English | +| [wikitext](wikitext/README.md) | Tasks based on text from Wikipedia articles to assess language modeling and generation. | English | +| [winogrande](winogrande/README.md) | A large-scale dataset for coreference resolution, inspired by the Winograd Schema Challenge. | English | +| [wmdp](wmdp/README.md) | A benchmark with the objective of minimizing performance, based on potentially-sensitive multiple-choice knowledge questions. | English | +| [wmt2016](wmt2016/README.md) | Tasks from the WMT 2016 shared task, focusing on translation between multiple languages. | English, Czech, German, Finnish, Russian, Romanian, Turkish | +| [wsc273](wsc273/README.md) | The Winograd Schema Challenge, a test of commonsense reasoning and coreference resolution. | English | +| [xcopa](xcopa/README.md) | Cross-lingual Choice of Plausible Alternatives, testing reasoning in multiple languages. | Estonian, Haitian, Indonesian, Italian, Quechua, Swahili, Tamil, Thai, Turkish, Vietnamese, Chinese | +| [xnli](xnli/README.md) | Cross-Lingual Natural Language Inference to test understanding across different languages. | Arabic, Bulgarian, German, Greek, English, Spanish, French, Hindi, Russian, Swahili, Thai, Turkish, Urdu, Vietnamese, Chinese | +| [xnli_eu](xnli_eu/README.md) | Cross-lingual Natural Language Inference tasks in Basque. | Basque | +| [xstorycloze](xstorycloze/README.md) | Cross-lingual narrative understanding tasks to predict story endings in multiple languages. | Russian, Simplified Chinese, Spanish, Arabic, Hindi, Indonesian, Telugu, Swahili, Basque, Burmese | +| [xwinograd](xwinograd/README.md) | Cross-lingual Winograd schema tasks for coreference resolution in multiple languages. | English, French, Japanese, Portuguese, Russian, Chinese | diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/__init__.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7eeec8bbc602d1a7428a73d39dfab61e48bdf8ae --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/__init__.py @@ -0,0 +1,652 @@ +import collections +import inspect +import logging +import os +from functools import partial +from typing import Dict, List, Mapping, Optional, Union + +from lm_eval import utils +from lm_eval.api.group import ConfigurableGroup, GroupConfig +from lm_eval.api.task import ConfigurableTask, Task +from lm_eval.evaluator_utils import get_subtask_list + + +GROUP_ONLY_KEYS = list(GroupConfig().to_dict().keys()) + + +class TaskManager: + """TaskManager indexes all tasks from the default `lm_eval/tasks/` + and an optional directory if provided. + + """ + + def __init__( + self, + verbosity="INFO", + include_path: Optional[Union[str, List]] = None, + include_defaults: bool = True, + ) -> None: + self.verbosity = verbosity + self.include_path = include_path + self.logger = utils.eval_logger + self.logger.setLevel(getattr(logging, f"{verbosity}")) + + self._task_index = self.initialize_tasks( + include_path=include_path, include_defaults=include_defaults + ) + self._all_tasks = sorted(list(self._task_index.keys())) + + self._all_groups = sorted( + [x for x in self._all_tasks if self._task_index[x]["type"] == "group"] + ) + self._all_subtasks = sorted( + [x for x in self._all_tasks if self._task_index[x]["type"] == "task"] + ) + self._all_tags = sorted( + [x for x in self._all_tasks if self._task_index[x]["type"] == "tag"] + ) + + self.task_group_map = collections.defaultdict(list) + + def initialize_tasks( + self, + include_path: Optional[Union[str, List]] = None, + include_defaults: bool = True, + ): + """Creates a dictionary of tasks index. + + :param include_path: Union[str, List] = None + An additional path to be searched for tasks recursively. + Can provide more than one such path as a list. + :param include_defaults: bool = True + If set to false, default tasks (those in lm_eval/tasks/) are not indexed. + :return + Dictionary of task names as key and task metadata + """ + if include_defaults: + all_paths = [os.path.dirname(os.path.abspath(__file__)) + "/"] + else: + all_paths = [] + if include_path is not None: + if isinstance(include_path, str): + include_path = [include_path] + all_paths.extend(include_path) + + task_index = {} + for task_dir in all_paths: + tasks = self._get_task_and_group(task_dir) + task_index = {**tasks, **task_index} + + return task_index + + @property + def all_tasks(self): + return self._all_tasks + + @property + def all_groups(self): + return self._all_groups + + @property + def all_subtasks(self): + return self._all_subtasks + + @property + def all_tags(self): + return self._all_tags + + @property + def task_index(self): + return self._task_index + + def list_all_tasks( + self, list_groups=True, list_tags=True, list_subtasks=True + ) -> str: + from pytablewriter import MarkdownTableWriter + + def sanitize_path(path): + # don't print full path if we are within the lm_eval/tasks dir ! + # if we aren't though, provide the full path. + if "lm_eval/tasks/" in path: + return "lm_eval/tasks/" + path.split("lm_eval/tasks/")[-1] + else: + return path + + group_table = MarkdownTableWriter() + group_table.headers = ["Group", "Config Location"] + gt_values = [] + for g in self.all_groups: + path = self.task_index[g]["yaml_path"] + if path == -1: + path = "---" + else: + path = sanitize_path(path) + gt_values.append([g, path]) + group_table.value_matrix = gt_values + + tag_table = MarkdownTableWriter() + tag_table.headers = ["Tag"] + tag_table.value_matrix = [[t] for t in self.all_tags] + + subtask_table = MarkdownTableWriter() + subtask_table.headers = ["Task", "Config Location", "Output Type"] + st_values = [] + for t in self.all_subtasks: + path = self.task_index[t]["yaml_path"] + + output_type = "" + + # read the yaml file to determine the output type + if path != -1: + config = utils.load_yaml_config(path, mode="simple") + if "output_type" in config: + output_type = config["output_type"] + elif ( + "include" in config + ): # if no output type, check if there is an include with an output type + include_path = path.split("/")[:-1] + config["include"] + include_config = utils.load_yaml_config(include_path, mode="simple") + if "output_type" in include_config: + output_type = include_config["output_type"] + + if path == -1: + path = "---" + else: + path = sanitize_path(path) + st_values.append([t, path, output_type]) + subtask_table.value_matrix = st_values + + result = "\n" + if list_groups: + result += group_table.dumps() + "\n\n" + if list_tags: + result += tag_table.dumps() + "\n\n" + if list_subtasks: + result += subtask_table.dumps() + "\n\n" + return result + + def match_tasks(self, task_list): + return utils.pattern_match(task_list, self.all_tasks) + + def _name_is_registered(self, name) -> bool: + if name in self.all_tasks: + return True + return False + + def _name_is_task(self, name) -> bool: + if self._name_is_registered(name) and (self.task_index[name]["type"] == "task"): + return True + return False + + def _name_is_tag(self, name) -> bool: + if self._name_is_registered(name) and (self.task_index[name]["type"] == "tag"): + return True + return False + + def _name_is_group(self, name) -> bool: + if self._name_is_registered(name) and ( + self.task_index[name]["type"] == "group" + ): + return True + return False + + def _name_is_python_task(self, name): + if self._name_is_registered(name) and ( + self.task_index[name]["type"] == "python_task" + ): + return True + return False + + def _config_is_task(self, config) -> bool: + if ("task" in config) and isinstance(config["task"], str): + return True + return False + + def _config_is_group(self, config) -> bool: + if ("task" in config) and isinstance(config["task"], list): + return True + return False + + def _config_is_python_task(self, config) -> bool: + if "class" in config: + return True + return False + + def _get_yaml_path(self, name): + if name not in self.task_index: + raise ValueError + return self.task_index[name]["yaml_path"] + + def _get_config(self, name): + if name not in self.task_index: + raise ValueError + yaml_path = self._get_yaml_path(name) + if yaml_path == -1: + return {} + else: + return utils.load_yaml_config(yaml_path, mode="full") + + def _get_tasklist(self, name): + if self._name_is_task(name): + raise ValueError + return self.task_index[name]["task"] + + def _process_alias(self, config, group=None): + # If the group is not the same as the original + # group which the group alias was intended for, + # Set the group_alias to None instead. + if ("group_alias" in config) and ("group" in config) and group is not None: + if config["group"] != group: + config["group_alias"] = None + return config + + def _class_has_config_in_constructor(self, cls): + constructor = getattr(cls, "__init__", None) + return ( + "config" in inspect.signature(constructor).parameters + if constructor + else False + ) + + def _load_individual_task_or_group( + self, + name_or_config: Optional[Union[str, dict]] = None, + parent_name: Optional[str] = None, + update_config: Optional[dict] = None, + ) -> Mapping: + def _load_task(config, task): + if "include" in config: + config = { + **utils.load_yaml_config( + yaml_path=None, + yaml_config={"include": config.pop("include")}, + mode="full", + ), + **config, + } + if self._config_is_python_task(config): + if self._class_has_config_in_constructor(config["class"]): + task_object = config["class"](config=config) + else: + task_object = config["class"]() + if isinstance(task_object, ConfigurableTask): + # very scuffed: set task name here. TODO: fixme? + task_object.config.task = config["task"] + else: + task_object = ConfigurableTask(config=config) + + return {task: task_object} + + def _get_group_and_subtask_from_config(config): + group_name = ConfigurableGroup(config=config) + subtask_list = [] + for task in group_name.config["task"]: + if isinstance(task, str) and self._name_is_tag(task): + subtask_list.extend(self._get_tasklist(task)) + else: + subtask_list.append(task) + return group_name, subtask_list + + def _process_group_config(config, update_config=None): + if update_config is not None: + config = {**config, **update_config} + _update_config = { + k: v for k, v in config.items() if k not in GROUP_ONLY_KEYS + } + if not bool(_update_config): + _update_config = None + + group_config = {k: v for k, v in config.items() if k in GROUP_ONLY_KEYS} + return group_config, _update_config + + if isinstance(name_or_config, str): + if update_config is not None: + # Process name_or_config as a dict instead + name_or_config = {"task": name_or_config, **update_config} + elif self._name_is_task(name_or_config) or self._name_is_python_task( + name_or_config + ): + task_config = self._get_config(name_or_config) + return _load_task(task_config, task=name_or_config) + else: + subtask_list = self._get_tasklist(name_or_config) + if subtask_list == -1: + group_config = self._get_config(name_or_config) + group_config, update_config = _process_group_config(group_config) + group_name, subtask_list = _get_group_and_subtask_from_config( + group_config + ) + else: + if self._name_is_tag(name_or_config): + fn = partial( + self._load_individual_task_or_group, + update_config=name_or_config + if isinstance(name_or_config, dict) + else None, + ) + return dict( + collections.ChainMap(*map(fn, reversed(subtask_list))) + ) + else: + group_name = ConfigurableGroup( + config={"group": name_or_config, "task": subtask_list} + ) + + if isinstance(name_or_config, dict): + if self._config_is_task(name_or_config): + name = name_or_config.pop("task") + if update_config is not None: + name_or_config = {**name_or_config, **update_config} + # If the name is registered as a group + if self._name_is_group(name): + group_config = self._get_config(name) + + group_config, update_config = _process_group_config( + group_config, name_or_config + ) + group_name, subtask_list = _get_group_and_subtask_from_config( + group_config + ) + elif self._name_is_tag(name): + subtask_list = self._get_tasklist(name) + fn = partial( + self._load_individual_task_or_group, + update_config=name_or_config, + ) + return dict(collections.ChainMap(*map(fn, reversed(subtask_list)))) + else: + if self._name_is_registered(name): + base_task_config = self._get_config(name) + + # Check if this is a duplicate. + if parent_name is not None: + num_duplicate = len( + list( + filter( + lambda x: x.startswith(name), + self.task_group_map[parent_name], + ) + ) + ) + if num_duplicate > 0: + name = f"{name}-{num_duplicate}" + self.task_group_map[parent_name].append(name) + + task_config = { + **base_task_config, + **name_or_config, + } + else: + task_config = name_or_config + return _load_task(task_config, task=name) + else: + group_config, update_config = _process_group_config(name_or_config) + group_name, subtask_list = _get_group_and_subtask_from_config( + group_config + ) + + fn = partial( + self._load_individual_task_or_group, + parent_name=group_name, + update_config=update_config, + ) + return { + group_name: dict(collections.ChainMap(*map(fn, reversed(subtask_list)))) + } + + def load_task_or_group(self, task_list: Optional[Union[str, list]] = None) -> dict: + """Loads a dictionary of task objects from a list + + :param task_list: Union[str, list] = None + Single string or list of string of task names to be loaded + + :return + Dictionary of task objects + """ + if isinstance(task_list, str): + task_list = [task_list] + + all_loaded_tasks = dict( + collections.ChainMap(*map(self._load_individual_task_or_group, task_list)) + ) + return all_loaded_tasks + + def load_config(self, config: Dict): + return self._load_individual_task_or_group(config) + + def _get_task_and_group(self, task_dir: str): + """Creates a dictionary of tasks index with the following metadata, + - `type`, that can be either `task`, `python_task`, `group` or `tags`. + `task` refer to regular task configs, `python_task` are special + yaml files that only consists of `task` and `class` parameters. + `group` are group configs. `tags` are labels that can be assigned + to tasks to assist in sorting and calling tasks of certain themes. + - `yaml_path`, path to the yaml file. If the entry is a `group` that + was configured through a task config, the yaml_path will be -1 + and all subtasks will be listed in `task` (see below) + - `task`, reserved for entries with `type` as `group`. This will list + all subtasks. When a group config is created (as opposed to task + config having `group` parameter set), this will be set to -1 to + avoid recursive indexing. The whole list of subtasks will be loaded + at evaluation. + + :param task_dir: str + A directory to check for tasks + + :return + Dictionary of task names as key and task metadata + """ + # TODO: remove group in next release + print_info = True + ignore_dirs = [ + "__pycache__", + ".ipynb_checkpoints", + ] + tasks_and_groups = collections.defaultdict() + for root, dirs, file_list in os.walk(task_dir): + dirs[:] = [d for d in dirs if d not in ignore_dirs] + for f in file_list: + if f.endswith(".yaml"): + yaml_path = os.path.join(root, f) + config = utils.load_yaml_config(yaml_path, mode="simple") + if self._config_is_python_task(config): + # This is a python class config + tasks_and_groups[config["task"]] = { + "type": "python_task", + "yaml_path": yaml_path, + } + elif self._config_is_group(config): + # This is a group config + tasks_and_groups[config["group"]] = { + "type": "group", + "task": -1, # This signals that + # we don't need to know + # the task list for indexing + # as it can be loaded + # when called. + "yaml_path": yaml_path, + } + + # # Registered the level 1 tasks from a group config + # for config in config["task"]: + # if isinstance(config, dict) and self._config_is_task(config): + # task = config["task"] + # tasks_and_groups[task] = { + # "type": "task", + # "yaml_path": yaml_path, + # } + + elif self._config_is_task(config): + # This is a task config + task = config["task"] + tasks_and_groups[task] = { + "type": "task", + "yaml_path": yaml_path, + } + + # TODO: remove group in next release + for attr in ["tag", "group"]: + if attr in config: + if attr == "group" and print_info: + self.logger.info( + "`group` and `group_alias` keys in TaskConfigs are deprecated and will be removed in v0.4.5 of lm_eval. " + "The new `tag` field will be used to allow for a shortcut to a group of tasks one does not wish to aggregate metrics across. " + "`group`s which aggregate across subtasks must be only defined in a separate group config file, " + "which will be the official way to create groups that support cross-task aggregation as in `mmlu`. " + "Please see the v0.4.4 patch notes and our documentation: https://github.com/EleutherAI/lm-evaluation-harness/blob/main/docs/new_task_guide.md#advanced-group-configs " + "for more information." + ) + print_info = False + # attr = "tag" + + attr_list = config[attr] + if isinstance(attr_list, str): + attr_list = [attr_list] + + for tag in attr_list: + if tag not in tasks_and_groups: + tasks_and_groups[tag] = { + "type": "tag", + "task": [task], + "yaml_path": -1, + } + elif tasks_and_groups[tag]["type"] != "tag": + self.logger.info( + f"The tag {tag} is already registered as a group, this tag will not be registered. " + "This may affect tasks you want to call." + ) + break + else: + tasks_and_groups[tag]["task"].append(task) + else: + self.logger.debug(f"File {f} in {root} could not be loaded") + + return tasks_and_groups + + +def get_task_name_from_config(task_config: Dict[str, str]) -> str: + if "task" in task_config: + return task_config["task"] + if "dataset_name" in task_config: + return "{dataset_path}_{dataset_name}".format(**task_config) + else: + return "{dataset_path}".format(**task_config) + + +def get_task_name_from_object(task_object): + if hasattr(task_object, "config"): + return task_object._config["task"] + + # TODO: scrap this + # this gives a mechanism for non-registered tasks to have a custom name anyways when reporting + return ( + task_object.EVAL_HARNESS_NAME + if hasattr(task_object, "EVAL_HARNESS_NAME") + else type(task_object).__name__ + ) + + +def _check_duplicates(task_dict: dict) -> List[str]: + """helper function solely used in validating get_task_dict output. + Takes the output of lm_eval.evaluator_utils.get_subtask_list and + returns a list of all leaf subtasks contained within, and errors if any such leaf subtasks are + "oversubscribed" to several disjoint groups. + """ + subtask_names = [] + for key, value in task_dict.items(): + subtask_names.extend(value) + + duplicate_tasks = { + task_name for task_name in subtask_names if subtask_names.count(task_name) > 1 + } + + # locate the potentially problematic groups that seem to 'compete' for constituent subtasks + competing_groups = [ + group + for group in task_dict.keys() + if len(set(task_dict[group]).intersection(duplicate_tasks)) > 0 + ] + + if len(duplicate_tasks) > 0: + raise ValueError( + f"Found 1 or more tasks while trying to call get_task_dict() that were members of more than 1 called group: {list(duplicate_tasks)}. Offending groups: {competing_groups}. Please call groups which overlap their constituent tasks in separate evaluation runs." + ) + + +def get_task_dict( + task_name_list: Union[str, List[Union[str, Dict, Task]]], + task_manager: Optional[TaskManager] = None, +): + """Creates a dictionary of task objects from either a name of task, config, or prepared Task object. + + :param task_name_list: List[Union[str, Dict, Task]] + Name of model or LM object, see lm_eval.models.get_model + :param task_manager: TaskManager = None + A TaskManager object that stores indexed tasks. If not set, + task_manager will load one. This should be set by the user + if there are additional paths that want to be included + via `include_path` + + :return + Dictionary of task objects + """ + + task_name_from_string_dict = {} + task_name_from_config_dict = {} + task_name_from_object_dict = {} + + if isinstance(task_name_list, str): + task_name_list = [task_name_list] + elif isinstance(task_name_list, list): + if not all([isinstance(task, (str, dict, Task)) for task in task_name_list]): + raise TypeError( + "Expected all list items to be of types 'str', 'dict', or 'Task', but at least one entry did not match." + ) + else: + raise TypeError( + f"Expected a 'str' or 'list' but received {type(task_name_list)}." + ) + + string_task_name_list = [task for task in task_name_list if isinstance(task, str)] + others_task_name_list = [ + task for task in task_name_list if not isinstance(task, str) + ] + if len(string_task_name_list) > 0: + if task_manager is None: + task_manager = TaskManager() + + task_name_from_string_dict = task_manager.load_task_or_group( + string_task_name_list + ) + + for task_element in others_task_name_list: + if isinstance(task_element, dict): + task_name_from_config_dict = { + **task_name_from_config_dict, + **task_manager.load_config(config=task_element), + } + + elif isinstance(task_element, Task): + task_name_from_object_dict = { + **task_name_from_object_dict, + get_task_name_from_object(task_element): task_element, + } + + if not set(task_name_from_string_dict.keys()).isdisjoint( + set(task_name_from_object_dict.keys()) + ): + raise ValueError + + final_task_dict = { + **task_name_from_string_dict, + **task_name_from_config_dict, + **task_name_from_object_dict, + } + + # behavior can get odd if one tries to invoke several groups that "compete" for the same task. + # (notably, because one could request several num_fewshot values at once in GroupConfig overrides for the subtask + # and we'd be unsure which to use and report.) + # we explicitly check and error in this case. + _check_duplicates(get_subtask_list(final_task_dict)) + + return final_task_dict diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tinyBenchmarks/tinyGSM8k.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tinyBenchmarks/tinyGSM8k.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6cf48ee9c22fe4fd3c6ee4ef7291372201b97d92 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tinyBenchmarks/tinyGSM8k.yaml @@ -0,0 +1,44 @@ +task: tinyGSM8k +dataset_path: tinyBenchmarks/tinyGSM8k +dataset_name: main +output_type: generate_until +training_split: train +fewshot_split: train +test_split: test +num_fewshot: 5 +doc_to_text: "Question: {{question}}\nAnswer:" +doc_to_target: "{{answer}}" #" {{answer.split('### ')[-1].rstrip()}}" +metric_list: + - metric: exact_match + aggregation: !function agg_functions.agg_gpirt_gsm8k + higher_is_better: true + ignore_case: true + ignore_punctuation: false + regexes_to_ignore: + - "," + - "\\$" + - "(?s).*#### " + - "\\.$" +generation_kwargs: + until: + - "Question:" + - "" + - "<|im_end|>" + do_sample: false + temperature: 0.0 +repeats: 1 +num_fewshot: 5 +filter_list: + - name: "strict-match" + filter: + - function: "regex" + regex_pattern: "#### (\\-?[0-9\\.\\,]+)" + - function: "take_first" + - name: "flexible-extract" + filter: + - function: "regex" + group_select: -1 + regex_pattern: "(-?[$0-9.,]{2,})|(-?[0-9]+)" + - function: "take_first" +metadata: + version: 0.0 diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/README.md b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6ce4d93663bbd949cc26ef6b4140cd7dfff471b2 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/README.md @@ -0,0 +1,59 @@ +# TMLU + +### Paper + +Title: `Measuring Taiwanese Mandarin Language Understanding` + +Abstract: `The evaluation of large language models (LLMs) has drawn substantial attention in the field recently. This work focuses on evaluating LLMs in a Chinese context, specifically, for Traditional Chinese which has been largely underrepresented in existing benchmarks. We present TMLU, a holistic evaluation suit tailored for assessing the advanced knowledge and reasoning capability in LLMs, under the context of Taiwanese Mandarin. TMLU consists of an array of 37 subjects across social science, STEM, humanities, Taiwan-specific content, and others, ranging from middle school to professional levels. In addition, we curate chain-of-thought-like few-shot explanations for each subject to facilitate the evaluation of complex reasoning skills. To establish a comprehensive baseline, we conduct extensive experiments and analysis on 24 advanced LLMs. The results suggest that Chinese open-weight models demonstrate inferior performance comparing to multilingual proprietary ones, and open-weight models tailored for Taiwanese Mandarin lag behind the Simplified-Chinese counterparts. The findings indicate great headrooms for improvement, and emphasize the goal of TMLU to foster the development of localized Taiwanese-Mandarin LLMs. We release the benchmark and evaluation scripts for the community to promote future research.` + + +Homepage: [TMLU Huggingface Dataset](https://huggingface.co/datasets/miulab/tmlu) + + +### Citation + +``` +@article{DBLP:journals/corr/abs-2403-20180, + author = {Po{-}Heng Chen and + Sijia Cheng and + Wei{-}Lin Chen and + Yen{-}Ting Lin and + Yun{-}Nung Chen}, + title = {Measuring Taiwanese Mandarin Language Understanding}, + journal = {CoRR}, + volume = {abs/2403.20180}, + year = {2024}, + url = {https://doi.org/10.48550/arXiv.2403.20180}, + doi = {10.48550/ARXIV.2403.20180}, + eprinttype = {arXiv}, + eprint = {2403.20180}, + timestamp = {Wed, 10 Apr 2024 17:37:45 +0200}, + biburl = {https://dblp.org/rec/journals/corr/abs-2403-20180.bib}, + bibsource = {dblp computer science bibliography, https://dblp.org} +} +``` + +### Groups and Tasks + +#### Groups + +* `tmlu`: `The dataset comprises 2,981 multiple-choice questions from 37 subjects. ` + +#### Tasks + +The following tasks evaluate subjects in the TMLU dataset using loglikelihood-based multiple-choice scoring: + +* `tmlu_{subject_english}` + +### Checklist + +For adding novel benchmarks/datasets to the library: +* [x] Is the task an existing benchmark in the literature? + * [x] Have you referenced the original paper that introduced the task? + * [x] If yes, does the original paper provide a reference implementation? If so, have you checked against the reference implementation and documented how to run such a test? + + +If other tasks on this dataset are already supported: +* [x] Is the "Main" variant of this task clearly denoted? +* [x] Have you provided a short sentence in a README on what each new variant adds / evaluates? +* [x] Have you noted which, if any, published evaluation setups are matched by this variant? diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/_generate_configs.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/_generate_configs.py new file mode 100644 index 0000000000000000000000000000000000000000..86b176085dc76366db3f6745d21e99a3a40b1b0c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/_generate_configs.py @@ -0,0 +1,198 @@ +""" +Take in a YAML, and output all "other" splits with this YAML +""" + +import argparse +import os + +import pandas as pd +import yaml +from tqdm import tqdm + + +categories = { + "STEM": [ + "biology", + "chemistry", + "mathematics" "physics", + "earth science", + ], + "humanities": ["Chinese", "history", "Tour", "law"], + "social_sciences": [ + "civics", + "geography", + "accounting", + "psychologist", + ], + "Taiwan Specific": [ + "Taiwan Specific", + ], + "other": ["Medicine", "Nutritionist"], # (business, health, misc.) +} + +task_list = [ + "AST civics", + "AST geography", + "CAP civics", + "CAP geography", + "GSAT civics", + "GSAT geography", + "MOEX Accountant", + "MOEX Clinical psychologist", + "AST biology", + "AST chemistry", + "AST mathematics", + "AST physics", + "CAP biology", + "CAP chemistry", + "CAP earth science", + "CAP mathematics", + "CAP physics", + "GSAT biology", + "GSAT chemistry", + "GSAT earth science", + "GSAT mathematics", + "GSAT physics", + "AST Chinese", + "AST history", + "CAP Chinese", + "CAP history", + "GSAT Chinese", + "GSAT history", + "MOEX Tour guide", + "MOEX Tour leader", + "MOEX Lawyer qualification", + "HB Driving Rule", + "MOEX Teacher qualification", + "MOEX Taiwan tourist resources", + "MOEX Basic Traditional Chinese Medicine", + "MOEX Clinical Traditional Chinese Medicine", + "MOEX Nutritionist", +] +subject2name = {} +subject2num_choice = {} +# subject2category = {} +SUBJECTS = {} + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument("--base_yaml_path", default="_default_template_yaml") + parser.add_argument("--save_prefix_path", default="tmlu") + parser.add_argument("--cot_prompt_path", default=None) + parser.add_argument("--task_prefix", default="") + parser.add_argument("--group_prefix", default="") + parser.add_argument("--subject_file", default="../subject.tsv") + return parser.parse_args() + + +if __name__ == "__main__": + args = parse_args() + from pathlib import Path + + # Initialization + SUBJECT_FILE = Path(__file__).parent / Path(args.subject_file) + + df = pd.read_csv(SUBJECT_FILE, delimiter="\t") + + for _, row in df.iterrows(): + for _c in categories: + if row["subject"] in SUBJECTS: + raise ValueError(f"Duplicate tasks. {row['subject']} already exists.") + if row["category"] in categories[_c]: # append new item into SUBJECTS + SUBJECTS[row["subject"]] = _c + subject2name[row["subject"]] = row["name"] + subject2num_choice[row["subject"]] = row["# Choices"] + break + # End of SUBJECTS initialization + + # get filename of base_yaml so we can `"include": ` it in our "other" YAMLs. + base_yaml_name = os.path.split(args.base_yaml_path)[-1] + with open(args.base_yaml_path) as f: + base_yaml = yaml.full_load(f) + + if args.cot_prompt_path is not None: + import json + + with open(args.cot_prompt_path) as f: + cot_file = json.load(f) + + ALL_CATEGORIES = [] + for subject, category in tqdm(SUBJECTS.items()): + if category not in ALL_CATEGORIES: + ALL_CATEGORIES.append(category) + + if args.cot_prompt_path is not None: + description = cot_file[subject] + else: + name_of_subject = subject2name[subject].replace("_", " ") + description = f"以下為{name_of_subject}的單選題,請提供正確答案的選項。\n\n" + # description = f"The following are multiple choice questions (with answers) about {' '.join(subject.split('_'))}.\n\n" + + num_choies = subject2num_choice[subject] + # basic_doc_to_text = "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\nD. {{choices[3]}}" + basic_doc_to_choice = ["A", "B", "C", "D"] + if num_choies == 5: + # basic_doc_to_text += "\nE. {{choices[4]}}" + basic_doc_to_choice.append("E") + if num_choies == 6: + # basic_doc_to_text += "\nE. {{choices[4]}}\nF. {{choices[5]}}" + basic_doc_to_choice += ["E", "F"] + # basic_doc_to_text += "\nAnswer:" + # basic_doc_to_text = "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\nD. {{choices[3]}}{% if choices[4] %}\nE. {{choices[4]}}{% endif %}{% if choices[5] %}\nF. {{choices[5]}}{% endif %}\nAnswer:" + basic_doc_to_text = "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\nD. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{% endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{% endif %}\nAnswer:" + + yaml_dict = { + "include": base_yaml_name, + "group": f"tmlu_{args.task_prefix}_{category}" + if args.task_prefix != "" + else f"tmlu_{category}", + "group_alias": category.replace("_", " "), + "task": f"tmlu_{args.task_prefix}_{subject}" + if args.task_prefix != "" + else f"tmlu_{subject}", + "task_alias": subject.replace("_", " "), + "dataset_name": subject, + "description": description, + # doc_to_text: "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\nD. {{choices[3]}}\nAnswer:" + "doc_to_text": basic_doc_to_text, + # doc_to_choice: ["A", "B", "C", "D"] + "doc_to_choice": basic_doc_to_choice, + } + + file_save_path = args.save_prefix_path + f"_{subject}.yaml" + # eval_logger.info(f"Saving yaml for subset {subject} to {file_save_path}") + with open(file_save_path, "w") as yaml_file: + yaml.dump( + yaml_dict, + yaml_file, + # width=float("inf"), + allow_unicode=True, + default_style='"', + ) + + if args.task_prefix != "": + mmlu_subcategories = [ + f"tmlu_{args.task_prefix}_{category}" for category in ALL_CATEGORIES + ] + else: + mmlu_subcategories = [f"tmlu_{category}" for category in ALL_CATEGORIES] + + if args.group_prefix != "": + file_save_path = args.group_prefix + ".yaml" + else: + file_save_path = args.save_prefix_path + ".yaml" + + # eval_logger.info(f"Saving benchmark config to {file_save_path}") + with open(file_save_path, "w") as yaml_file: + yaml.dump( + { + "group": f"tmlu_{args.task_prefix}" + if args.task_prefix != "" + else "tmlu", + "task": mmlu_subcategories, + }, + yaml_file, + indent=4, + default_flow_style=False, + ) diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/_tmlu.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/_tmlu.yaml new file mode 100644 index 0000000000000000000000000000000000000000..08344c85ce6795162d589e4f93beffa8d9f79d8b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/_tmlu.yaml @@ -0,0 +1,37 @@ +group: tmlu +group_alias: TMLU +task: + - group: tmlu_social_sciences + group_alias: Social Sciences + task: + - tmlu_social_sciences_tasks + aggregate_metric_list: + - metric: acc + - group: tmlu_stem + group_alias: STEM + task: + - tmlu_stem_tasks + aggregate_metric_list: + - metric: acc + - group: tmlu_humanities + group_alias: Humanities + task: + - tmlu_humanities_tasks + aggregate_metric_list: + - metric: acc + - group: tmlu_taiwan_specific + group_alias: Taiwan Specific + task: + - tmlu_taiwan_specific_tasks + aggregate_metric_list: + - metric: acc + - group: tmlu_other + group_alias: Other + task: + - tmlu_other_tasks + aggregate_metric_list: + - metric: acc +aggregate_metric_list: + - metric: acc +metadata: + version: 1 diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_biology.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_biology.yaml new file mode 100644 index 0000000000000000000000000000000000000000..68a7f4a34214db3707a1bed8d835b97ad742e8a0 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_biology.yaml @@ -0,0 +1,15 @@ +"dataset_name": "AST_biology" +"description": "以下為分科測驗生物的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_stem_tasks" +"include": "_default_template_yaml" +"task": "tmlu_AST_biology" +"task_alias": "AST biology" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_chinese.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_chinese.yaml new file mode 100644 index 0000000000000000000000000000000000000000..216c87122b899177876e20d89fc9b4f1959bec53 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_chinese.yaml @@ -0,0 +1,15 @@ +"dataset_name": "AST_chinese" +"description": "以下為分科測驗國文的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_humanities_tasks" +"include": "_default_template_yaml" +"task": "tmlu_AST_chinese" +"task_alias": "AST chinese" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_civics.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_civics.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b7fe538f617164471469018beca8ff087d5c82be --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_civics.yaml @@ -0,0 +1,15 @@ +"dataset_name": "AST_civics" +"description": "以下為分科測驗公民的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_social_sciences_tasks" +"include": "_default_template_yaml" +"task": "tmlu_AST_civics" +"task_alias": "AST civics" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_geography.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_geography.yaml new file mode 100644 index 0000000000000000000000000000000000000000..921765f022935b0f4d73bbc8fcc2a32fac79ef79 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_geography.yaml @@ -0,0 +1,15 @@ +"dataset_name": "AST_geography" +"description": "以下為分科測驗地理的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_social_sciences_tasks" +"include": "_default_template_yaml" +"task": "tmlu_AST_geography" +"task_alias": "AST geography" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_history.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_history.yaml new file mode 100644 index 0000000000000000000000000000000000000000..483f46bd39a8a6e839869d2fb0d90b90a98df4d8 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_AST_history.yaml @@ -0,0 +1,15 @@ +"dataset_name": "AST_history" +"description": "以下為分科測驗歷史的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_humanities_tasks" +"include": "_default_template_yaml" +"task": "tmlu_AST_history" +"task_alias": "AST history" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_biology.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_biology.yaml new file mode 100644 index 0000000000000000000000000000000000000000..98454938b6231dcdf2cc2e43b23c07a26792634c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_biology.yaml @@ -0,0 +1,15 @@ +"dataset_name": "CAP_biology" +"description": "以下為會考生物的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_stem_tasks" +"include": "_default_template_yaml" +"task": "tmlu_CAP_biology" +"task_alias": "CAP biology" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_chemistry.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_chemistry.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8ac15d8434592e231956f5c565d2137d73a7163d --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_chemistry.yaml @@ -0,0 +1,15 @@ +"dataset_name": "CAP_chemistry" +"description": "以下為會考化學的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_stem_tasks" +"include": "_default_template_yaml" +"task": "tmlu_CAP_chemistry" +"task_alias": "CAP chemistry" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_chinese.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_chinese.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b71b479caa03f5bea04ad0d4c0a7255203fc0d2d --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_chinese.yaml @@ -0,0 +1,15 @@ +"dataset_name": "CAP_chinese" +"description": "以下為會考國文的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_humanities_tasks" +"include": "_default_template_yaml" +"task": "tmlu_CAP_chinese" +"task_alias": "CAP chinese" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_civics.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_civics.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bdf1ea3b2608cd99004e7a809e0827a77deab606 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_civics.yaml @@ -0,0 +1,15 @@ +"dataset_name": "CAP_civics" +"description": "以下為會考公民的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_social_sciences_tasks" +"include": "_default_template_yaml" +"task": "tmlu_CAP_civics" +"task_alias": "CAP civics" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_earth_science.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_earth_science.yaml new file mode 100644 index 0000000000000000000000000000000000000000..16c4349619844070006676df1fba1dc9db4fe990 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_earth_science.yaml @@ -0,0 +1,15 @@ +"dataset_name": "CAP_earth_science" +"description": "以下為會考地球科學的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_stem_tasks" +"include": "_default_template_yaml" +"task": "tmlu_CAP_earth_science" +"task_alias": "CAP earth science" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_geography.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_geography.yaml new file mode 100644 index 0000000000000000000000000000000000000000..82f52c2834598642e1a138102327d23e3bc0ed5b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_geography.yaml @@ -0,0 +1,15 @@ +"dataset_name": "CAP_geography" +"description": "以下為會考地理的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_social_sciences_tasks" +"include": "_default_template_yaml" +"task": "tmlu_CAP_geography" +"task_alias": "CAP geography" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_history.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_history.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d0ce5fc377f19c3cc1c45427b66fb470429dd537 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_CAP_history.yaml @@ -0,0 +1,15 @@ +"dataset_name": "CAP_history" +"description": "以下為會考歷史的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_humanities_tasks" +"include": "_default_template_yaml" +"task": "tmlu_CAP_history" +"task_alias": "CAP history" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_biology.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_biology.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2835e23a6dd4c295c0c60fbad0ad9a30411f356b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_biology.yaml @@ -0,0 +1,16 @@ +"dataset_name": "GSAT_biology" +"description": "以下為學測生物的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +- "E" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_stem_tasks" +"include": "_default_template_yaml" +"task": "tmlu_GSAT_biology" +"task_alias": "GSAT biology" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_chemistry.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_chemistry.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6baad6da672e9910a4a8dc638903c87fdbf6176a --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_chemistry.yaml @@ -0,0 +1,16 @@ +"dataset_name": "GSAT_chemistry" +"description": "以下為學測化學的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +- "E" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_stem_tasks" +"include": "_default_template_yaml" +"task": "tmlu_GSAT_chemistry" +"task_alias": "GSAT chemistry" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_chinese.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_chinese.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f1cd7000a41a7e73465475ce639b957fa029a6c2 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_chinese.yaml @@ -0,0 +1,15 @@ +"dataset_name": "GSAT_chinese" +"description": "以下為學測國文的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_humanities_tasks" +"include": "_default_template_yaml" +"task": "tmlu_GSAT_chinese" +"task_alias": "GSAT chinese" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_civics.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_civics.yaml new file mode 100644 index 0000000000000000000000000000000000000000..347c4f13c56dd99c0257eff684bdbfffe5cdb86c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_civics.yaml @@ -0,0 +1,15 @@ +"dataset_name": "GSAT_civics" +"description": "以下為學測公民的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_social_sciences_tasks" +"include": "_default_template_yaml" +"task": "tmlu_GSAT_civics" +"task_alias": "GSAT civics" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_earth_science.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_earth_science.yaml new file mode 100644 index 0000000000000000000000000000000000000000..de0db88544a2ef990b9978cfc61e8fa32e50e61d --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_earth_science.yaml @@ -0,0 +1,16 @@ +"dataset_name": "GSAT_earth_science" +"description": "以下為學測地球科學的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +- "E" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_stem_tasks" +"include": "_default_template_yaml" +"task": "tmlu_GSAT_earth_science" +"task_alias": "GSAT earth science" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_geography.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_geography.yaml new file mode 100644 index 0000000000000000000000000000000000000000..752fc9033931efc5ce7618832d9065c43be7a220 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_geography.yaml @@ -0,0 +1,15 @@ +"dataset_name": "GSAT_geography" +"description": "以下為學測地理的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_social_sciences_tasks" +"include": "_default_template_yaml" +"task": "tmlu_GSAT_geography" +"task_alias": "GSAT geography" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_history.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_history.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e2e2547367db598d148a9772e68f32a05fa49e03 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_GSAT_history.yaml @@ -0,0 +1,15 @@ +"dataset_name": "GSAT_history" +"description": "以下為學測歷史的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_humanities_tasks" +"include": "_default_template_yaml" +"task": "tmlu_GSAT_history" +"task_alias": "GSAT history" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_accountant.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_accountant.yaml new file mode 100644 index 0000000000000000000000000000000000000000..61aa6c8cba4fb755071ef241329dfe5ca86d8483 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_accountant.yaml @@ -0,0 +1,15 @@ +"dataset_name": "accountant" +"description": "以下為會計師的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_social_sciences_tasks" +"include": "_default_template_yaml" +"task": "tmlu_accountant" +"task_alias": "accountant" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_clinical_psychologist.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_clinical_psychologist.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1106b9eb4bb1e4d1ce4531c058f52ca7d1e57557 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_clinical_psychologist.yaml @@ -0,0 +1,15 @@ +"dataset_name": "clinical_psychologist" +"description": "以下為臨床心理師的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_social_sciences_tasks" +"include": "_default_template_yaml" +"task": "tmlu_clinical_psychologist" +"task_alias": "clinical psychologist" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_clinical_traditional_chinese_medicine.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_clinical_traditional_chinese_medicine.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9207f40b660d6a48f1ffad78aee320f8644b4977 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_clinical_traditional_chinese_medicine.yaml @@ -0,0 +1,15 @@ +"dataset_name": "clinical_traditional_chinese_medicine" +"description": "以下為中醫針灸的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_other_tasks" +"include": "_default_template_yaml" +"task": "tmlu_clinical_traditional_chinese_medicine" +"task_alias": "clinical traditional chinese medicine" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_driving_rule.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_driving_rule.yaml new file mode 100644 index 0000000000000000000000000000000000000000..965084c8d5d3b1904b724d80665c1f19084c73c2 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_driving_rule.yaml @@ -0,0 +1,15 @@ +"dataset_name": "driving_rule" +"description": "以下為台灣駕駛規則的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_taiwan_specific" +"include": "_default_template_yaml" +"task": "tmlu_driving_rule" +"task_alias": "driving rule" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_lawyer_qualification.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_lawyer_qualification.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0926ebcd08270af62bd8a062b895774b376def6c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_lawyer_qualification.yaml @@ -0,0 +1,15 @@ +"dataset_name": "lawyer_qualification" +"description": "以下為律師資格的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_humanities_tasks" +"include": "_default_template_yaml" +"task": "tmlu_lawyer_qualification" +"task_alias": "lawyer qualification" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_nutritionist.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_nutritionist.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ca0a08fc11799e5608ff3c951dd491123e9a734b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_nutritionist.yaml @@ -0,0 +1,15 @@ +"dataset_name": "nutritionist" +"description": "以下為營養師的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_other_tasks" +"include": "_default_template_yaml" +"task": "tmlu_nutritionist" +"task_alias": "nutritionist" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_taiwan_tourist_resources.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_taiwan_tourist_resources.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6a1fc7b26ace1e95c2e1df92c26cc41c12d4632e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_taiwan_tourist_resources.yaml @@ -0,0 +1,15 @@ +"dataset_name": "taiwan_tourist_resources" +"description": "以下為台灣觀光資源的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_taiwan_specific" +"include": "_default_template_yaml" +"task": "tmlu_taiwan_tourist_resources" +"task_alias": "taiwan tourist resources" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_teacher_qualification.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_teacher_qualification.yaml new file mode 100644 index 0000000000000000000000000000000000000000..987c2d7d92199355c1158111391a24d983353881 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_teacher_qualification.yaml @@ -0,0 +1,15 @@ +"dataset_name": "teacher_qualification" +"description": "以下為教師資格的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_taiwan_specific" +"include": "_default_template_yaml" +"task": "tmlu_teacher_qualification" +"task_alias": "teacher qualification" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_tour_guide.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_tour_guide.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c3a759ca53fd6024852688c12dc123e587e55ff6 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_tour_guide.yaml @@ -0,0 +1,15 @@ +"dataset_name": "tour_guide" +"description": "以下為導遊的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_humanities_tasks" +"include": "_default_template_yaml" +"task": "tmlu_tour_guide" +"task_alias": "tour guide" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_tour_leader.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_tour_leader.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d8a607f656db47647cd4e35338bbf8f78af72240 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/tmlu_tour_leader.yaml @@ -0,0 +1,15 @@ +"dataset_name": "tour_leader" +"description": "以下為領隊的單選題,請提供正確答案的選項。\n\n" +"doc_to_choice": +- "A" +- "B" +- "C" +- "D" +"doc_to_text": "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\n\ + D. {{choices[3]}}{% if choices is defined and choices|length > 4 %}\nE. {{choices[4]}}{%\ + \ endif %}{% if choices is defined and choices|length > 5 %}\nF. {{choices[5]}}{%\ + \ endif %}\nAnswer:" +"tag": "tmlu_humanities_tasks" +"include": "_default_template_yaml" +"task": "tmlu_tour_leader" +"task_alias": "tour leader" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/utils.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..8bdfd6db5ad9f6870d784309a338f52bf3bec0e6 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/default/utils.py @@ -0,0 +1,23 @@ +import datasets + + +def process_docs(dataset: datasets.Dataset) -> datasets.Dataset: + def _helper(doc): + # modifies the contents of a single + # document in our dataset. + answer_list = ["A", "B", "C", "D"] + choices = [doc["A"], doc["B"], doc["C"], doc["D"]] + if doc.get("E", None): + answer_list.append("E") + choices.append(doc["E"]) + if doc.get("F", None): + answer_list.append("F") + choices.append(doc["F"]) + out_doc = { + "questions": doc["question"], + "choices": choices, + "goal": answer_list.index(doc["answer"]), + } + return out_doc + + return dataset.map(_helper) # returns back a datasets.Dataset object diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/subject.tsv b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/subject.tsv new file mode 100644 index 0000000000000000000000000000000000000000..17c39cfb898c56ebbb1246e35c924c2d192da0e7 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmlu/subject.tsv @@ -0,0 +1,38 @@ +category subject name # Questions # Choices +civics AST_civics 分科測驗公民 57 4 +geography AST_geography 分科測驗地理 58 4 +civics CAP_civics 會考公民 73 4 +geography CAP_geography 會考地理 45 4 +civics GSAT_civics 學測公民 73 4 +geography GSAT_geography 學測地理 49 4 +accounting accountant 會計師 117 4 +psychologist clinical_psychologist 臨床心理師 117 4 +biology AST_biology 分科測驗生物 40 4 +chemistry AST_chemistry 分科測驗化學 34 5 +mathematics AST_mathematics 分科測驗數學 25 5 +physics AST_physics 分科測驗物理 43 5 +biology CAP_biology 會考生物 27 4 +chemistry CAP_chemistry 會考化學 27 4 +earth science CAP_earth_science 會考地球科學 15 4 +mathematics CAP_mathematics 會考數學 115 4 +physics CAP_physics 會考物理 15 4 +biology GSAT_biology 學測生物 21 5 +chemistry GSAT_chemistry 學測化學 29 5 +earth science GSAT_earth_science 學測地球科學 24 5 +mathematics GSAT_mathematics 學測數學 29 5 +physics GSAT_physics 學測物理 24 5 +Chinese AST_chinese 分科測驗國文 131 4 +history AST_history 分科測驗歷史 56 4 +Chinese CAP_chinese 會考國文 61 4 +history CAP_history 會考歷史 56 4 +Chinese GSAT_chinese 學測國文 97 4 +history GSAT_history 學測歷史 85 4 +Tour tour_guide 導遊 99 4 +Tour tour_leader 領隊 145 4 +law lawyer_qualification 律師資格 279 4 +Taiwan Specific driving_rule 台灣駕駛規則 432 4 +Taiwan Specific teacher_qualification 教師資格 75 4 +Taiwan Specific taiwan_tourist_resources 台灣觀光資源 50 4 +Medicine basic_traditional_chinese_medicine 中醫基礎醫學 159 4 +Medicine clinical_traditional_chinese_medicine 中醫針灸 79 4 +Nutritionist nutritionist 營養師 120 4 diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/README.md b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e4be02eb8928f255e8a63b0864595407308bf8ed --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/README.md @@ -0,0 +1,47 @@ +# TMMLU+ + +### Paper + +Title: `An Improved Traditional Chinese Evaluation Suite for Foundation Model` + +Abstract: `We present TMMLU+, a comprehensive dataset designed for the Traditional Chinese massive multitask language understanding dataset. TMMLU+ is a multiple-choice question-answering dataset with 66 subjects from elementary to professional level. Compared to its predecessor, TMMLU, TMMLU+ is six times larger and boasts a more balanced subject distribution. We included benchmark results in TMMLU+ from closed-source models and 24 open-weight Chinese large language models of parameters ranging from 1.8B to 72B. Our findings reveal that Traditional Chinese models still trail behind their Simplified Chinese counterparts. Additionally, current large language models have yet to outperform human performance in average scores. We publicly release our dataset and the corresponding benchmark source code.` + + +Homepage: [https://huggingface.co/datasets/ikala/tmmluplus](https://huggingface.co/datasets/ikala/tmmluplus) + + +### Citation + +``` +@article{ikala2024improved, + title={An Improved Traditional Chinese Evaluation Suite for Foundation Model}, + author={Tam, Zhi-Rui and Pai, Ya-Ting and Lee, Yen-Wei and Cheng, Sega and Shuai, Hong-Han}, + journal={arXiv preprint arXiv:2403.01858}, + year={2024} +} +``` + +### Groups and Tasks + +#### Groups + +* `tmmluplus`: `The dataset comprises 22,690 multiple-choice questions from 66 subjects ranging from primary to professional level. ` + +#### Tasks + +The following tasks evaluate subjects in the TMMLU+ dataset using loglikelihood-based multiple-choice scoring: + +* `tmmluplus_{subject_english}` + +### Checklist + +For adding novel benchmarks/datasets to the library: +* [x] Is the task an existing benchmark in the literature? + * [x] Have you referenced the original paper that introduced the task? + * [x] If yes, does the original paper provide a reference implementation? If so, have you checked against the reference implementation and documented how to run such a test? + + +If other tasks on this dataset are already supported: +* [x] Is the "Main" variant of this task clearly denoted? +* [x] Have you provided a short sentence in a README on what each new variant adds / evaluates? +* [x] Have you noted which, if any, published evaluation setups are matched by this variant? diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_generate_configs.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_generate_configs.py new file mode 100644 index 0000000000000000000000000000000000000000..06ef7a710fc1b0a617494594ecbbb6908f235325 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_generate_configs.py @@ -0,0 +1,211 @@ +""" +Take in a YAML, and output all "other" splits with this YAML +""" + +import argparse +import os + +import pandas as pd +import yaml +from tqdm import tqdm + + +# Copy from https://github.com/iKala/ievals/blob/main/ievals/settings.py +# from TMMLU+ official example +categories = { + "STEM": [ + "physics", + "chemistry", + "biology", + "computer science", + "math", + "engineering", + ], + "humanities": ["history", "philosophy", "law"], + "social_sciences": [ + "politics", + "culture", + "economics", + "geography", + "psychology", + "education", + ], + "other": ["other", "business", "health"], # (business, health, misc.) +} + +task_list = [ + "engineering_math", + "dentistry", + "traditional_chinese_medicine_clinical_medicine", + "clinical_psychology", + "technical", + "culinary_skills", + "mechanical", + "logic_reasoning", + "real_estate", + "general_principles_of_law", + "finance_banking", + "anti_money_laundering", + "ttqav2", + "marketing_management", + "business_management", + "organic_chemistry", + "advance_chemistry", + "physics", + "secondary_physics", + "human_behavior", + "national_protection", + "jce_humanities", + "politic_science", + "agriculture", + "official_document_management", + "financial_analysis", + "pharmacy", + "educational_psychology", + "statistics_and_machine_learning", + "management_accounting", + "introduction_to_law", + "computer_science", + "veterinary_pathology", + "accounting", + "fire_science", + "optometry", + "insurance_studies", + "pharmacology", + "taxation", + "education_(profession_level)", + "economics", + "veterinary_pharmacology", + "nautical_science", + "occupational_therapy_for_psychological_disorders", + "trust_practice", + "geography_of_taiwan", + "physical_education", + "auditing", + "administrative_law", + "basic_medical_science", + "macroeconomics", + "trade", + "chinese_language_and_literature", + "tve_design", + "junior_science_exam", + "junior_math_exam", + "junior_chinese_exam", + "junior_social_studies", + "tve_mathematics", + "tve_chinese_language", + "tve_natural_sciences", + "junior_chemistry", + "music", + "education", + "three_principles_of_people", + "taiwanese_hokkien", +] +subject2name = {} +# subject2category = {} +SUBJECTS = {} + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument("--base_yaml_path", required=True) + parser.add_argument("--save_prefix_path", default="tmmluplus") + parser.add_argument("--cot_prompt_path", default=None) + parser.add_argument("--task_prefix", default="") + parser.add_argument("--group_prefix", default="") + parser.add_argument("--subject_file", default="subject.tsv") + return parser.parse_args() + + +if __name__ == "__main__": + args = parse_args() + from pathlib import Path + + # Initialization + SUBJECT_FILE = Path(__file__).parent / Path(args.subject_file) + + df = pd.read_csv(SUBJECT_FILE, delimiter="\t") + + for _, row in df.iterrows(): + for _c in categories: + if row["subject"] in SUBJECTS: + raise ValueError("Duplicate tasks.") + if row["category"] in categories[_c]: # append new item into SUBJECTS + SUBJECTS[row["subject"]] = _c + subject2name[row["subject"]] = row["name"] + break + # End of SUBJECTS initialization + + # get filename of base_yaml so we can `"include": ` it in our "other" YAMLs. + base_yaml_name = os.path.split(args.base_yaml_path)[-1] + with open(args.base_yaml_path) as f: + base_yaml = yaml.full_load(f) + + if args.cot_prompt_path is not None: + import json + + with open(args.cot_prompt_path) as f: + cot_file = json.load(f) + + ALL_CATEGORIES = [] + for subject, category in tqdm(SUBJECTS.items()): + if category not in ALL_CATEGORIES: + ALL_CATEGORIES.append(category) + + if args.cot_prompt_path is not None: + description = cot_file[subject] + else: + name_of_subject = subject2name[subject].replace("_", " ") + description = f"以下為{name_of_subject}的單選題,請提供正確答案的選項。\n\n" + # description = f"The following are multiple choice questions (with answers) about {' '.join(subject.split('_'))}.\n\n" + + yaml_dict = { + "include": base_yaml_name, + "group": f"tmmluplus_{args.task_prefix}_{category}" + if args.task_prefix != "" + else f"tmmluplus_{category}", + "group_alias": category.replace("_", " "), + "task": f"tmmluplus_{args.task_prefix}_{subject}" + if args.task_prefix != "" + else f"tmmluplus_{subject}", + "task_alias": subject.replace("_", " "), + "dataset_name": subject, + "description": description, + } + + file_save_path = args.save_prefix_path + f"_{subject}.yaml" + # eval_logger.info(f"Saving yaml for subset {subject} to {file_save_path}") + with open(file_save_path, "w") as yaml_file: + yaml.dump( + yaml_dict, + yaml_file, + # width=float("inf"), + allow_unicode=True, + default_style='"', + ) + + if args.task_prefix != "": + mmlu_subcategories = [ + f"tmmluplus_{args.task_prefix}_{category}" for category in ALL_CATEGORIES + ] + else: + mmlu_subcategories = [f"tmmluplus_{category}" for category in ALL_CATEGORIES] + + if args.group_prefix != "": + file_save_path = args.group_prefix + ".yaml" + else: + file_save_path = args.save_prefix_path + ".yaml" + + # eval_logger.info(f"Saving benchmark config to {file_save_path}") + with open(file_save_path, "w") as yaml_file: + yaml.dump( + { + "group": f"tmmluplus_{args.task_prefix}" + if args.task_prefix != "" + else "tmmluplus", + "task": mmlu_subcategories, + }, + yaml_file, + indent=4, + default_flow_style=False, + ) diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus.yaml new file mode 100644 index 0000000000000000000000000000000000000000..45208d4dc21992a90222ae00561dfb71ed7e1fff --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus.yaml @@ -0,0 +1,13 @@ +group: tmmluplus +task: +- tmmluplus_other +- tmmluplus_social_sciences +- tmmluplus_humanities +- tmmluplus_STEM +aggregate_metric_list: + - metric: acc + weight_by_size: True + - metric: acc_norm + weight_by_size: True +metadata: + version: 2.0 diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_STEM.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_STEM.yaml new file mode 100644 index 0000000000000000000000000000000000000000..47f81f5085e49cffb750fddc396d5835eca59a55 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_STEM.yaml @@ -0,0 +1,10 @@ +group: tmmluplus_STEM +task: +- tmmluplus_STEM_tasks +aggregate_metric_list: + - metric: acc + weight_by_size: True + - metric: acc_norm + weight_by_size: True +metadata: + version: 2.0 diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_humanities.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_humanities.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1cd42f88dd18bc96190a1054525f5517e4129659 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_humanities.yaml @@ -0,0 +1,10 @@ +group: tmmluplus_humanities +task: +- tmmluplus_humanities_tasks +aggregate_metric_list: + - metric: acc + weight_by_size: True + - metric: acc_norm + weight_by_size: True +metadata: + version: 2.0 diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_other.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_other.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2b679ef414696383c56540d5749ea55776351447 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_other.yaml @@ -0,0 +1,10 @@ +group: tmmluplus_other +task: +- tmmluplus_other_tasks +aggregate_metric_list: + - metric: acc + weight_by_size: True + - metric: acc_norm + weight_by_size: True +metadata: + version: 2.0 diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_social_sciences.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_social_sciences.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a219550bbc94b85a3636fca0a62eff298fc4b34e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_social_sciences.yaml @@ -0,0 +1,10 @@ +group: tmmluplus_social_sciences +task: +- tmmluplus_social_sciences_tasks +aggregate_metric_list: + - metric: acc + weight_by_size: True + - metric: acc_norm + weight_by_size: True +metadata: + version: 2.0 diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_template_yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_template_yaml new file mode 100644 index 0000000000000000000000000000000000000000..c03cfb1b37289875d64e0879ede1cf3e6fc35cff --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/_tmmluplus_template_yaml @@ -0,0 +1,19 @@ +dataset_path: ZoneTwelve/tmmluplus # a copy of `ikala/tmmluplus` +test_split: test +fewshot_split: train +fewshot_config: + sampler: first_n +output_type: multiple_choice +process_docs: !function utils.process_docs +doc_to_text: "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\nD. {{choices[3]}}\nAnswer:" +doc_to_choice: ["A", "B", "C", "D"] +doc_to_target: answer +metric_list: + - metric: acc + aggregation: mean + higher_is_better: true + - metric: acc_norm + aggregation: mean + higher_is_better: true +metadata: + version: 2.0 diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_accounting.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_accounting.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c6ee4a50265190a2c0fd8384b13745d429e19cdc --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_accounting.yaml @@ -0,0 +1,6 @@ +"dataset_name": "accounting" +"description": "以下為會計學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_accounting" +"task_alias": "accounting" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_administrative_law.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_administrative_law.yaml new file mode 100644 index 0000000000000000000000000000000000000000..369578366023eb46b63946945e36be0211db1321 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_administrative_law.yaml @@ -0,0 +1,6 @@ +"dataset_name": "administrative_law" +"description": "以下為行政法的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_humanities_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_administrative_law" +"task_alias": "administrative law" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_advance_chemistry.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_advance_chemistry.yaml new file mode 100644 index 0000000000000000000000000000000000000000..549b3cc864e865e01ab9e907685658028dcc04a1 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_advance_chemistry.yaml @@ -0,0 +1,6 @@ +"dataset_name": "advance_chemistry" +"description": "以下為化學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_advance_chemistry" +"task_alias": "advance chemistry" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_agriculture.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_agriculture.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8ef2912690613d4dcd5fdfb5a2dd4869b9bb1405 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_agriculture.yaml @@ -0,0 +1,6 @@ +"dataset_name": "agriculture" +"description": "以下為農業的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_agriculture" +"task_alias": "agriculture" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_anti_money_laundering.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_anti_money_laundering.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7f8d873f49b2a7b3cd6e07111a9f9ae63129b44b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_anti_money_laundering.yaml @@ -0,0 +1,6 @@ +"dataset_name": "anti_money_laundering" +"description": "以下為洗錢防制的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_humanities_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_anti_money_laundering" +"task_alias": "anti money laundering" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_auditing.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_auditing.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e5c598b7e36beec102c5672a235afb8f650918f9 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_auditing.yaml @@ -0,0 +1,6 @@ +"dataset_name": "auditing" +"description": "以下為審計學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_auditing" +"task_alias": "auditing" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_basic_medical_science.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_basic_medical_science.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6c6db6aab8638b8e15e29d9c28d44b04115fb0a1 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_basic_medical_science.yaml @@ -0,0 +1,6 @@ +"dataset_name": "basic_medical_science" +"description": "以下為基礎醫學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_basic_medical_science" +"task_alias": "basic medical science" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_business_management.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_business_management.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e8377ee3f5dc035017284820968d9842a131ed27 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_business_management.yaml @@ -0,0 +1,6 @@ +"dataset_name": "business_management" +"description": "以下為企業管理的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_business_management" +"task_alias": "business management" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_chinese_language_and_literature.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_chinese_language_and_literature.yaml new file mode 100644 index 0000000000000000000000000000000000000000..53a8d652adec28c21c5aa6c23be04d4aaf72302a --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_chinese_language_and_literature.yaml @@ -0,0 +1,6 @@ +"dataset_name": "chinese_language_and_literature" +"description": "以下為國文的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_chinese_language_and_literature" +"task_alias": "chinese language and literature" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_clinical_psychology.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_clinical_psychology.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7753e2a0961a9d557c6804aa0a1827052cee50c1 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_clinical_psychology.yaml @@ -0,0 +1,6 @@ +"dataset_name": "clinical_psychology" +"description": "以下為臨床心理學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_clinical_psychology" +"task_alias": "clinical psychology" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_computer_science.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_computer_science.yaml new file mode 100644 index 0000000000000000000000000000000000000000..00949ddc4d9f48d617d28650e81f84072109b55b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_computer_science.yaml @@ -0,0 +1,6 @@ +"dataset_name": "computer_science" +"description": "以下為資訊工程的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_computer_science" +"task_alias": "computer science" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_culinary_skills.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_culinary_skills.yaml new file mode 100644 index 0000000000000000000000000000000000000000..92f1109829f694d9166892d405f7e9f5548fb678 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_culinary_skills.yaml @@ -0,0 +1,6 @@ +"dataset_name": "culinary_skills" +"description": "以下為餐旅的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_culinary_skills" +"task_alias": "culinary skills" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_dentistry.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_dentistry.yaml new file mode 100644 index 0000000000000000000000000000000000000000..836a9c129eb4b682b3f11c6779ea353bdd5fcc67 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_dentistry.yaml @@ -0,0 +1,6 @@ +"dataset_name": "dentistry" +"description": "以下為牙醫學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_dentistry" +"task_alias": "dentistry" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_economics.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_economics.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8665c62f8745cbb534af35b6e55d3c9eaa0e331c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_economics.yaml @@ -0,0 +1,6 @@ +"dataset_name": "economics" +"description": "以下為經濟學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_economics" +"task_alias": "economics" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_education.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_education.yaml new file mode 100644 index 0000000000000000000000000000000000000000..46f230cdbac9836b4ed61f7348cbcf94b2310c3c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_education.yaml @@ -0,0 +1,6 @@ +"dataset_name": "education" +"description": "以下為教育常識的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_education" +"task_alias": "education" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_education_(profession_level).yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_education_(profession_level).yaml new file mode 100644 index 0000000000000000000000000000000000000000..281654c506644a96d4b70b58f607e7c799c25e1b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_education_(profession_level).yaml @@ -0,0 +1,6 @@ +"dataset_name": "education_(profession_level)" +"description": "以下為教育專業的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_education_(profession_level)" +"task_alias": "education (profession level)" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_educational_psychology.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_educational_psychology.yaml new file mode 100644 index 0000000000000000000000000000000000000000..be1c2c8a739296482eb7776ab9731c768f502576 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_educational_psychology.yaml @@ -0,0 +1,6 @@ +"dataset_name": "educational_psychology" +"description": "以下為教育心理的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_educational_psychology" +"task_alias": "educational psychology" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_engineering_math.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_engineering_math.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a8a35e1c74533c99a5bc8c45ac92032fe232a875 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_engineering_math.yaml @@ -0,0 +1,6 @@ +"dataset_name": "engineering_math" +"description": "以下為工程數學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_engineering_math" +"task_alias": "engineering math" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_finance_banking.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_finance_banking.yaml new file mode 100644 index 0000000000000000000000000000000000000000..465c1d74d695263852d3d1f3493e47c62b77bff9 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_finance_banking.yaml @@ -0,0 +1,6 @@ +"dataset_name": "finance_banking" +"description": "以下為金融與法規的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_finance_banking" +"task_alias": "finance banking" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_financial_analysis.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_financial_analysis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..647189c668702739a99dbe5ee8af56098b23a05d --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_financial_analysis.yaml @@ -0,0 +1,6 @@ +"dataset_name": "financial_analysis" +"description": "以下為財務分析的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_financial_analysis" +"task_alias": "financial analysis" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_fire_science.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_fire_science.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9b78539c6adadb6c71b8689ff03ea503aad82c08 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_fire_science.yaml @@ -0,0 +1,6 @@ +"dataset_name": "fire_science" +"description": "以下為火災學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_fire_science" +"task_alias": "fire science" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_general_principles_of_law.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_general_principles_of_law.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8213106bf0d7457ae699582d56239c6f9aabf709 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_general_principles_of_law.yaml @@ -0,0 +1,6 @@ +"dataset_name": "general_principles_of_law" +"description": "以下為法學大意的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_humanities_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_general_principles_of_law" +"task_alias": "general principles of law" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_geography_of_taiwan.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_geography_of_taiwan.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ae24c2e108c07a726075ceefdede64bcbf69144e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_geography_of_taiwan.yaml @@ -0,0 +1,6 @@ +"dataset_name": "geography_of_taiwan" +"description": "以下為台灣地理的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_geography_of_taiwan" +"task_alias": "geography of taiwan" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_human_behavior.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_human_behavior.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bb2fa7231c074535203632a475b504f58778a5fc --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_human_behavior.yaml @@ -0,0 +1,6 @@ +"dataset_name": "human_behavior" +"description": "以下為人類行為與社會的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_human_behavior" +"task_alias": "human behavior" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_insurance_studies.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_insurance_studies.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5d1abf7801cb2d58432a845a589cf78b422de750 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_insurance_studies.yaml @@ -0,0 +1,6 @@ +"dataset_name": "insurance_studies" +"description": "以下為保險學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_insurance_studies" +"task_alias": "insurance studies" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_introduction_to_law.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_introduction_to_law.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ddbd488952c34b42d4afd6d7fc88551a73c65672 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_introduction_to_law.yaml @@ -0,0 +1,6 @@ +"dataset_name": "introduction_to_law" +"description": "以下為法律概論的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_humanities_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_introduction_to_law" +"task_alias": "introduction to law" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_jce_humanities.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_jce_humanities.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b70bcdd3db414935ed8e33e6db57d26638182bc6 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_jce_humanities.yaml @@ -0,0 +1,6 @@ +"dataset_name": "jce_humanities" +"description": "以下為指考人文科目的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_humanities_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_jce_humanities" +"task_alias": "jce humanities" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_chemistry.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_chemistry.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3c43b6b638d1fca8f1384b863a51a09bf59f92ab --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_chemistry.yaml @@ -0,0 +1,6 @@ +"dataset_name": "junior_chemistry" +"description": "以下為國中理化的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_junior_chemistry" +"task_alias": "junior chemistry" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_chinese_exam.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_chinese_exam.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ac68698b68dd8668339567f0232b3b72a4cc9816 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_chinese_exam.yaml @@ -0,0 +1,6 @@ +"dataset_name": "junior_chinese_exam" +"description": "以下為國中會考基測國文的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_junior_chinese_exam" +"task_alias": "junior chinese exam" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_math_exam.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_math_exam.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bc72e5e09664117197e0ef49cb520c24925509c7 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_math_exam.yaml @@ -0,0 +1,6 @@ +"dataset_name": "junior_math_exam" +"description": "以下為國中會考基測數學科的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_junior_math_exam" +"task_alias": "junior math exam" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_science_exam.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_science_exam.yaml new file mode 100644 index 0000000000000000000000000000000000000000..740e674e6cab498ca4337e08ead2e1c55bd80eb4 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_science_exam.yaml @@ -0,0 +1,6 @@ +"dataset_name": "junior_science_exam" +"description": "以下為國中會考基測自然科的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_junior_science_exam" +"task_alias": "junior science exam" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_social_studies.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_social_studies.yaml new file mode 100644 index 0000000000000000000000000000000000000000..54472b09e70344e88794933ea1f6e30242707ab6 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_junior_social_studies.yaml @@ -0,0 +1,6 @@ +"dataset_name": "junior_social_studies" +"description": "以下為國中會考基測社會科的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_junior_social_studies" +"task_alias": "junior social studies" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_linear_algebra.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_linear_algebra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..762bdfc0da1dfa7d388609c0ae8bfcedf0153cfd --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_linear_algebra.yaml @@ -0,0 +1,6 @@ +"dataset_name": "linear_algebra" +"description": "以下為線代的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_linear_algebra" +"task_alias": "linear algebra" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_logic_reasoning.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_logic_reasoning.yaml new file mode 100644 index 0000000000000000000000000000000000000000..58fdc83f0294d00ceb4e67bad0171f444dbb2622 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_logic_reasoning.yaml @@ -0,0 +1,6 @@ +"dataset_name": "logic_reasoning" +"description": "以下為邏輯思維的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_logic_reasoning" +"task_alias": "logic reasoning" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_macroeconomics.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_macroeconomics.yaml new file mode 100644 index 0000000000000000000000000000000000000000..81984475d3d026a6cbfa26d3a1053166ba84849a --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_macroeconomics.yaml @@ -0,0 +1,6 @@ +"dataset_name": "macroeconomics" +"description": "以下為總經的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_macroeconomics" +"task_alias": "macroeconomics" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_management_accounting.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_management_accounting.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fd77179d652fdfb15ec7ac6c0d4a56cd5f18ac1d --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_management_accounting.yaml @@ -0,0 +1,6 @@ +"dataset_name": "management_accounting" +"description": "以下為管理會計的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_management_accounting" +"task_alias": "management accounting" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_marketing_management.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_marketing_management.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f903c4b6f0c2d8a32dd220b83c9b651964cbab0c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_marketing_management.yaml @@ -0,0 +1,6 @@ +"dataset_name": "marketing_management" +"description": "以下為行銷管理的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_marketing_management" +"task_alias": "marketing management" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_mechanical.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_mechanical.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5300cc1d9164a733501c9b2bc2fa5454e335b1bc --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_mechanical.yaml @@ -0,0 +1,6 @@ +"dataset_name": "mechanical" +"description": "以下為機械與機電概論的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_mechanical" +"task_alias": "mechanical" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_music.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_music.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b0e62badf688275692ace02e19c33352069210e7 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_music.yaml @@ -0,0 +1,6 @@ +"dataset_name": "music" +"description": "以下為音樂科的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_music" +"task_alias": "music" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_national_protection.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_national_protection.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4ae2953b1f1e5b29d2ba1a62ec88f8b456b9ac9f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_national_protection.yaml @@ -0,0 +1,6 @@ +"dataset_name": "national_protection" +"description": "以下為軍事的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_national_protection" +"task_alias": "national protection" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_nautical_science.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_nautical_science.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1be4cf1d6f722dd6afe2530b78a60d9da75c9fc6 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_nautical_science.yaml @@ -0,0 +1,6 @@ +"dataset_name": "nautical_science" +"description": "以下為航海的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_nautical_science" +"task_alias": "nautical science" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_occupational_therapy_for_psychological_disorders.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_occupational_therapy_for_psychological_disorders.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5f6f33956e05428d2a19abe1ef333fea0089a94f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_occupational_therapy_for_psychological_disorders.yaml @@ -0,0 +1,6 @@ +"dataset_name": "occupational_therapy_for_psychological_disorders" +"description": "以下為心理障礙職能治療學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_occupational_therapy_for_psychological_disorders" +"task_alias": "occupational therapy for psychological disorders" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_official_document_management.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_official_document_management.yaml new file mode 100644 index 0000000000000000000000000000000000000000..16617d2f546b4ddb1798c934acccc917bd102958 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_official_document_management.yaml @@ -0,0 +1,6 @@ +"dataset_name": "official_document_management" +"description": "以下為機關文書的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_official_document_management" +"task_alias": "official document management" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_optometry.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_optometry.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ccec870859049fb81b55fe7ed1e8b1db6e4cec09 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_optometry.yaml @@ -0,0 +1,6 @@ +"dataset_name": "optometry" +"description": "以下為視光學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_optometry" +"task_alias": "optometry" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_organic_chemistry.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_organic_chemistry.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8f1a8cce0c194860f69bf0ba4c63184771532162 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_organic_chemistry.yaml @@ -0,0 +1,6 @@ +"dataset_name": "organic_chemistry" +"description": "以下為有機化學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_organic_chemistry" +"task_alias": "organic chemistry" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_pharmacology.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_pharmacology.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f42435e585be06b91cc9dc0c017e21df21ca4cce --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_pharmacology.yaml @@ -0,0 +1,6 @@ +"dataset_name": "pharmacology" +"description": "以下為藥理學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_pharmacology" +"task_alias": "pharmacology" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_pharmacy.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_pharmacy.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4cb8e83f22b9f21f260fe444221d5f9e2feccbac --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_pharmacy.yaml @@ -0,0 +1,6 @@ +"dataset_name": "pharmacy" +"description": "以下為藥劑學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_pharmacy" +"task_alias": "pharmacy" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_physical_education.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_physical_education.yaml new file mode 100644 index 0000000000000000000000000000000000000000..af762327bb64b1b41a1aea9d3d7a780950625bb2 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_physical_education.yaml @@ -0,0 +1,6 @@ +"dataset_name": "physical_education" +"description": "以下為體育的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_physical_education" +"task_alias": "physical education" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_physics.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_physics.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c9d4e16b34c8431cc59908fa9d4ac3c4219b3e84 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_physics.yaml @@ -0,0 +1,6 @@ +"dataset_name": "physics" +"description": "以下為物理的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_physics" +"task_alias": "physics" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_politic_science.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_politic_science.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9ebbdb242b4f8d2717722dd0f23acee5f72a8bf8 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_politic_science.yaml @@ -0,0 +1,6 @@ +"dataset_name": "politic_science" +"description": "以下為政治的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_politic_science" +"task_alias": "politic science" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_real_estate.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_real_estate.yaml new file mode 100644 index 0000000000000000000000000000000000000000..971557b53173283967197e657fcb10ce54b6ac24 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_real_estate.yaml @@ -0,0 +1,6 @@ +"dataset_name": "real_estate" +"description": "以下為房地產的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_real_estate" +"task_alias": "real estate" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_secondary_physics.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_secondary_physics.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1660fc6d5b544c8f7085be241c3f9fad1d2091f8 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_secondary_physics.yaml @@ -0,0 +1,6 @@ +"dataset_name": "secondary_physics" +"description": "以下為高中物理的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_secondary_physics" +"task_alias": "secondary physics" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_statistics_and_machine_learning.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_statistics_and_machine_learning.yaml new file mode 100644 index 0000000000000000000000000000000000000000..252496cf6399cbe166f7d9ba8cf64a2bfac9ba2d --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_statistics_and_machine_learning.yaml @@ -0,0 +1,6 @@ +"dataset_name": "statistics_and_machine_learning" +"description": "以下為統計與機器學習的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_statistics_and_machine_learning" +"task_alias": "statistics and machine learning" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_taiwanese_hokkien.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_taiwanese_hokkien.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2977a1674a791406c1ced974cb6b986403ed8279 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_taiwanese_hokkien.yaml @@ -0,0 +1,6 @@ +"dataset_name": "taiwanese_hokkien" +"description": "以下為閩南語的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_taiwanese_hokkien" +"task_alias": "taiwanese hokkien" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_taxation.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_taxation.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c382b8c84011189911b54330218518907793cdde --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_taxation.yaml @@ -0,0 +1,6 @@ +"dataset_name": "taxation" +"description": "以下為稅務的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_humanities_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_taxation" +"task_alias": "taxation" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_technical.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_technical.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b4621a4e491c6875b1c4bbd07de7be82f7760057 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_technical.yaml @@ -0,0 +1,6 @@ +"dataset_name": "technical" +"description": "以下為技術工相關的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_technical" +"task_alias": "technical" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_three_principles_of_people.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_three_principles_of_people.yaml new file mode 100644 index 0000000000000000000000000000000000000000..83a3628ddf3d3ec4d697e00be6ccbe5552726d5b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_three_principles_of_people.yaml @@ -0,0 +1,6 @@ +"dataset_name": "three_principles_of_people" +"description": "以下為三民主義的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_three_principles_of_people" +"task_alias": "three principles of people" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_trade.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_trade.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7eacf4dca0b88a1bf180fa54f52afb089c083d00 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_trade.yaml @@ -0,0 +1,6 @@ +"dataset_name": "trade" +"description": "以下為貿易的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_trade" +"task_alias": "trade" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_traditional_chinese_medicine_clinical_medicine.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_traditional_chinese_medicine_clinical_medicine.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7d626dd26aab6593ed5aa64bc837cb538703dac0 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_traditional_chinese_medicine_clinical_medicine.yaml @@ -0,0 +1,6 @@ +"dataset_name": "traditional_chinese_medicine_clinical_medicine" +"description": "以下為中醫臨床醫學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_traditional_chinese_medicine_clinical_medicine" +"task_alias": "traditional chinese medicine clinical medicine" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_trust_practice.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_trust_practice.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f4b3a010fc1eaf813720b98b9d48c0b769305de0 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_trust_practice.yaml @@ -0,0 +1,6 @@ +"dataset_name": "trust_practice" +"description": "以下為信託實務的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_humanities_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_trust_practice" +"task_alias": "trust practice" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_ttqav2.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_ttqav2.yaml new file mode 100644 index 0000000000000000000000000000000000000000..95a10411804ba04722fb385d35fc375f42686270 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_ttqav2.yaml @@ -0,0 +1,6 @@ +"dataset_name": "ttqav2" +"description": "以下為台灣在地用語的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_ttqav2" +"task_alias": "ttqav2" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_tve_chinese_language.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_tve_chinese_language.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a86600882a0f9a164dcb89ec2dfbe78f7c655683 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_tve_chinese_language.yaml @@ -0,0 +1,6 @@ +"dataset_name": "tve_chinese_language" +"description": "以下為統測國文的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_social_sciences_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_tve_chinese_language" +"task_alias": "tve chinese language" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_tve_design.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_tve_design.yaml new file mode 100644 index 0000000000000000000000000000000000000000..01a27149e5124eeb22ca79e41d97bf0b8aac60f1 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_tve_design.yaml @@ -0,0 +1,6 @@ +"dataset_name": "tve_design" +"description": "以下為統測 設計的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_tve_design" +"task_alias": "tve design" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_tve_mathematics.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_tve_mathematics.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6240db295f2e63697de85e0e5e6baa0d7020352d --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_tve_mathematics.yaml @@ -0,0 +1,6 @@ +"dataset_name": "tve_mathematics" +"description": "以下為統測數學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_tve_mathematics" +"task_alias": "tve mathematics" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_tve_natural_sciences.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_tve_natural_sciences.yaml new file mode 100644 index 0000000000000000000000000000000000000000..833c47fc85d331f7f8b8efa3a06381697345d367 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_tve_natural_sciences.yaml @@ -0,0 +1,6 @@ +"dataset_name": "tve_natural_sciences" +"description": "以下為統測自然科的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_STEM_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_tve_natural_sciences" +"task_alias": "tve natural sciences" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_veterinary_pathology.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_veterinary_pathology.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c5a8edcb4eeadd262a4ee2ab5b41b19c821455bf --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_veterinary_pathology.yaml @@ -0,0 +1,6 @@ +"dataset_name": "veterinary_pathology" +"description": "以下為獸醫病理學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_veterinary_pathology" +"task_alias": "veterinary pathology" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_veterinary_pharmacology.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_veterinary_pharmacology.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b75b1f0075e8e9719c409a2f5053f1057d8d0f69 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/tmmluplus_veterinary_pharmacology.yaml @@ -0,0 +1,6 @@ +"dataset_name": "veterinary_pharmacology" +"description": "以下為獸醫藥理學的單選題,請提供正確答案的選項。\n\n" +"tag": "tmmluplus_other_tasks" +"include": "_tmmluplus_template_yaml" +"task": "tmmluplus_veterinary_pharmacology" +"task_alias": "veterinary pharmacology" diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/utils.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..e406d28293586763eaf73d4452a221ce97948041 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/default/utils.py @@ -0,0 +1,16 @@ +import datasets + + +def process_docs(dataset: datasets.Dataset) -> datasets.Dataset: + def _helper(doc): + # modifies the contents of a single + # document in our dataset. + answer_list = ["A", "B", "C", "D"] + out_doc = { + "questions": doc["question"], + "choices": [doc["A"], doc["B"], doc["C"], doc["D"]], + "goal": answer_list.index(doc["answer"]), + } + return out_doc + + return dataset.map(_helper) # returns back a datasets.Dataset object diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/subject.tsv b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/subject.tsv new file mode 100644 index 0000000000000000000000000000000000000000..4dc4b03e0feba9c62e64927f8fe2010327058141 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/tmmluplus/subject.tsv @@ -0,0 +1,68 @@ +subject name category +dentistry 牙醫學 health +traditional_chinese_medicine_clinical_medicine 中醫臨床醫學 health +clinical_psychology 臨床心理學 psychology +technical 技術工相關 other +culinary_skills 餐旅 other +mechanical 機械與機電概論 other +logic_reasoning 邏輯思維 other +real_estate 房地產 other +general_principles_of_law 法學大意 law +finance_banking 金融與法規 business +anti_money_laundering 洗錢防制 law +ttqav2 台灣在地用語 culture +marketing_management 行銷管理 other +business_management 企業管理 other +organic_chemistry 有機化學 chemistry +advance_chemistry 化學 chemistry +physics 物理 physics +secondary_physics 高中物理 physics +human_behavior 人類行為與社會 psychology +national_protection 軍事 politics +jce_humanities 指考人文科目 philosophy +linear_algebra 線代 math +politic_science 政治 politics +agriculture 農業 other +official_document_management 機關文書 other +financial_analysis 財務分析 business +pharmacy 藥劑學 biology +educational_psychology 教育心理 psychology +statistics_and_machine_learning 統計與機器學習 engineering +management_accounting 管理會計 business +introduction_to_law 法律概論 law +computer_science 資訊工程 computer science +veterinary_pathology 獸醫病理學 health +accounting 會計學 business +fire_science 火災學 other +optometry 視光學 other +insurance_studies 保險學 other +pharmacology 藥理學 health +taxation 稅務 law +education_(profession_level) 教育專業 education +economics 經濟學 economics +veterinary_pharmacology 獸醫藥理學 health +nautical_science 航海 other +occupational_therapy_for_psychological_disorders 心理障礙職能治療學 psychology +trust_practice 信託實務 law +geography_of_taiwan 台灣地理 geography +physical_education 體育 education +auditing 審計學 business +administrative_law 行政法 law +basic_medical_science 基礎醫學 biology +macroeconomics 總經 economics +trade 貿易 business +chinese_language_and_literature 國文 culture +tve_design 統測_設計 other +junior_science_exam 國中會考基測自然科 biology +junior_math_exam 國中會考基測數學科 math +junior_chinese_exam 國中會考基測國文 culture +junior_social_studies 國中會考基測社會科 other +tve_mathematics 統測數學 math +tve_chinese_language 統測國文 culture +tve_natural_sciences 統測自然科 biology +junior_chemistry 國中理化 chemistry +music 音樂科 other +education 教育常識 education +three_principles_of_people 三民主義 culture +taiwanese_hokkien 閩南語 culture +engineering_math 工程數學 math diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/20_newsgroups.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/20_newsgroups.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f2444bd24f9133737df0e9dfaa31b8755ffbd94f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/20_newsgroups.yaml @@ -0,0 +1,3 @@ +task: 20_newsgroups +include: unitxt +recipe: card=cards.20_newsgroups,template=templates.classification.multi_class.title diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/README.md b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1cfc850834c2255ea9bc1b8f08113b3e26fa42d2 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/README.md @@ -0,0 +1,77 @@ +# Unitxt + +### Paper + +Title: `Unitxt: Flexible, Shareable and Reusable Data Preparation and Evaluation for Generative AI` +Abstract: `https://arxiv.org/abs/2401.14019` + +Unitxt is a library for customizable textual data preparation and evaluation tailored to generative language models. Unitxt natively integrates with common libraries like HuggingFace and LM-eval-harness and deconstructs processing flows into modular components, enabling easy customization and sharing between practitioners. These components encompass model-specific formats, task prompts, and many other comprehensive dataset processing definitions. These components are centralized in the Unitxt-Catalog, thus fostering collaboration and exploration in modern textual data workflows. + +The full Unitxt catalog can be viewed in an online explorer. `https://unitxt.readthedocs.io/en/latest/docs/demo.html` + +Homepage: https://unitxt.readthedocs.io/en/latest/index.html + +### Citation + +``` +@misc{unitxt, + title={Unitxt: Flexible, Shareable and Reusable Data Preparation and Evaluation for Generative AI}, + author={Elron Bandel and Yotam Perlitz and Elad Venezian and Roni Friedman-Melamed and Ofir Arviv and Matan Orbach and Shachar Don-Yehyia and Dafna Sheinwald and Ariel Gera and Leshem Choshen and Michal Shmueli-Scheuer and Yoav Katz}, + year={2024}, + eprint={2401.14019}, + archivePrefix={arXiv}, + primaryClass={cs.CL} +} +``` + +### Groups and Tasks + +#### Groups + +* `unitxt`: Subset of Unitxt tasks that were not in LM-Eval Harness task catalog, including new types of tasks like multi-label classification, grammatical error correction, named entity extraction. + +#### Tasks + +The full list of Unitxt tasks currently supported can be seen under `tasks/unitxt` directory. + +### Adding tasks + +You can add additional tasks from the Unitxt catalog by generating new LM-Eval yaml files for these datasets. + +The Unitxt task yaml files are generated via the `generate_yamls.py` script in the `tasks/unitxt` directory. + +To add a yaml file for an existing dataset Unitxt which is not yet in LM-Eval: +1. Add the card name to the `unitxt_datasets` file in the `tasks/unitxt` directory. +2. The generate_yaml.py contains the default Unitxt [template](https://unitxt.readthedocs.io/en/latest/docs/adding_template.html) used for each kind of NLP task in the `default_template_per_task` dictionary. If the dataset is of a Unitxt task type, previously not used in LM-Eval, you will need to add a default template for it in the dictionary. + +``` +default_template_per_task = { + "tasks.classification.multi_label" : "templates.classification.multi_label.title" , + "tasks.classification.multi_class" : "templates.classification.multi_class.title" , + "tasks.summarization.abstractive" : "templates.summarization.abstractive.full", + "tasks.regression.two_texts" : "templates.regression.two_texts.simple", + "tasks.qa.with_context.extractive" : "templates.qa.with_context.simple", + "tasks.grammatical_error_correction" : "templates.grammatical_error_correction.simple", + "tasks.span_labeling.extraction" : "templates.span_labeling.extraction.title" +} +``` +3. Run `python generate_yaml.py` (this will generate all the datasets listed in the `unitxt_datasets`) + +If you want to add a new dataset to the Unitxt catalog, see the Unitxt documentation: + +https://unitxt.readthedocs.io/en/latest/docs/adding_dataset.html + + + +### Checklist + +For adding novel benchmarks/datasets to the library: +* [ ] Is the task an existing benchmark in the literature? + * [ ] Have you referenced the original paper that introduced the task? + * [ ] If yes, does the original paper provide a reference implementation? If so, have you checked against the reference implementation and documented how to run such a test? + + +If other tasks on this dataset are already supported: +* [ ] Is the "Main" variant of this task clearly denoted? +* [ ] Have you provided a short sentence in a README on what each new variant adds / evaluates? +* [ ] Have you noted which, if any, published evaluation setups are matched by this variant? diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/ag_news.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/ag_news.yaml new file mode 100644 index 0000000000000000000000000000000000000000..792ce0b4b48ee8f986ac5207b2b5821cc0e34800 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/ag_news.yaml @@ -0,0 +1,3 @@ +task: ag_news +include: unitxt +recipe: card=cards.ag_news,template=templates.classification.multi_class.title diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/argument_topic.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/argument_topic.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d04810cd49f1a7bf2f344a2d30e1a1f4faa2deba --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/argument_topic.yaml @@ -0,0 +1,3 @@ +task: argument_topic +include: unitxt +recipe: card=cards.argument_topic,template=templates.classification.multi_class.title diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/atis.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/atis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e9a26697accf1c623ac1cfbea228dda00167dc02 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/atis.yaml @@ -0,0 +1,3 @@ +task: atis +include: unitxt +recipe: card=cards.atis,template=templates.span_labeling.extraction.title diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/banking77.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/banking77.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6475575dd82439d4180ffa7a7b93d54cf9d8006c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/banking77.yaml @@ -0,0 +1,3 @@ +task: banking77 +include: unitxt +recipe: card=cards.banking77,template=templates.classification.multi_class.title diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/claim_stance_topic.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/claim_stance_topic.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2a2469d5ff78a6b5b4bc72ff6e867d94cf1ecee3 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/claim_stance_topic.yaml @@ -0,0 +1,3 @@ +task: claim_stance_topic +include: unitxt +recipe: card=cards.claim_stance_topic,template=templates.classification.multi_class.title diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/cnn_dailymail.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/cnn_dailymail.yaml new file mode 100644 index 0000000000000000000000000000000000000000..aa3748c806824bbca8ae8db40f7112db3bd877f3 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/cnn_dailymail.yaml @@ -0,0 +1,3 @@ +task: cnn_dailymail +include: unitxt +recipe: card=cards.cnn_dailymail,template=templates.summarization.abstractive.full diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/coedit_gec.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/coedit_gec.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4959064696816a22e7c084a45497b0670f796950 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/coedit_gec.yaml @@ -0,0 +1,3 @@ +task: coedit_gec +include: unitxt +recipe: card=cards.coedit_gec,template=templates.grammatical_error_correction.simple diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/dbpedia_14.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/dbpedia_14.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b26d65a72be22c2faae0080d4d5c223062e67d9a --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/dbpedia_14.yaml @@ -0,0 +1,3 @@ +task: dbpedia_14 +include: unitxt +recipe: card=cards.dbpedia_14,template=templates.classification.multi_class.title diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/ethos_binary.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/ethos_binary.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3976de43ace0048784a0c802777fd815976571ba --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/ethos_binary.yaml @@ -0,0 +1,3 @@ +task: ethos_binary +include: unitxt +recipe: card=cards.ethos_binary,template=templates.classification.multi_class.title diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/financial_tweets.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/financial_tweets.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7b4bb9e538238b2bd4fe7d11c31389a11fadbe7a --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/financial_tweets.yaml @@ -0,0 +1,3 @@ +task: financial_tweets +include: unitxt +recipe: card=cards.financial_tweets,template=templates.classification.multi_class.title diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/law_stack_exchange.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/law_stack_exchange.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d0c589a3d69da65256799d9c6f15cd4a48a7fadd --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/law_stack_exchange.yaml @@ -0,0 +1,3 @@ +task: law_stack_exchange +include: unitxt +recipe: card=cards.law_stack_exchange,template=templates.classification.multi_class.title diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/ledgar.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/ledgar.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1c31589764197998f0cc4bd89b256a9e7e83cd22 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/ledgar.yaml @@ -0,0 +1,3 @@ +task: ledgar +include: unitxt +recipe: card=cards.ledgar,template=templates.classification.multi_class.title diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/medical_abstracts.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/medical_abstracts.yaml new file mode 100644 index 0000000000000000000000000000000000000000..74cfef0b685d5c4f583e379df107ed404ae81aed --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/medical_abstracts.yaml @@ -0,0 +1,3 @@ +task: medical_abstracts +include: unitxt +recipe: card=cards.medical_abstracts,template=templates.classification.multi_class.title diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/stsb.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/stsb.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8d91b0e13c6a7327efd3c9efd36183ae87ef242c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/stsb.yaml @@ -0,0 +1,3 @@ +task: stsb +include: unitxt +recipe: card=cards.stsb,template=templates.regression.two_texts.simple diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/task.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/task.py new file mode 100644 index 0000000000000000000000000000000000000000..339a3076c5a70930ca4d409faba978f036ae773b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/task.py @@ -0,0 +1,142 @@ +""" +In the dynamic landscape of generative NLP, traditional text processing pipelines limit research flexibility and reproducibility, as they are tailored to specific dataset, task, and model combinations. The escalating complexity, involving system prompts, model-specific formats, instructions, and more, calls for a shift to a structured, modular, and customizable solution. + +Addressing this need, we present Unitxt, an innovative library for customizable textual data preparation and evaluation tailored to generative language models. Unitxt natively integrates with common libraries like HuggingFace and LM-eval-harness and deconstructs processing flows into modular components, enabling easy customization and sharing between practitioners. These components encompass model-specific formats, task prompts, and many other comprehensive dataset processing definitions. The Unitxt-Catalog centralizes these components, fostering collaboration and exploration in modern textual data workflows. Beyond being a tool, Unitxt is a community-driven platform, empowering users to build, share, and advance their pipelines collaboratively. +""" + +from functools import partial +from typing import Optional + +import evaluate + +from lm_eval.api.instance import Instance +from lm_eval.api.task import ConfigurableTask + + +_CITATION = """ +@misc{bandel2024unitxt, + title={Unitxt: Flexible, Shareable and Reusable Data Preparation and Evaluation for Generative AI}, + author={Elron Bandel and Yotam Perlitz and Elad Venezian and Roni Friedman-Melamed and Ofir Arviv and Matan Orbach and Shachar Don-Yehyia and Dafna Sheinwald and Ariel Gera and Leshem Choshen and Michal Shmueli-Scheuer and Yoav Katz}, + year={2024}, + eprint={2401.14019}, + archivePrefix={arXiv}, + primaryClass={cs.CL} +} +""" + + +def score(items, metric): + predictions, references = zip(*items) + evaluator = evaluate.load("unitxt/metric") + for reference in references: + reference["metrics"] = [metric] + results = evaluator.compute(predictions=predictions, references=references) + return results[0]["score"]["global"]["score"] + + +class Unitxt(ConfigurableTask): + VERSION = 0 + + def __init__( + self, + config: Optional[dict] = None, + ) -> None: + assert "recipe" in config, "Unitxt task must have a 'recipe' string." + super().__init__( + config={ + "metadata": {"version": self.VERSION}, + "dataset_kwargs": {"trust_remote_code": True}, + "dataset_name": config["recipe"], + "dataset_path": "unitxt/data", + } + ) + self.metrics = self.dataset["test"][0]["metrics"] + + def has_training_docs(self): + return "train" in self.dataset + + def has_validation_docs(self): + return "validation" in self.dataset + + def has_test_docs(self): + return "test" in self.dataset + + def training_docs(self): + return self.dataset["train"] + + def validation_docs(self): + return self.dataset["validation"] + + def test_docs(self): + return self.dataset["test"] + + def doc_to_text(self, doc): + return doc["source"] + + def should_decontaminate(self): + return False + + def doc_to_target(self, doc): + doc["target"] + + def construct_requests(self, doc, ctx, **kwargs): + """Uses RequestFactory to construct Requests and returns an iterable of + Requests which will be sent to the LM. + + :param doc: + The document as returned from training_docs, validation_docs, or test_docs. + :param ctx: str + The context string, generated by fewshot_context. This includes the natural + language description, as well as the few shot examples, and the question + part of the document for `doc`. + """ + + return [ + Instance( + request_type="generate_until", + doc=doc, + arguments=(ctx, {"until": ["\n"]}), + idx=0, + **kwargs, + ) + ] + + def process_results(self, doc, results): + """Take a single document and the LM results and evaluates, returning a + dict where keys are the names of submetrics and values are the values of + the metric for that one document + + :param doc: + The document as returned from training_docs, validation_docs, or test_docs. + :param results: + The results of the requests created in construct_requests. + """ + + continuation = results[0] + + predictions = continuation + + references = doc + return { + metric.replace("metrics.", ""): (predictions, references) + for metric in self.metrics + } + + def aggregation(self): + """ + :returns: {str: [float] -> float} + A dictionary where keys are the names of submetrics and values are + functions that aggregate a list of metrics + """ + return { + metric.replace("metrics.", ""): partial(score, metric=metric) + for metric in self.metrics + } + + def higher_is_better(self): + """ + :returns: {str: bool} + A dictionary where keys are the names of submetrics and values are + whether a higher value of the submetric is better + """ + return {metric.replace("metrics.", ""): True for metric in self.metrics} diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/unfair_tos.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/unfair_tos.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b401dfeff4d06d3b3c96b18f00ad211b4607b46e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/unfair_tos.yaml @@ -0,0 +1,3 @@ +task: unfair_tos +include: unitxt +recipe: card=cards.unfair_tos,template=templates.classification.multi_label.title diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/unitxt b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/unitxt new file mode 100644 index 0000000000000000000000000000000000000000..e6902c46d4a0342e10360715be125178ecd58aad --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/unitxt @@ -0,0 +1 @@ +class: !function task.Unitxt diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/xsum.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/xsum.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6fe2999dca43cb86ca91078c869f6622d7e01733 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/xsum.yaml @@ -0,0 +1,3 @@ +task: xsum +include: unitxt +recipe: card=cards.xsum,template=templates.summarization.abstractive.full diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/yahoo_answers_topics.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/yahoo_answers_topics.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6bf12faedbd58109333426b99ada5d14aa3e9f06 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/unitxt/yahoo_answers_topics.yaml @@ -0,0 +1,3 @@ +task: yahoo_answers_topics +include: unitxt +recipe: card=cards.yahoo_answers_topics,template=templates.classification.multi_class.title diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/README.md b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ce646d4d9cb4e4e93a8a55d16b11b0cbf290225e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/README.md @@ -0,0 +1,50 @@ +# XNLIeu + +### Paper + +Title: XNLIeu: a dataset for cross-lingual NLI in Basque + +Abstract: https://arxiv.org/abs/2404.06996 + +XNLI is a popular Natural Language Inference (NLI) benchmark widely used to evaluate cross-lingual Natural Language Understanding (NLU) capabilities across languages. In this paper, we expand XNLI to include Basque, a low-resource language that can greatly benefit from transfer-learning approaches. The new dataset, dubbed XNLIeu, has been developed by first machine-translating the English XNLI corpus into Basque, followed by a manual post-edition step. We have conducted a series of experiments using mono- and multilingual LLMs to assess a) the effect of professional post-edition on the MT system; b) the best cross-lingual strategy for NLI in Basque; and c) whether the choice of the best cross-lingual strategy is influenced by the fact that the dataset is built by translation. The results show that post-edition is necessary and that the translate-train cross-lingual strategy obtains better results overall, although the gain is lower when tested in a dataset that has been built natively from scratch. Our code and datasets are publicly available under open licenses at https://github.com/hitz-zentroa/xnli-eu. + +Homepage: https://github.com/hitz-zentroa/xnli-eu + + +### Citation + +```bibtex +@misc{heredia2024xnlieu, + title={XNLIeu: a dataset for cross-lingual NLI in Basque}, + author={Maite Heredia and Julen Etxaniz and Muitze Zulaika and Xabier Saralegi and Jeremy Barnes and Aitor Soroa}, + year={2024}, + eprint={2404.06996}, + archivePrefix={arXiv}, + primaryClass={cs.CL} +} +``` + +### Groups, Tags, and Tasks + +#### Tags + +* `xnli_eu_mt_native`: Includes MT and Native variants of the XNLIeu dataset. + +#### Tasks + +* `xnli_eu`: XNLI in Basque postedited from MT. +* `xnli_eu_mt`: XNLI in Basque machine translated from English. +* `xnli_eu_native`: XNLI in Basque natively created. + +### Checklist + +For adding novel benchmarks/datasets to the library: +* [x] Is the task an existing benchmark in the literature? + * [x] Have you referenced the original paper that introduced the task? + * [x] If yes, does the original paper provide a reference implementation? If so, have you checked against the reference implementation and documented how to run such a test? + + +If other tasks on this dataset are already supported: +* [ ] Is the "Main" variant of this task clearly denoted? +* [ ] Have you provided a short sentence in a README on what each new variant adds / evaluates? +* [ ] Have you noted which, if any, published evaluation setups are matched by this variant? diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/xnli_common_yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/xnli_common_yaml new file mode 100644 index 0000000000000000000000000000000000000000..4950a8996806739858b4261f9d0b005cd508fafe --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/xnli_common_yaml @@ -0,0 +1,15 @@ +task: null +dataset_path: xnli +dataset_name: null +output_type: multiple_choice +training_split: train +validation_split: validation +doc_to_text: null +doc_to_target: label +doc_to_choice: null +metric_list: + - metric: acc + aggregation: mean + higher_is_better: true +metadata: + version: 1.0 diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/xnli_eu.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/xnli_eu.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b78eb7e771b48577a3fca3a29c6a9e921c6a8d26 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/xnli_eu.yaml @@ -0,0 +1,8 @@ +include: xnli_common_yaml +task: xnli_eu +dataset_path: HiTZ/xnli-eu +dataset_name: eu +doc_to_choice: '{{[premise+", ezta? Bai, "+hypothesis,premise+", ezta? Gainera, +"+hypothesis,premise+", ezta? Ez, "+hypothesis]}}' +doc_to_text: "" +test_split: test diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/xnli_eu_mt.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/xnli_eu_mt.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c0fbf5416b4c10bc640a25f8a3a63dd5fb903128 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/xnli_eu_mt.yaml @@ -0,0 +1,4 @@ +include: xnli_eu.yaml +tag: xnli_eu_mt_native +task: xnli_eu_mt +dataset_name: eu_mt diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/xnli_eu_native.yaml b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/xnli_eu_native.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e841f37e7ff36b238b85f05f9de7fd7fc488cbb2 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/tasks/xnli_eu/xnli_eu_native.yaml @@ -0,0 +1,6 @@ +include: xnli_eu.yaml +tag: xnli_eu_mt_native +task: xnli_eu_native +training_split: null +validation_split: null +dataset_name: eu_native diff --git a/testbed/EleutherAI__lm-evaluation-harness/lm_eval/utils.py b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..7166e24d0723e397f00347d6f14eb14e5902a452 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/lm_eval/utils.py @@ -0,0 +1,501 @@ +import collections +import fnmatch +import functools +import hashlib +import importlib.util +import inspect +import json +import logging +import os +import re +from dataclasses import asdict, is_dataclass +from itertools import islice +from typing import Any, Callable, List + +import numpy as np +import yaml +from jinja2 import BaseLoader, Environment, StrictUndefined + + +logging.basicConfig( + format="%(asctime)s,%(msecs)03d %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s", + datefmt="%Y-%m-%d:%H:%M:%S", + level=logging.INFO, +) +eval_logger = logging.getLogger("lm-eval") + +SPACING = " " * 47 + +HIGHER_IS_BETTER_SYMBOLS = { + True: "↑", + False: "↓", +} + + +def hash_string(string: str) -> str: + return hashlib.sha256(string.encode("utf-8")).hexdigest() + + +def escaped_split(text, sep_char, maxsplit=-1): + """Split text into a list on occurrences of the given separation + character `sep_char`. The separation character may be escaped by a + backslash to avoid splitting at that location. + + The separation character must be a string of size 1. + + If `maxsplit` is given, at most `maxsplit` splits are done (thus, + the list will have at most `maxsplit + 1` elements). If `maxsplit` + is not specified or less than 0, then there is no limit on the + number of splits (all possible splits are made). + """ + assert ( + len(sep_char) == 1 + ), "separation string must be a single character for escaped splitting" + + if maxsplit == 0: + return text + maxsplit = max(0, maxsplit) + + return re.split(r"(? str: + """ + Given the sample results filenames, extracts and returns the task name. + """ + return filename[filename.find("_") + 1 : filename.rfind("_")] + + +def get_file_datetime(filename: str) -> str: + """ + Given the results and sample results filenames, extracts and returns the datetime. + """ + return filename[filename.rfind("_") + 1 :].replace(".jsonl", "") + + +def sanitize_model_name(model_name: str) -> str: + """ + Given the model name, returns a sanitized version of it. + """ + return re.sub(r"[\"<>:/\|\\?\*\[\]]+", "__", model_name) + + +def sanitize_task_name(task_name: str) -> str: + """ + Given the task name, returns a sanitized version of it. + """ + return re.sub(r"\W", "_", task_name) + + +def get_latest_filename(filenames: List[str]) -> str: + """ + Given a list of filenames, returns the filename with the latest datetime. + """ + return max(filenames, key=lambda f: get_file_datetime(f)) + + +def get_results_filenames(filenames: List[str]) -> List[str]: + """ + Extracts filenames that correspond to aggregated results. + """ + return [f for f in filenames if "/results_" in f and ".json" in f] + + +def get_sample_results_filenames(filenames: List[str]) -> List[str]: + """ + Extracts filenames that correspond to sample results. + """ + return [f for f in filenames if "/samples_" in f and ".json" in f] + + +def get_rolling_token_windows(token_list, prefix_token, max_seq_len, context_len): + """ + - context_len allows for a rolling window context, allowing each prediction window to potentially + condition on some context + + :param token_list: list + List of tokens to be PREDICTED + :param max_seq_len: int + max_seq_len of model (or max_seq_len we want to use) + :param context_len: int + Amount of desired token context for prediction. Needs to be at least 1. + :param prefix_token: token + Dummy token like so the first token has something to condition on + :return: generator + Generator of tuples + (input_tokens, pred_tokens) + Note: Score only the last len(pred_tokens) logits of the LM + """ + assert 1 <= context_len <= max_seq_len + if not token_list: + return + # +1 offset, going from input->preds + pred_len = max_seq_len - context_len + 1 + predicted = 0 + + # Special handling for first window: predict all tokens + first_seq_len = min(max_seq_len, len(token_list)) + yield ([prefix_token] + token_list[: first_seq_len - 1], token_list[:first_seq_len]) + predicted += first_seq_len + + while predicted < len(token_list): + window_pred_len = min(len(token_list) - predicted, pred_len) + window_end = predicted + window_pred_len + + yield ( + token_list[window_end - max_seq_len - 1 : window_end - 1], + token_list[window_end - window_pred_len : window_end], + ) + predicted += window_pred_len + + +def make_disjoint_window(pair): + """Takes output from get_rolling_token_windows and makes the context not overlap with the continuation""" + a, b = pair + return a[: len(a) - (len(b) - 1)], b + + +class EnhancedJSONEncoder(json.JSONEncoder): + """ + Provides a proper json encoding for the loggers and trackers json dumps. + Notably manages the json encoding of dataclasses. + """ + + def default(self, o): + if is_dataclass(o): + return asdict(o) + return super().default(o) + + +class Reorderer: + def __init__(self, arr: List[Any], fn: Callable) -> None: + """Reorder an array according to some function + + Args: + arr (List[Any]): The initial array + fn (Callable[[Any], Any]): A function to determine the priority of elements + """ + self.size = len(arr) + arr = list(enumerate(arr)) + arr = group(arr, lambda x: fn(x[1])) + # arr = [([y[0] for y in x], x[0][1]) for x in arr] + # TODO: overhaul reorderer. It currently grouped requests by content but we don't want this + arr = [([y[0]], x[0][1]) for x in arr for y in x] + arr.sort(key=lambda x: fn(x[1])) + + self.arr = arr + + def get_reordered(self): + """Gets the reordered array + + Returns: + List[Any]: The reordered array + """ + return [x[1] for x in self.arr] + + def get_original(self, newarr): + """Restores the original order of a new array based on the old array's order + + Args: + newarr (List[Any]): The array to be restored + + Returns: + List[Any]: The array restored to the original order + """ + res = [None] * self.size + cov = [False] * self.size + + for (inds, _), v in zip(self.arr, newarr): + for ind in inds: + res[ind] = v + cov[ind] = True + + assert all(cov) + + return res + + +def make_table(result_dict, column: str = "results", sort_results: bool = False): + """Generate table of results.""" + from pytablewriter import LatexTableWriter, MarkdownTableWriter + + if column == "results": + column_name = "Tasks" + elif column == "groups": + column_name = "Groups" + + all_headers = [ + column_name, + "Version", + "Filter", + "n-shot", + "Metric", + "", + "Value", + "", + "Stderr", + ] + + md_writer = MarkdownTableWriter() + latex_writer = LatexTableWriter() + md_writer.headers = all_headers + latex_writer.headers = all_headers + + values = [] + + keys = result_dict[column].keys() + if sort_results: + # sort entries alphabetically by task or group name. + # NOTE: we default here to false, because order matters for multi-level table printing a la mmlu. + # sorting here would mess that up + keys = sorted(keys) + for k in keys: + dic = result_dict[column][k] + version = result_dict["versions"].get(k, " N/A") + n = str(result_dict.get("n-shot", " ").get(k, " ")) + higher_is_better = result_dict.get("higher_is_better", {}).get(k, {}) + + if "alias" in dic: + k = dic.pop("alias") + + metric_items = dic.items() + metric_items = sorted(metric_items) + + for (mf), v in metric_items: + m, _, f = mf.partition(",") + if m.endswith("_stderr"): + continue + + hib = HIGHER_IS_BETTER_SYMBOLS.get(higher_is_better.get(m), "") + + v = "%.4f" % v if isinstance(v, float) else v + + if m + "_stderr" + "," + f in dic: + se = dic[m + "_stderr" + "," + f] + se = " N/A" if se == "N/A" else "%.4f" % se + values.append([k, version, f, n, m, hib, v, "±", se]) + else: + values.append([k, version, f, n, m, hib, v, "", ""]) + k = "" + version = "" + md_writer.value_matrix = values + latex_writer.value_matrix = values + + # todo: make latex table look good + # print(latex_writer.dumps()) + + return md_writer.dumps() + + +def positional_deprecated(fn): + """ + A decorator to nudge users into passing only keyword args (`kwargs`) to the + wrapped function, `fn`. + """ + + @functools.wraps(fn) + def _wrapper(*args, **kwargs): + if len(args) != 1 if inspect.ismethod(fn) else 0: + print( + f"WARNING: using {fn.__name__} with positional arguments is " + "deprecated and will be disallowed in a future version of " + "lm-evaluation-harness!" + ) + return fn(*args, **kwargs) + + return _wrapper + + +def ignore_constructor(loader, node): + return node + + +def import_function(loader, node): + function_name = loader.construct_scalar(node) + yaml_path = os.path.dirname(loader.name) + + *module_name, function_name = function_name.split(".") + if isinstance(module_name, list): + module_name = ".".join(module_name) + module_path = os.path.normpath(os.path.join(yaml_path, "{}.py".format(module_name))) + + spec = importlib.util.spec_from_file_location(module_name, module_path) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + + function = getattr(module, function_name) + return function + + +def load_yaml_config(yaml_path=None, yaml_config=None, yaml_dir=None, mode="full"): + if mode == "simple": + constructor_fn = ignore_constructor + elif mode == "full": + constructor_fn = import_function + + # Add the import_function constructor to the YAML loader + yaml.add_constructor("!function", constructor_fn) + if yaml_config is None: + with open(yaml_path, "rb") as file: + yaml_config = yaml.full_load(file) + + if yaml_dir is None: + yaml_dir = os.path.dirname(yaml_path) + + assert yaml_dir is not None + + if "include" in yaml_config: + include_path = yaml_config["include"] + del yaml_config["include"] + + if isinstance(include_path, str): + include_path = [include_path] + + # Load from the last one first + include_path.reverse() + final_yaml_config = {} + for path in include_path: + # Assumes that path is a full path. + # If not found, assume the included yaml + # is in the same dir as the original yaml + if not os.path.isfile(path): + path = os.path.join(yaml_dir, path) + + try: + included_yaml_config = load_yaml_config(yaml_path=path, mode=mode) + final_yaml_config.update(included_yaml_config) + except Exception as ex: + # If failed to load, ignore + raise ex + + final_yaml_config.update(yaml_config) + return final_yaml_config + return yaml_config + + +def regex_replace(string, pattern, repl, count: int = 0): + """Implements the `re.sub` function as a custom Jinja filter.""" + return re.sub(pattern, repl, string, count=count) + + +env = Environment( + loader=BaseLoader, undefined=StrictUndefined, keep_trailing_newline=True +) +env.filters["regex_replace"] = regex_replace + + +def apply_template(template: str, doc: dict) -> str: + rtemplate = env.from_string(template) + return rtemplate.render(**doc) + + +def create_iterator(raw_iterator, *, rank=0, world_size=1, limit=None): + """ + Method for creating a (potentially) sliced and limited + iterator from a raw document iterator. Used for splitting data + among ranks in multigpu setting or only pulling a sample of documents + """ + return islice(raw_iterator, rank, limit, world_size) + + +def weighted_f1_score(items): + from sklearn.metrics import f1_score + + unzipped_list = list(zip(*items)) + golds = unzipped_list[0] + preds = unzipped_list[1] + fscore = f1_score(golds, preds, average="weighted") + return fscore diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/__init__.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/build_benchmark.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/build_benchmark.py new file mode 100644 index 0000000000000000000000000000000000000000..fc99b5ec37c6979bf55f6a1ac0ea6808fd0e539f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/build_benchmark.py @@ -0,0 +1,61 @@ +import argparse +import os + +import yaml +from promptsource.templates import DatasetTemplates +from tqdm import tqdm + +# from lm_eval.api.registry import ALL_TASKS +from lm_eval.logger import eval_logger + + +# from lm_eval.tasks import include_task_folder + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument("--benchmark_name", required=True) + parser.add_argument("--benchmark_path", required=True) + parser.add_argument("--task_save_path", default="lm_eval/tasks/") + return parser.parse_args() + + +if __name__ == "__main__": + args = parse_args() + + with open(args.benchmark_path, encoding="utf-8") as file: + TASK_LIST = yaml.full_load(file) + for task in tqdm(TASK_LIST): + eval_logger.info(f"Processing {task}") + + dataset_name = task["dataset_path"] + if "dataset_name" in task: + subset_name = task["dataset_name"] + file_subdir = f"{dataset_name}/{subset_name}" + else: + subset_name = None + file_subdir = f"{dataset_name}" + + file_path = os.path.join(args.task_save_path, file_subdir, "promptsource/") + + os.makedirs(file_path, exist_ok=True) + + if subset_name is None: + prompts = DatasetTemplates(dataset_name=dataset_name) + else: + prompts = DatasetTemplates( + dataset_name=dataset_name, subset_name=subset_name + ) + + for idx, prompt_name in enumerate(prompts.all_template_names): + full_file_name = f"promptsource_{idx}.yaml" + config_dict = { + "group": args.benchmark_name, + "include": "promptsource_template.yaml", + "use_prompts": f"promptsource:{prompt_name}", + } + + file_save_path = os.path.join(file_path, full_file_name) + eval_logger.info(f"Save to {file_save_path}") + with open(file_save_path, "w", encoding="utf-8") as yaml_file: + yaml.dump(config_dict, yaml_file) diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/README.md b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7985adecaab926b39e5bfd5b96b093f73450e660 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/README.md @@ -0,0 +1,36 @@ +janitor.py contains a script to remove benchmark data contamination from training data sets. +It uses the approach described in the [GPT-3 paper](https://arxiv.org/abs/2005.14165). + +## Algorithm +1) Collects all contamination text files that are to be removed from training data +2) Filters training data by finding `N`gram matches between the training data + and any contamination + 1) `N`grams ignore case and punctuation and are split on whitespace. + 2) Matching `N`gram substrings are removed, as is a `window_to_remove` character window around + the match, splitting the training data into chunks + 3) Any chunks less than `minimum_slice_length` are removed + 4) Training data sets split into more than `too_dirty_cutoff` are considered + completely contaminated and removed + +OpenAI used: +``` +ngram_n = 13 +window_to_remove = 200 +minimum_slice_length = 200 +too_dirty_cutoff = 10 +``` + +## Compiling + +Janitor can be used as a pure python program, but it is much faster if the ngram +code is run in C++. To compile the C++ code, run + +``` +pip install pybind11 +c++ -O3 -Wall -shared -std=c++11 -fPIC $(python3 -m pybind11 --includes) janitor_util.cpp -o janitor_util$(python3-config --extension-suffix) +``` + +MacOS users: If your compiler isn't linked to Python, you may need to add to the above `-undefined dynamic_lookup`. \ +Linux users: If your compiler isn't linked to Python, you may need to follow these steps: +1. Rename the compiled code file to `janitor_util.so`. +2. Before running `import Janitor` in your code, add `sys.path.append("your/relative/path/to/janitor_util.so")` so that Python knows the location of `janitor_util.so`. diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/__init__.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/compress_and_package.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/compress_and_package.py new file mode 100644 index 0000000000000000000000000000000000000000..d4af5ba5f3d5e16a485984ced2324951e56ad829 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/compress_and_package.py @@ -0,0 +1,73 @@ +import argparse +import glob +import logging +import os +import shutil +import subprocess + +from tqdm import tqdm +from tqdm_multiprocess import TqdmMultiProcessPool +from tqdm_multiprocess.logger import setup_logger_tqdm + + +logger = logging.getLogger(__name__) + + +def process_task( + working_directory, output_directory, bucket_file_path, tqdm_func, global_tqdm +): + command = f"zstd {bucket_file_path}" + logger.info(command) + subprocess.call(command, shell=True) + + compressed_file = bucket_file_path + ".zst" + if output_directory: + shutil.move(compressed_file, output_directory) + + os.remove(bucket_file_path) + global_tqdm.update() + + +def compress_and_move(working_directory, output_directory, process_count): + os.makedirs(output_directory, exist_ok=True) + original_info_file_path = os.path.join(working_directory, "info.json") + assert os.path.exists(original_info_file_path) + + tasks = [] + bucket_file_paths = glob.glob( + os.path.join(working_directory, "output", "*.bkt.txt.sorted") + ) + for bucket_file_path in bucket_file_paths: + task = (process_task, (working_directory, output_directory, bucket_file_path)) + tasks.append(task) + + pool = TqdmMultiProcessPool(process_count) + + def on_done(_): + return None + + def on_error(_): + return None + + global_progress = tqdm( + total=len(bucket_file_paths), dynamic_ncols=True, unit="file" + ) + _ = pool.map(global_progress, tasks, on_error, on_done) + + shutil.copy(original_info_file_path, os.path.join(output_directory, "info.json")) + + +parser = argparse.ArgumentParser(description="sort 13gram buckets") +parser.add_argument("-dir", "--working_directory", required=True) +parser.add_argument("-output", "--output_directory", required=True) +parser.add_argument("-procs", "--process_count", type=int, default=8) + +if __name__ == "__main__": + version = 1.00 + print(f"Running version {version}") + + logfile_path = "compress_and_package.log" + setup_logger_tqdm(logfile_path) + + args = parser.parse_args() + compress_and_move(args.working_directory, args.output_directory, args.process_count) diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/generate_13_grams.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/generate_13_grams.py new file mode 100644 index 0000000000000000000000000000000000000000..e508f266e9bfbe1cdf6f93de478c2d60d490d557 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/generate_13_grams.py @@ -0,0 +1,215 @@ +""" +Outputs all 13-grams found in The Pile. + +Loops through all documents and uses the logic found in janitor.py to extract 13-grams. +We bucket each 13-gram by hash into separate file buckets to allow easy parallel processing in the +next stage. We also include the current pile document_id with each ngram instance to allow the +filtering to exclude 13-grams that match more then 10 unique documents (done further down the pipeline). + +We didn't use lm_dataformat to output as it increases time 4x (slow jsonify) and makes +resuming hard (and we had the storage). + +Arguments +--------- +--working_directory (-dir) + Directory containing the pile distribution. An "output" subdirectory will be created underneath + to store the bucketed 13-grams, checkpoint and done files. Default: current directory +--n_value (-n) + n value in n-gram, added for later use if ever needed. Default: 13 +--bucket_count (-buckets) + Number of file buckets to use when generating 13grams. Default: 500 +""" + +import argparse +import glob +import json +import logging +import os +import pickle +import signal +import sys +from pathlib import Path +from signal import SIGINT + +from tqdm import tqdm +from tqdm_multiprocess.logger import setup_logger_tqdm + +from lm_eval.decontamination.archiver import Reader, TextArchive +from lm_eval.decontamination.janitor import Janitor, word_ngrams + + +logger = logging.getLogger(__name__) + +terminate = False + + +def handler(signal_received, frame): + global terminate + terminate = True + + +def yield_pile(start_offsets=None, checkpoint_offset=None): + directory = "pile" + + if not os.path.exists(directory): + print( + "We expect the pile archives to be in the 'pile' directory, but this was not found." + ) + raise Exception("Pile directory not found.") + + files = list(sorted(glob.glob(os.path.join(directory, "*.jsonl.zst*")))) + + pile_global_offset = 0 + start_file = 0 + if checkpoint_offset: + for file_i, start_offset in enumerate(start_offsets): + if start_offset > checkpoint_offset: + break + + start_file = file_i + pile_global_offset = start_offset + + for file_i, file in enumerate(files): + if file_i < start_file: + logger.info(f"Skipping file {file}") + continue + logger.info(f"Reading from pile file: {file}") + reader = Reader() + for document in reader.read(file): + yield (pile_global_offset, document) + pile_global_offset += 1 + + +# Hash buckets > disk backed files. Supports file position checkpointing and resuming +# Allows you to write continuously and checkpoint intermittently. If a failure occurs +# the buckets are simply truncated at your last checkpoint. +class Buckets: + def __init__(self, directory, num_buckets): + self.bucket_files = [ + os.path.join(directory, f"ngrams_{i}.bkt.txt") for i in range(num_buckets) + ] + self.buckets = list(map(TextArchive, self.bucket_files)) + self.checkpoint_file = os.path.join(directory, "bucket_offsets.ckpt") + + if os.path.exists(self.checkpoint_file): + self.bucket_offsets = pickle.load(open(self.checkpoint_file, "rb")) + else: + self.bucket_offsets = [0 for i in range(len(self.buckets))] + + for i, offset in enumerate(self.bucket_offsets): + bucket = self.buckets[i] + bucket.fh.seek(offset) + bucket.fh.truncate() + + def add_data(self, key, value): + i = hash(key) % len(self.buckets) + bucket = self.buckets[i] + bucket.add_data(value) + + def save_checkpoint(self): + for bucket in self.buckets: + bucket.fh.flush() + + bucket_offsets = [bucket.fh.tell() for bucket in self.buckets] + pickle.dump(bucket_offsets, open(self.checkpoint_file, "wb")) + + def close_buckets(self): + for bucket in self.buckets: + bucket.commit() + + +def do_ngrams_in_buckets(n_value, working_directory, bucket_count): + pile_statistics = json.load(open("pile_statistics.json", "r", encoding="utf-8")) + pile_document_count = pile_statistics["Document Count"] + start_offsets = pile_statistics["File Start Offsets"] + + output_directory = os.path.join(working_directory, "output") + os.makedirs(output_directory, exist_ok=True) + + logger.info(f"Generating {n_value}-grams and bucketing.") + + # Done file + done_file = os.path.join(output_directory, "ngram_buckets.done") + if os.path.exists(done_file): + logger.info("ngrams already generated and bucketed, skipping") + return + + # Checkpoint + checkpoint_file = os.path.join(working_directory, "pile_offset.ckpt") + if os.path.exists(checkpoint_file): + checkpoint_offset = pickle.load(open(checkpoint_file, "rb")) + iterate = True + else: + checkpoint_offset = 0 + iterate = False + + logger.info(f"Starting at pile document index {checkpoint_offset}") + buckets = Buckets(output_directory, bucket_count) + + janitor = Janitor() + batch_size = 1000 + batch_counter = 0 + + with tqdm(total=checkpoint_offset, dynamic_ncols=True, unit="docs") as progress: + for offset, document in yield_pile(start_offsets, checkpoint_offset): + if iterate: + logger.info(f"Iterating to offset {checkpoint_offset} from {offset}") + progress.update(offset) + iterate = False + + if offset < checkpoint_offset: + progress.update() + + if terminate: + return + continue + + if offset == checkpoint_offset: + progress.reset(total=pile_document_count) + progress.update(checkpoint_offset) + + # Save checkpoint every "batch_size", only allow terminate after checkpoint + if batch_counter == batch_size: + progress.update(batch_size) + batch_counter = 0 + buckets.save_checkpoint() + pickle.dump(offset, open(checkpoint_file, "wb")) + if terminate: + buckets.close_buckets() + return + + ngrams = word_ngrams(janitor.normalize_string(document), n_value) + for ngram in ngrams: + buckets.add_data(ngram, f"{ngram} {offset}") + + batch_counter += 1 + + buckets.close_buckets() + Path(done_file).touch() + + +parser = argparse.ArgumentParser(description="Generate 13 grams from Pile.") +parser.add_argument("-dir", "--working_directory", default="") +parser.add_argument("-n", "--n_value", type=int, default=13) +parser.add_argument("-buckets", "--bucket_count", type=int, default=500) + +if __name__ == "__main__": + version = 1.00 + print(f"Running version {version}") + + if "PYTHONHASHSEED" not in os.environ or os.environ["PYTHONHASHSEED"] != "0": + print("Please run 'export PYTHONHASHSEED=0' before running generate.") + sys.exit() + + # Handle sigint (ctrl-c) cleanly + previous_signal_int = signal.signal(SIGINT, handler) + + logfile_path = "ngrams.log" + setup_logger_tqdm(logfile_path) + + args = parser.parse_args() + do_ngrams_in_buckets(args.n_value, args.working_directory, args.bucket_count) + + info_dict = {"title": "dataset ngrams", "ngram_size": 13} + info_dict_path = os.path.join(args.working_directory, "info.json") + json.dump(info_dict, open(info_dict_path, "w", encoding="utf-8")) diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/investigate_pile.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/investigate_pile.py new file mode 100644 index 0000000000000000000000000000000000000000..681b591ced535dbb884fb65f58a0c9042c35b0ac --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/investigate_pile.py @@ -0,0 +1,95 @@ +import glob +import json +import os +from functools import reduce + +import tqdm +from tqdm_multiprocess import TqdmMultiProcessPool + +from lm_eval.decontamination.archiver import Reader + + +def get_file_stats(file_path, tqdm_func, global_tqdm): + reader = Reader() + total_documents = 0 + total_size = 0 + update_frequency = 10000 + current_file_position = 0 + + with tqdm_func( + total=os.path.getsize(file_path), dynamic_ncols=True, unit="byte", unit_scale=1 + ) as progress: + for document in reader.read(file_path, get_meta=True): + total_size += len(document) + total_documents += 1 + + if total_documents % update_frequency == 0: + new_file_pos = reader.fh.tell() + bytes_read = new_file_pos - current_file_position + current_file_position = new_file_pos + progress.update(bytes_read) + global_tqdm.update(bytes_read) + + return (total_documents, total_size) + + +def get_files(): + directory = "pile" + files = list(sorted(glob.glob(os.path.join(directory, "*.jsonl.zst*")))) + print(files) + return files + + +def get_stats(): + files = get_files() + total_size_bytes = sum(map(lambda x: os.path.getsize(x), files)) + + pool = TqdmMultiProcessPool(4) + global_tqdm = tqdm.tqdm( + total=total_size_bytes, dynamic_ncols=True, unit="byte", unit_scale=1 + ) + + # Generate minhashes with pool + tasks = [(get_file_stats, (file,)) for file in files] + + def on_done(_): + return None + + def on_error(_): + return None + + results = pool.map(global_tqdm, tasks, on_error, on_done) + + total_documents, total_size = reduce( + lambda x, y: (x[0] + y[0], x[1] + y[1]), results + ) + + start_offsets = [] + current_offset = 0 + for file_document_count, _ in results: + start_offsets.append(current_offset) + current_offset += file_document_count + + return (total_documents, total_size, start_offsets) + + +if __name__ == "__main__": + version = 1.01 + print(f"Running version {version}") + + stats_file_path = "pile_statistics.json" + if os.path.exists(stats_file_path): + stats = json.load(open(stats_file_path, "r", encoding="utf-8")) + else: + document_count, total_document_size_chars, start_offsets = get_stats() + stats = { + "Data": "Pile statistics", + "Document Count": document_count, + "Total Pile Characters": total_document_size_chars, + "File Start Offsets": start_offsets, + } + json.dump(stats, open(stats_file_path, "w", encoding="utf-8"), indent=4) + + print(f"document_count: {stats['Document Count']}") + print(f"total_chars: {stats['Total Pile Characters']}") + print(f"start_offsets: {stats['File Start Offsets']}") diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/janitor_util.cpp b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/janitor_util.cpp new file mode 100644 index 0000000000000000000000000000000000000000..858a8b20492507a6228a640cef0cc3ec7ac56bca --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/janitor_util.cpp @@ -0,0 +1,208 @@ +#include +#include +#include +#include +#include +#include +#include + +bool is_whitespace(char ch) noexcept { + // " \t\n\r\x0b\x0c" (python string.whitespace) + return ch == 32 or (9 <= ch and ch <= 13); + // return ch <= 32; // arguably too general, but slightly faster +} + +bool is_punctuation(char c) noexcept { + // '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~' ascii values: 33-47, 58-64, + // 91-96, 123-126 + return (33 <= c and c <= 47) or (58 <= c and c <= 64) or + (91 <= c and c <= 96) or (123 <= c and c <= 126); +} + +// Takes a string and makes ngrams of length N, splitting grams on whitespace +// and ignoring ignored characters Returns a LARGE array of ngrams +std::vector clean_ngram(std::string const &input, + std::string const &ignore, + size_t ngram_n) noexcept { + + size_t num_grams = 0; + std::vector ngram_list; + std::vector gram_lengths; + std::string current_ngram; + + // Max gram length is set to 10 below. + current_ngram.reserve(11 * ngram_n); + gram_lengths.reserve(ngram_n); + + bool started_gram = false; + gram_lengths.push_back(0); + + // for (size_t i=0; i 10) { + + // Skip all whitespace + while (++iter != input.end() && is_whitespace(*iter)) + ; + iter--; + + if (started_gram) { + num_grams += 1; + + // Building 1grams is a special case + if (ngram_n == 1) { + ngram_list.push_back(current_ngram); + current_ngram = current_ngram.substr(gram_lengths.front()); + gram_lengths.back() = 0; + + // If there are enough grams to form an ngram, save + } else if (num_grams >= ngram_n) { + // Save the current ngram + ngram_list.push_back(current_ngram); + + // Start the next ngram by dropping the first gram and its space from + // the ngram + current_ngram = current_ngram.substr(gram_lengths.front() + 1); + current_ngram += ' '; + + // Drop the length of the first gram and prepare to record the length + // of the new gram + gram_lengths.erase(gram_lengths.begin()); + gram_lengths.push_back(0); + + // Otherwise, continue building + } else { + current_ngram += ' '; + gram_lengths.push_back(0); + } + + started_gram = false; + } + + // Skip ignored characters + // alternatively, (perhaps marginally) faster: if (is_punctuation(ch)) + // continue; + } else if (ignore.find(*iter) != std::string::npos) { + continue; + } + + // If it is a non-ignored character, add it to the ngram and update the last + // gram's length + else { + current_ngram += tolower(*iter); + gram_lengths.back() += 1; + started_gram = true; + } + } + + return ngram_list; +} + +// Takes a string and makes ngrams of length N, splitting grams on whitespace +// and ignoring ignored characters Returns a LARGE array of tuples of (ngram, +// start_idx, end_idx) +std::vector> +clean_ngram_with_indices(std::string const &input, std::string const &ignore, + size_t ngram_n) noexcept { + + size_t num_grams = 0; + std::vector> ngram_list; + std::vector gram_lengths; + std::vector gram_start_indices; + std::string current_ngram; + + // Max gram length is set to 10 below. + current_ngram.reserve(11 * ngram_n); + + bool started_gram = false; + gram_lengths.push_back(0); + gram_start_indices.push_back(0); + + for (size_t i = 0; i < input.length(); i++) { + char ch = input[i]; + + // If whitespace, end the current ngram and start the next + if (is_whitespace(ch) || gram_lengths.back() > 10) { + + // Skip all whitespace + while (++i < input.length() && is_whitespace(input[i])) + ; + i--; + + if (started_gram) { + num_grams += 1; + + // Building 1grams is a special case + if (ngram_n == 1) { + ngram_list.push_back( + std::make_tuple(current_ngram, gram_start_indices.front(), i)); + current_ngram = current_ngram.substr(gram_lengths.front()); + gram_lengths.back() = 0; + gram_start_indices.back() = i + 1; + + // If there are enough grams to form an ngram, save + } else if (num_grams >= ngram_n) { + + // Save the current ngram + ngram_list.push_back( + std::make_tuple(current_ngram, gram_start_indices.front(), i)); + + // Start the next ngram by dropping the first gram and its space from + // the ngram + current_ngram = current_ngram.substr(gram_lengths.front() + 1); + current_ngram += ' '; + + // Drop the length of the first gram and prepare to record the length + // of the new gram + gram_lengths.erase(gram_lengths.begin()); + gram_lengths.push_back(0); + + gram_start_indices.erase(gram_start_indices.begin()); + gram_start_indices.push_back(i + 1); + + // Otherwise, continue building + } else { + current_ngram += ' '; + gram_lengths.push_back(0); + gram_start_indices.push_back(i + 1); + } + + started_gram = false; + } + + // Skip ignored characters + } else if (ignore.find(ch) != std::string::npos) { + continue; + + // If it is a non-ignored character, add it to the ngram and update the + // last gram's length + } else { + current_ngram += tolower(ch); + gram_lengths.back() += 1; + started_gram = true; + } + } + + return ngram_list; +} + +PYBIND11_MODULE(janitor_util, m) { + m.doc() = "pybind11 example plugin"; // optional module docstring + // m.def("add", &add, "A function which adds two numbers"); // example + // function + m.def("clean_ngram", &clean_ngram, + "Create ngrams of words, ignoring some characters"); + m.def("clean_ngram_with_indices", &clean_ngram_with_indices, + "Create ngrams of words with indices, ignoring some characters"); +} + +// Example compile +// c++ -O3 -Wall -shared -std=c++11 -fPIC $(python3 -m pybind11 --includes) +// janitor_util.cpp -o janitor_util$(python3-config --extension-suffix) If +// python and gcc aren't linked, append to the above: -undefined +// dynamic_lookup diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/process_sorted_buckets.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/process_sorted_buckets.py new file mode 100644 index 0000000000000000000000000000000000000000..9d345d8e86f409495b95a73f4539b2f4df57af70 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/process_sorted_buckets.py @@ -0,0 +1,129 @@ +""" +Processes each sorted bucket, creating a new file listing all ngrams that matched more then 10 +unique documents with their unique document counts. Uses multiprocessing and very little memory +as we stream from presorted buckets. Will use a lot of disk though. + +Arguments +--------- +--working_directory (-dir) + Directory containing the sorted buckets, processed files will be deposited here. Default: current directory +--move_dir (-move) + Directory to move processed 13grams too. Default: Do nothing +--process_count (-procs) + Number of processes to use. Default: 4 +""" + +import argparse +import glob +import logging +import os +import re +import shutil +from pathlib import Path + +from tqdm import tqdm +from tqdm_multiprocess import TqdmMultiProcessPool +from tqdm_multiprocess.logger import setup_logger_tqdm + +from scripts.clean_training_data.archiver import TextArchive, TextReader + + +logger = logging.getLogger(__name__) + + +# Multiprocessed +def process_bucket( + bucket_file_path, processed_directory, move_dir, tqdm_func, global_tqdm +): + bucket_id = re.sub("\D", "", os.path.basename(bucket_file_path)) # noqa: W605 + done_file = os.path.join( + processed_directory, f"ngram_bucket_processing_{bucket_id}.done" + ) + if os.path.exists(done_file): + logger.info(f"bucket {bucket_id} already processed, skipping") + return + + # For managing tqdm + file_size = os.path.getsize(bucket_file_path) + bucket_progress = tqdm_func( + total=file_size, dynamic_ncols=True, unit="byte", unit_scale=1 + ) + current_file_position = 0 + update_frequency = 100 * 1000000 # 100mb + update_counter = 0 + + # Iterate through and output ngrams which occur in more then 10 documents + bucket = TextReader(bucket_file_path) + + output_file_path = bucket_file_path + ".processed" + output_archive = TextArchive(output_file_path, mode="wb") + + current_ngram = "" + current_ngram_document_ids = set() + for line in bucket.read(): + [ngram, document_id] = line.rsplit(" ", 1) + + # Write ngram if more then 10 unique document occurrences + if ngram != current_ngram: + if len(current_ngram_document_ids) > 10: + output_archive.add_data( + f"{current_ngram} {len(current_ngram_document_ids)}" + ) + current_ngram = ngram + current_ngram_document_ids = set() + + current_ngram_document_ids.add(document_id) + + # Update tqdm + update_counter += bucket.fh.tell() - current_file_position + current_file_position = bucket.fh.tell() + if update_counter > update_frequency: + bucket_progress.update(update_counter) + update_counter = 0 + + # Remainder + if len(current_ngram_document_ids) > 10: + output_archive.add_data(f"{current_ngram} {len(current_ngram_document_ids)}") + + output_archive.commit() + Path(done_file).touch() + + if move_dir: + shutil.move(output_file_path, move_dir) + + global_tqdm.update() + + +def process_sorted_buckets(working_directory, move_dir, process_count): + bucket_file_paths = glob.glob(os.path.join(working_directory, "*.bkt.txt.sorted")) + processed_directory = os.path.join(working_directory, "processed") + os.makedirs(processed_directory, exist_ok=True) + + pool = TqdmMultiProcessPool(process_count) + tasks = [ + (process_bucket, (bucket_file, processed_directory, move_dir)) + for bucket_file in bucket_file_paths + ] + + global_tqdm = tqdm(total=len(bucket_file_paths), dynamic_ncols=True, unit="bucket") + + def on_done(_): + return None + + def on_error(_): + return None + + _ = pool.map(global_tqdm, tasks, on_error, on_done) + + +parser = argparse.ArgumentParser(description="Process 13 grams from sorted buckets.") +parser.add_argument("-dir", "--working_directory", default="") +parser.add_argument("-move", "--move_dir", default="") +parser.add_argument("-procs", "--process_count", type=int, default=4) + +if __name__ == "__main__": + logfile_path = "process13grams.log" + setup_logger_tqdm(logfile_path) + + args = parser.parse_args() + process_sorted_buckets(args.working_directory, args.move_dir, args.process_count) diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/sort_13_gram_buckets.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/sort_13_gram_buckets.py new file mode 100644 index 0000000000000000000000000000000000000000..83990de822e333bcd16c8d8092aec7ce41ff4e94 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/clean_training_data/sort_13_gram_buckets.py @@ -0,0 +1,62 @@ +""" +Iteratively runs gnu sort on each bucket, uses up to 8 cores. + +Arguments +--------- +--working_directory (-dir) + Directory containing the bucketed 13-grams. Sorted buckets will be deposited in the same + directory and the unsorted buckets are removed after. +""" + +import argparse +import glob +import logging +import os +import signal +import subprocess +from signal import SIGINT + +from tqdm import tqdm +from tqdm_multiprocess.logger import setup_logger_tqdm + + +logger = logging.getLogger(__name__) + +terminate = False + + +def handler(signal_received, frame): + global terminate + terminate = True + + +def sort_13_gram_buckets(working_directory): + bucket_file_paths = glob.glob(os.path.join(working_directory, "*.bkt.txt")) + + for bucket_file_path in tqdm(bucket_file_paths, dynamic_ncols=True): + sorted_file_path = bucket_file_path + ".sorted" + command = f"sort {bucket_file_path} > {sorted_file_path}" + logger.info(command) + subprocess.call(command, shell=True) + + if terminate: + return + + os.remove(bucket_file_path) + + +parser = argparse.ArgumentParser(description="sort 13gram buckets") +parser.add_argument("-dir", "--working_directory", default="") + +if __name__ == "__main__": + version = 1.00 + print(f"Running version {version}") + + # Handle sigint (ctrl-c) cleanly + previous_signal_int = signal.signal(SIGINT, handler) + + logfile_path = "sort13grambuckets.log" + setup_logger_tqdm(logfile_path) + + args = parser.parse_args() + sort_13_gram_buckets(args.working_directory) diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/cost_estimate.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/cost_estimate.py new file mode 100644 index 0000000000000000000000000000000000000000..baf81147547b0a7a92e52904c70cb11d246f680b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/cost_estimate.py @@ -0,0 +1,99 @@ +import random + +import transformers + +from lm_eval import evaluator, tasks +from lm_eval.api.model import LM + + +class DryrunLM(LM): + def __init__(self): + self.tokencost = 0 + self.tokenizer = transformers.GPT2TokenizerFast.from_pretrained("gpt2") + self.tokenizer.pad_token = "<|endoftext|>" + + @classmethod + def create_from_arg_string(cls, arg_string): + return cls() + + def loglikelihood(self, requests): + res = [] + + for ctx, cont in requests: + res.append((-random.random(), False)) + self.tokencost += len(self.tokenizer.tokenize(ctx + cont)) + + return res + + def generate_until(self, requests): + res = [] + + for ctx, _ in requests: + res.append("lol") + + # assume worst case - generates until 256 + self.tokencost += len(self.tokenizer.tokenize(ctx)) + 256 + + return res + + def loglikelihood_rolling(self, requests): + res = [] + + for (s,) in requests: + # assume worst case: extra full context + self.tokencost += len(self.tokenizer.tokenize(s)) + 2048 + + return res + + +def main(): + lm = DryrunLM() + + task_list = "arc_challenge,arc_easy,boolq,cola,copa,headqa,hellaswag,lambada,logiqa,mathqa,mc_taco,mrpc,multirc,openbookqa,piqa,prost,pubmedqa,qnli,qqp,race,record,rte,sciq,sst,triviaqa,webqs,wic,wikitext,winogrande,wnli,wsc" + values = [] + for taskname in task_list.split(","): + lm.tokencost = 0 + evaluator.simple_evaluate( + lm=lm, + task_dict={taskname: tasks.get_task(taskname)()}, + num_fewshot=0, + limit=None, + bootstrap_iters=10, + ) + + print(taskname, lm.tokencost) + values.append( + [ + taskname, + lm.tokencost, + lm.tokencost / 1000 * 0.0008, + lm.tokencost / 1000 * 0.0012, + lm.tokencost / 1000 * 0.006, + lm.tokencost / 1000 * 0.06, + ] + ) + from pytablewriter import MarkdownTableWriter + + writer = MarkdownTableWriter() + writer.headers = ["Task", "Tokens", "Ada", "Babbage", "Curie", "Davinci"] + + values.sort(key=lambda x: -x[1]) + totcost = sum([x[1] for x in values]) + values.append( + [ + "**Total**", + totcost, + totcost / 1000 * 0.0008, + totcost / 1000 * 0.0012, + totcost / 1000 * 0.006, + totcost / 1000 * 0.06, + ] + ) + + writer.value_matrix = values + + print(writer.dumps()) + + +if __name__ == "__main__": + main() diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/get_prompts.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/get_prompts.py new file mode 100644 index 0000000000000000000000000000000000000000..d262ec37e40f229c2009f9f162cc58834291de12 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/get_prompts.py @@ -0,0 +1,25 @@ +from itertools import islice + +from lm_eval import tasks + + +ct = 3 + +for ( + tname, + Task, +) in tasks.TASK_REGISTRY.items(): # [('record', tasks.superglue.ReCoRD)]:# + task = Task() + + print("#", tname) + docs = islice( + task.validation_docs() if task.has_validation_docs() else task.test_docs(), ct + ) + print() + for i in range(ct): + print() + doc = next(docs) + print("**Context**:", "\n```\n" + task.doc_to_text(doc) + "\n```\n") + print() + print("**Target**:", "\n```\n" + task.doc_to_target(doc) + "\n```\n") + print() diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/make_gpt2_test_cases.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/make_gpt2_test_cases.py new file mode 100644 index 0000000000000000000000000000000000000000..0c1a4bffe03ef057c331dc9a20c0a5eadb46be66 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/make_gpt2_test_cases.py @@ -0,0 +1,48 @@ +import random + +import torch +import torch.nn.functional as F +import transformers + + +random.seed(42) + + +data = [ + "A multilayer perceptron (MLP) is a class of feedforward artificial neural network (ANN)", + "The term MLP is used ambiguously, sometimes loosely to any feedforward ANN, sometimes strictly to refer to networks composed of multiple layers of perceptrons (with threshold activation); see § Terminology", + 'Multilayer perceptrons are sometimes colloquially referred to as "vanilla" neural networks, especially when they have a single hidden layer.[1]', + "An MLP consists of at least three layers of nodes: an input layer, a hidden layer and an output layer. Except for the input nodes, each node is a neuron that uses a nonlinear activation function.", + "MLP utilizes a supervised learning technique called backpropagation for training.[2][3] Its multiple layers and non-linear activation distinguish MLP from a linear perceptron. It can distinguish data that is not linearly separable.[4]", + "Recent work has demonstrated substantial gains on many NLP tasks and benchmarks by pre-training on a large corpus of text followed by fine-tuning on a specific task. While typically task-agnostic in architecture, this method still requires task-specific fine-tuning datasets of thousands or tens of thousands of examples. By contrast, humans can generally perform a new language task from only a few examples or from simple instructions - something which current NLP systems still largely struggle to do. Here we show that scaling up language models greatly improves task-agnostic, few-shot performance, sometimes even reaching competitiveness with prior state-of-the-art fine-tuning approaches. ", + "Specifically, we train GPT-3, an autoregressive language model with 175 billion parameters, 10x more than any previous non-sparse language model, and test its performance in the few-shot setting. For all tasks, GPT-3 is applied without any gradient updates or fine-tuning, with tasks and few-shot demonstrations specified purely via text interaction with the model. GPT-3 achieves strong performance on many NLP datasets, including translation, question-answering, and cloze tasks, as well as several tasks that require on-the-fly reasoning or domain adaptation, such as unscrambling words, using a novel word in a sentence, or performing 3-digit arithmetic. At the same time, we also identify some datasets where GPT-3's few-shot learning still struggles, as well as some datasets where GPT-3 faces methodological issues related to training on large web corpora. Finally, we find that GPT-3 can generate samples of news articles which human evaluators have difficulty distinguishing from articles written by humans. We discuss broader societal impacts of this finding and of GPT-3 in general.", + "A multilayer perceptron (MLP) is a class of feedforward artificial neural network (ANN)", + "Hello World", +] + + +model = transformers.GPT2LMHeadModel.from_pretrained("gpt2") +tok = transformers.GPT2Tokenizer.from_pretrained("gpt2") + +tgs = [] + +for dat in data: + random.seed(dat) + # print(model(tok.encode(dat, return_tensors="pt"))[0][0]) + + toks = tok.encode(dat, return_tensors="pt") + ind = random.randrange(len(toks[0]) - 1) + logits = F.log_softmax(model(toks)[0], dim=-1)[:, :-1] # [batch, seq, vocab] + + res = torch.gather(logits, 2, toks[:, 1:].unsqueeze(-1)).squeeze(-1)[0] + + tgs.append(float(res[ind:].sum())) + print( + r'("""' + + tok.decode(toks[0, : ind + 1]) + + r'""", """' + + tok.decode(toks[0, ind + 1 :]) + + r'"""), ' + ) + +print(tgs) diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/make_table_results.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/make_table_results.py new file mode 100644 index 0000000000000000000000000000000000000000..59eddb4a4fdac05c1d2ce3623a7bd4312101bec2 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/make_table_results.py @@ -0,0 +1,75 @@ +""" +Usage: + python make_table_tasks.py --output +""" + +import json +import logging +import os + +from pytablewriter import LatexTableWriter, MarkdownTableWriter + + +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger(__name__) + + +def make_table(result_dict): + """Generate table of results.""" + md_writer = MarkdownTableWriter() + latex_writer = LatexTableWriter() + md_writer.headers = ["Task", "Version", "Metric", "Value", "", "Stderr"] + latex_writer.headers = ["Task", "Version", "Metric", "Value", "", "Stderr"] + + values = [] + + for k, dic in sorted(result_dict["results"].items()): + version = result_dict["versions"][k] + percent = k == "squad2" + for m, v in dic.items(): + if m.endswith("_stderr"): + continue + + if m + "_stderr" in dic: + se = dic[m + "_stderr"] + if percent or m == "ppl": + values.append([k, version, m, "%.2f" % v, "±", "%.2f" % se]) + else: + values.append( + [k, version, m, "%.2f" % (v * 100), "±", "%.2f" % (se * 100)] + ) + else: + if percent or m == "ppl": + values.append([k, version, m, "%.2f" % v, "", ""]) + else: + values.append([k, version, m, "%.2f" % (v * 100), "", ""]) + k = "" + version = "" + md_writer.value_matrix = values + latex_writer.value_matrix = values + + # todo: make latex table look good + # print(latex_writer.dumps()) + + return md_writer.dumps() + + +if __name__ == "__main__": + # loop dirs and subdirs in results dir + # for each dir, load json files + for dirpath, dirnames, filenames in os.walk("../results"): + # skip dirs without files + if not filenames: + continue + path_readme = os.path.join(dirpath, "README.md") + with open(path_readme, "w", encoding="utf-8") as f: + # get path name, only last folder + path_name = dirpath.split("/")[-1] + f.write(f"# {path_name} \n\n") + for filename in sorted([f for f in filenames if f.endswith(".json")]): + path = os.path.join(dirpath, filename) + with open(path, "r", encoding="utf-8") as f: + result_dict = json.load(f) + with open(path_readme, "a", encoding="utf-8") as f: + f.write(f"## {filename} \n") + f.write(f"{make_table(result_dict)} \n") diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/make_table_tasks.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/make_table_tasks.py new file mode 100644 index 0000000000000000000000000000000000000000..8a3b19634b11eb9974a32dcd2a80cab3f0940f9e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/make_table_tasks.py @@ -0,0 +1,55 @@ +""" +Usage: + python make_table_tasks.py --output +""" + +import argparse +import logging + +from pytablewriter import MarkdownTableWriter + +from lm_eval import tasks + + +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger(__name__) + + +def check(tf): + if tf: + return "✓" + else: + return " " + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--output", type=str, default="task_table.md") + args = parser.parse_args() + + writer = MarkdownTableWriter() + writer.headers = ["Task Name", "Train", "Val", "Test", "Val/Test Docs", "Metrics"] + values = [] + + tasks = tasks.TASK_REGISTRY.items() + tasks = sorted(tasks, key=lambda x: x[0]) + for tname, Task in tasks: + task = Task() + v = [ + tname, + check(task.has_training_docs()), + check(task.has_validation_docs()), + check(task.has_test_docs()), + len( + list( + task.test_docs() if task.has_test_docs() else task.validation_docs() + ) + ), + ", ".join(task.aggregation().keys()), + ] + logger.info(v) + values.append(v) + writer.value_matrix = values + table = writer.dumps() + with open(args.output, "w", encoding="utf-8") as f: + f.write(table) diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/model_comparator.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/model_comparator.py new file mode 100644 index 0000000000000000000000000000000000000000..55f4f3b15468b2f46e590cbfd82d7902f1d9a16f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/model_comparator.py @@ -0,0 +1,139 @@ +import argparse +import os +from typing import Dict, List, Tuple + +import numpy as np +import pandas as pd +import torch + +import lm_eval.evaluator +import lm_eval.models.utils +from lm_eval import tasks, utils + + +os.environ["TOKENIZERS_PARALLELISM"] = "false" +eval_logger = utils.eval_logger + + +def memory_stats(): + eval_logger.info( + f"Memory allocated: {torch.cuda.memory_allocated() / 1024 ** 2}, reserved: {torch.cuda.memory_reserved() // 1024 ** 2}" + ) + + +def calculate_z_value(res1: Dict, res2: Dict) -> Tuple[float, float]: + from scipy.stats.norm import sf + + acc1, acc2 = res1["acc,none"], res2["acc,none"] + st_err1, st_err2 = res1["acc_stderr,none"], res2["acc_stderr,none"] + Z = (acc1 - acc2) / np.sqrt((st_err1**2) + (st_err2**2)) + # Determining the p-value + p_value = 2 * sf(abs(Z)) # two-tailed test + return Z, p_value + + +def print_results( + data_to_print: List = None, results_dict: Dict = None, alpha: float = None +): + model1_data = data_to_print[0] + model2_data = data_to_print[1] + table_data = [] + for task in model1_data.keys(): + row = { + "Task": task, + "HF Accuracy": model1_data[task]["acc,none"], + "vLLM Accuracy": model2_data[task]["acc,none"], + "HF StdErr": model1_data[task]["acc_stderr,none"], + "vLLM StdErr": model2_data[task]["acc_stderr,none"], + } + table_data.append(row) + comparison_df = pd.DataFrame(table_data) + comparison_df["Z-Score"] = comparison_df["Task"].apply( + lambda task: results_dict[task]["z"] + ) + comparison_df["P-Value"] = comparison_df["Task"].apply( + lambda task: results_dict[task]["p_value"] + ) + comparison_df[f"p > {alpha}"] = comparison_df["P-Value"].apply( + lambda p: "✓" if p > alpha else "×" + ) + return comparison_df + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument( + "--pretrained", default="EleutherAI/pythia-70m", help="name of model to compare" + ) + parser.add_argument( + "--hf_args", help="huggingface model args =", default="" + ) + parser.add_argument("--vllm_args", help="vllm model args =", default="") + parser.add_argument("--tasks", type=str, default="arc_easy,hellaswag") + parser.add_argument( + "--limit", + type=float, + default=100, + ) + parser.add_argument( + "--alpha", + type=float, + default=0.05, + help="Significance level for two-tailed z-test", + ) + parser.add_argument( + "--device", + type=str, + default="cuda", + ) + parser.add_argument( + "--batch", + type=str, + default=8, + ) + parser.add_argument( + "--verbosity", + type=str, + default="INFO", + help="Logging verbosity", + ) + return parser.parse_args() + + +if __name__ == "__main__": + tasks.initialize_tasks() + args = parse_args() + tasks = args.tasks.split(",") + print(tasks) + hf_args, vllm_args = "," + args.hf_args, "," + args.vllm_args + results_vllm = lm_eval.evaluator.simple_evaluate( + model="vllm", + model_args=f"pretrained={args.pretrained}" + vllm_args, + tasks=tasks, + limit=args.limit, + device=args.device, + batch_size=args.batch, + ) + memory_stats() + lm_eval.models.utils.clear_torch_cache() + eval_logger.info("Memory stats cleared") + memory_stats() + results_hf = lm_eval.evaluator.simple_evaluate( + model="hf", + model_args=f"pretrained={args.pretrained}" + hf_args, + tasks=tasks, + limit=args.limit, + device=args.device, + batch_size=args.batch, + ) + all_res = {} + for task1, task2 in zip( + results_hf["results"].items(), results_vllm["results"].items() + ): + assert task1[0] == task2[0] + z, p_value = calculate_z_value(task1[1], task2[1]) + all_res[task1[0]] = {"z": z, "p_value": p_value} + df = print_results( + [results_hf["results"], results_vllm["results"]], all_res, args.alpha + ) + print(df) diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/regression.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/regression.py new file mode 100644 index 0000000000000000000000000000000000000000..75258dcb640a4f32a0011e864d390e9619f6e2e3 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/regression.py @@ -0,0 +1,199 @@ +import argparse +import json +import os +import subprocess +import time +from pathlib import Path + +from lm_eval import utils +from lm_eval.api.registry import ALL_TASKS + + +seq2seq_models = ["google/flan-t5-small"] +causal_models = [ + "gpt2", + "facebook/opt-125m", + "EleutherAI/gpt-neo-125m", + "EleutherAI/pythia-160m", +] +model_names = seq2seq_models + causal_models + + +completion_tasks = ["boolq", "lambada_openai", "winogrande"] +choice_tasks = ["hellaswag", "openbookqa", "piqa"] +perplexity_tasks = ["wikitext"] +generation_tasks = [] +task_names = completion_tasks + choice_tasks + perplexity_tasks + generation_tasks + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument("--branches", default=[]) + parser.add_argument("--models", default=model_names) + parser.add_argument("--tasks", default=task_names) + parser.add_argument("--acc_norm", type=bool, default=False) + parser.add_argument("--perplexity", default=None) + # TODO: implement num_fewshot and limit per task, e.g. task1:5,task2:1:100,task3::1000 + parser.add_argument("--num_fewshot", type=int, default=0) + parser.add_argument("--limit", type=float, default=None) + # TODO: implement hf-auto to pick between causal and seq2seq models so we don't need this + parser.add_argument("--model", default="hf-causal") + # Use whatever is faster here + parser.add_argument("--model_args", default="use_accelerate=True,load_in_8bit=True") + parser.add_argument("--batch_size", default="auto") + return parser.parse_args() + + +def eval_models(args, branch=None): + if branch is not None: + if os.system(f"git checkout {branch}") != 0: + return {}, 0 + + branch = branch or initial_branch + + start_time = time.time() + + results = {} + + for model in args.models: + model_type = ( + "hf-causal" + if model in causal_models + else "hf-seq2seq" + if model in seq2seq_models + else args.model + ) + model_args = f"pretrained={model},{args.model_args}" + # TODO: split_and_pad_windows in AutoSeq2SeqLM doesn"t exist, #527 + tasks = ( + args.tasks + if model in causal_models or model_type == "hf-causal" + else list(filter(lambda task: task not in perplexity_tasks, args.tasks)) + ) + # TODO: OOM with auto for seq2seq models, also can OOM with llama + batch_size = ( + args.batch_size + if model in causal_models or model_type == "hf-causal" + else 64 + if args.batch_size == "auto" + else args.batch_size + ) + output_path = ( + f"data/regression/{int(start_time)}-{branch}-{Path(model).name}.json" + ) + + command = ( + f"python3 main.py --model {model_type} --model_args {model_args} --tasks {','.join(tasks)} " + f"--num_fewshot {args.num_fewshot}{'' if args.limit is None else f' --limit {args.limit}'} " + f"--batch_size {batch_size} --no_cache --output_path {output_path}" + ) + + print( + f"{'=' * 80}\nEvaluating {model} on {', '.join(tasks)} at {branch} with:\n\n{command}\n{'=' * 80}" + ) + + ret = os.system(command) + + results[model] = ( + json.load(open(output_path, encoding="utf-8")) + if ret == 0 + else {"results": {}} + ) + + end_time = time.time() + + return results, end_time - start_time + + +def extract_value(args, results, model, task, err=False): + if model not in results: + return 0 + results = results[model]["results"] + if task not in results: + return 0 + results = results[task] + if args.acc_norm and "acc_norm,none" in results: + return results["acc_norm,none"] if not err else results["acc_norm_stderr,none"] + if "acc,none" in results: + return results["acc,none"] if not err else results["acc_stderr,none"] + if (args.perplexity or "word_perplexity") + ",none" in results: + return ( + results[(args.perplexity or "word_perplexity") + ",none"] if not err else 0 + ) + return 0 + + +def format_value(args, results, model, task): + val = 100 * extract_value(args, results, model, task) + err = 100 * extract_value(args, results, model, task, err=True) + return f"{val:.2f}{f' ± {err:.2f}' if err != 0 else ''}" + + +def format_diff(args, results1, results2, model, task): + val1 = 100 * extract_value(args, results1, model, task) + val2 = 100 * extract_value(args, results2, model, task) + diff = val2 - val1 + return f"**+{diff:.2f}**" if diff > 0 else f"{diff:.2f}" + + +def main(): + args = parse_args() + + args.branches = ( + args.branches.split(",") if isinstance(args.branches, str) else args.branches + ) + args.models = ( + args.models.split(",") if isinstance(args.models, str) else args.models + ) + args.tasks = ( + ALL_TASKS + if args.tasks == "all_tasks" + else utils.pattern_match(args.tasks.split(","), ALL_TASKS) + if isinstance(args.tasks, str) + else args.tasks + ) + + global initial_branch + initial_branch = ( + subprocess.check_output("git branch --show-current", shell=True) + .decode("ascii") + .strip() + ) + + # TODO: implement proper timing for each task + # TODO: reduce IO by sharing tasks between models? + + results, runtime = eval_models(args) + print(results, runtime) + + runs = [] + for branch in args.branches: + runs.append((branch, *eval_models(args, branch))) + + os.system(f"git checkout {initial_branch}") + + print("") + print(f"|task|{'|'.join(map(lambda model: Path(model).name, args.models))}|") + print(f"|--|{'--|' * len(args.models)}") + for task in args.tasks: + print( + f"|{task} ({initial_branch})|{'|'.join(map(lambda model: format_value(args, results, model, task), args.models))}|" + ) + for branch, branch_results, branch_runtime in runs: + print( + f"|{task} ({branch})|{'|'.join(map(lambda model: format_value(args, branch_results, model, task), args.models))}|" + ) + print( + f"|{task} (diff)|{'|'.join(map(lambda model: format_diff(args, results, branch_results, model, task), args.models))}|" + ) + + print("") + print("|branch|runtime|%|") + print("|--|--|--|") + print(f"|{initial_branch}|{runtime:.1f}s|100%|") + for branch, _, branch_runtime in runs: + print(f"|{branch}|{branch_runtime:.1f}s|{100 * branch_runtime / runtime:.2f}%|") + + +if __name__ == "__main__": + main() diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/requests_caching.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/requests_caching.py new file mode 100644 index 0000000000000000000000000000000000000000..2aaf323485606c61b435fe0f3ab5a6c97b5561b5 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/requests_caching.py @@ -0,0 +1,92 @@ +""" +Usage: + python requests_caching.py --tasks=comma,separated,list,of,tasks --cache_requests= +""" + +import argparse +import os +from typing import List + +import torch +from transformers import ( + pipeline as trans_pipeline, +) + +from lm_eval import simple_evaluate +from lm_eval.evaluator import request_caching_arg_to_dict +from lm_eval.utils import eval_logger + + +MODULE_DIR = os.path.dirname(os.path.realpath(__file__)) + +# Used to specify alternate cache path, useful if run in a docker container +# NOTE raw datasets will break if you try to transfer the cache from your host to a docker image +LM_HARNESS_CACHE_PATH = os.getenv("LM_HARNESS_CACHE_PATH") + + +DEVICE = "cuda" if torch.cuda.is_available() else "cpu" + +MODEL = "EleutherAI/pythia-70m" + +TASK = "text-generation" + + +def run_model_for_task_caching(tasks: List[str], cache_requests: str): + eval_logger.info(f"Loading HF model: {MODEL}") + + trans_pipe = trans_pipeline( + task=TASK, model=MODEL, device=DEVICE, trust_remote_code=True + ) + + model = trans_pipe.model + tokenizer = trans_pipe.tokenizer + + eval_logger.info( + f"Running simple_evaluate to cache request objects for tasks: {tasks}" + ) + + cache_args = request_caching_arg_to_dict(cache_requests=cache_requests) + + eval_logger.info( + f"The following operations will be performed on the cache: {cache_requests}" + ) + + eval_data = simple_evaluate( + model="hf-auto", + model_args={ + "pretrained": model, + "tokenizer": tokenizer, + }, + limit=1, + device=DEVICE, + tasks=tasks, + write_out=True, + **cache_args, + ) + + return eval_data + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument( + "--tasks", + "-t", + default=None, + metavar="task1,task2", + ) + parser.add_argument( + "--cache_requests", + type=str, + default=None, + choices=["true", "refresh", "delete"], + help="Speed up evaluation by caching the building of dataset requests. `None` if not caching.", + ) + + args = parser.parse_args() + + tasks = args.tasks.split(",") + + eval_data = run_model_for_task_caching( + tasks=tasks, model=MODEL, device=DEVICE, cache_requests=args.cache_requests + ) diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/write_out.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/write_out.py new file mode 100644 index 0000000000000000000000000000000000000000..6ff5a4304ed7798f8e375abeb8a5f30cb2aedcea --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/write_out.py @@ -0,0 +1,97 @@ +import argparse +import os +import random + +import numpy as np + +from lm_eval import tasks +from lm_eval.tasks import TaskManager +from lm_eval.utils import eval_logger, join_iters + + +EXAMPLE_DIVIDER = "!!@@##@@!! -- Example {i}\n" + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument("--output_base_path", "--output_path", required=True) + parser.add_argument("--tasks", default="all_tasks") + parser.add_argument("--sets", type=str, default="val") # example: val,test + parser.add_argument("--num_fewshot", type=int, default=1) + parser.add_argument("--seed", type=int, default=42) + parser.add_argument("--num_examples", type=int, default=1) + parser.add_argument( + "--include_path", + type=str, + default=None, + help="Additional path to include if there are external tasks to include.", + ) + parser.add_argument( + "--verbosity", + type=str, + default="INFO", + help="Log error when tasks are not registered.", + ) + return parser.parse_args() + + +def main(): + args = parse_args() + np.random.seed(args.seed) + + if args.include_path is not None: + eval_logger.info(f"Including path: {args.include_path}") + + task_manager = TaskManager(args.verbosity, include_path=args.include_path) + + if args.tasks == "all_tasks": + task_names = task_manager.all_tasks + else: + task_names = args.tasks.split(",") + task_dict = tasks.get_task_dict(task_names, task_manager) + + os.makedirs(args.output_base_path, exist_ok=True) + for task_name, task in task_dict.items(): + if isinstance(task, tuple): + _, task = task + rnd = random.Random() + rnd.seed(args.seed) + + iters = [] + + for set in args.sets.split(","): + docs = None + if set == "train" and task.has_training_docs(): + docs = task.training_docs() + if set == "val" and task.has_validation_docs(): + docs = task.validation_docs() + if set == "test" and task.has_test_docs(): + docs = task.test_docs() + if docs is not None: + iters.append(docs) + + if len(iters) == 0: + raise ValueError( + f"Passed --sets '{args.sets}' but this task has no splits which match. Please specify a different --sets value." + ) + + docs = join_iters(iters) + + with open( + os.path.join(args.output_base_path, task_name), "w", encoding="utf8" + ) as f: + for i, doc in ( + zip(range(args.num_examples), docs) + if args.num_examples > 0 + else enumerate(docs) + ): + f.write(EXAMPLE_DIVIDER.format(i=i)) + ctx = task.fewshot_context( + doc=doc, + num_fewshot=args.num_fewshot, + ) + f.write(ctx + "\n") + + +if __name__ == "__main__": + main() diff --git a/testbed/EleutherAI__lm-evaluation-harness/scripts/zeno_visualize.py b/testbed/EleutherAI__lm-evaluation-harness/scripts/zeno_visualize.py new file mode 100644 index 0000000000000000000000000000000000000000..4bc7e03bf8417646ee5ffad9bd7f25e332dac597 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/scripts/zeno_visualize.py @@ -0,0 +1,242 @@ +import argparse +import json +import os +import re +from pathlib import Path + +import pandas as pd +from zeno_client import ZenoClient, ZenoMetric + +from lm_eval.utils import ( + eval_logger, + get_latest_filename, + get_results_filenames, + get_sample_results_filenames, +) + + +def parse_args(): + parser = argparse.ArgumentParser( + description="Upload your data to the Zeno AI evaluation platform to visualize results. This requires a ZENO_API_KEY in your environment variables. The eleuther harness must be run with log_samples=True and an output_path set for data to be written to disk." + ) + parser.add_argument( + "--data_path", + required=True, + help="Where to find the results of the benchmarks that have been run. Uses the name of each subfolder as the model name.", + ) + parser.add_argument( + "--project_name", + required=True, + help="The name of the generated Zeno project.", + ) + return parser.parse_args() + + +def main(): + """Upload the results of your benchmark tasks to the Zeno AI evaluation platform. + + This scripts expects your results to live in a data folder where subfolders contain results of individual models. + """ + args = parse_args() + + client = ZenoClient(os.environ["ZENO_API_KEY"]) + + # Get all model subfolders from the parent data folder. + models = [ + os.path.basename(os.path.normpath(f)) + for f in os.scandir(Path(args.data_path)) + if f.is_dir() + ] + + assert len(models) > 0, "No model directories found in the data_path." + + # Get the tasks from the latest results file of the first model. + tasks = set(tasks_for_model(models[0], args.data_path)) + + # Get tasks names from the latest results file for each model + # Get intersection of tasks for all models + for model in models: + old_tasks = tasks.copy() + task_count = len(tasks) + model_tasks = set(tasks_for_model(model, args.data_path)) + tasks.intersection(set(model_tasks)) + + if task_count != len(tasks): + eval_logger.warning( + f"All models must have the same tasks. {model} has tasks: {model_tasks} but have already recorded tasks: {old_tasks}. Taking intersection {tasks}" + ) + + assert ( + len(tasks) > 0 + ), "Must provide at least one task in common amongst models to compare." + + for task in tasks: + # Upload data for all models + for model_index, model in enumerate(models): + # Get latest results and sample results for a model + model_dir = Path(args.data_path, model) + model_files = [f.as_posix() for f in model_dir.iterdir() if f.is_file()] + model_results_filenames = get_results_filenames(model_files) + model_sample_filenames = get_sample_results_filenames(model_files) + latest_results = get_latest_filename( + [Path(f).name for f in model_results_filenames] + ) + latest_sample_results = get_latest_filename( + [Path(f).name for f in model_sample_filenames if task in f] + ) + model_args = re.sub( + r"[\"<>:/\|\\?\*\[\]]+", + "__", + json.load( + open(Path(args.data_path, model, latest_results), encoding="utf-8") + )["config"]["model_args"], + ) + print(model_args) + data = [] + with open( + Path(args.data_path, model, latest_sample_results), + "r", + encoding="utf-8", + ) as file: + for line in file: + data.append(json.loads(line.strip())) + + configs = json.load( + open(Path(args.data_path, model, latest_results), encoding="utf-8") + )["configs"] + config = configs[task] + + if model_index == 0: # Only need to assemble data for the first model + metrics = [] + for metric in config["metric_list"]: + metrics.append( + ZenoMetric( + name=metric["metric"], + type="mean", + columns=[metric["metric"]], + ) + ) + project = client.create_project( + name=args.project_name + (f"_{task}" if len(tasks) > 1 else ""), + view="text-classification", + metrics=metrics, + ) + project.upload_dataset( + generate_dataset(data, config), + id_column="id", + data_column="data", + label_column="labels", + ) + + project.upload_system( + generate_system_df(data, config), + name=model, + id_column="id", + output_column="output", + ) + + +def tasks_for_model(model: str, data_path: str): + """Get the tasks for a specific model. + + Args: + model (str): The name of the model. + data_path (str): The path to the data. + + Returns: + list: A list of tasks for the model. + """ + # get latest model results for a given name + model_dir = Path(data_path, model) + model_files = [f.as_posix() for f in model_dir.iterdir() if f.is_file()] + model_results_filenames = get_results_filenames(model_files) + latest_results = get_latest_filename(model_results_filenames) + config = (json.load(open(latest_results, encoding="utf-8"))["configs"],) + return list(config[0].keys()) + + +def generate_dataset( + data, + config, +): + """Generate a Zeno dataset from evaluation data. + + Args: + data: The data to generate a dataset for. + config: The configuration of the task. + + Returns: + pd.Dataframe: A dataframe that is ready to be uploaded to Zeno. + """ + ids = [x["doc_id"] for x in data] + labels = [x["target"] for x in data] + instance = [""] * len(ids) + + if config["output_type"] == "loglikelihood": + instance = [x["arguments"]["gen_args_0"]["arg_0"] for x in data] + labels = [x["arguments"]["gen_args_0"]["arg_1"] for x in data] + elif config["output_type"] == "multiple_choice": + instance = [ + x["arguments"]["gen_args_0"]["arg_0"] + + "\n\n" + + "\n".join([f"- {y[1]}" for y in x["arguments"]]) + for x in data + ] + elif config["output_type"] == "loglikelihood_rolling": + instance = [x["arguments"]["gen_args_0"]["arg_0"] for x in data] + elif config["output_type"] == "generate_until": + instance = [x["arguments"]["gen_args_0"]["arg_0"] for x in data] + + return pd.DataFrame( + { + "id": ids, + "data": instance, + "input_len": [len(x) for x in instance], + "labels": labels, + "output_type": config["output_type"], + } + ) + + +def generate_system_df(data, config): + """Generate a dataframe for a specific system to be uploaded to Zeno. + + Args: + data: The data to generate a dataframe from. + config: The configuration of the task. + + Returns: + pd.Dataframe: A dataframe that is ready to be uploaded to Zeno as a system. + """ + ids = [x["doc_id"] for x in data] + system_dict = {"id": ids} + system_dict["output"] = [""] * len(ids) + + if config["output_type"] == "loglikelihood": + system_dict["output"] = [ + "correct" if x["filtered_resps"][0][1] is True else "incorrect" + for x in data + ] + elif config["output_type"] == "multiple_choice": + system_dict["output"] = [ + ", ".join([str(y[0]) for y in x["filtered_resps"]]) for x in data + ] + system_dict["num_answers"] = [len(x["filtered_resps"]) for x in data] + elif config["output_type"] == "loglikelihood_rolling": + system_dict["output"] = [str(x["filtered_resps"][0]) for x in data] + elif config["output_type"] == "generate_until": + system_dict["output"] = [str(x["filtered_resps"][0]) for x in data] + system_dict["output_length"] = [len(str(x["filtered_resps"][0])) for x in data] + + metrics = {} + for metric in config["metric_list"]: + if "aggregation" in metric and metric["aggregation"] == "mean": + metrics[metric["metric"]] = [x[metric["metric"]] for x in data] + + system_dict.update(metrics) + system_df = pd.DataFrame(system_dict) + return system_df + + +if __name__ == "__main__": + main() diff --git a/testbed/EleutherAI__lm-evaluation-harness/templates/new_yaml_task/README.md b/testbed/EleutherAI__lm-evaluation-harness/templates/new_yaml_task/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3b7259c79cfe8353d3318674e212f8cccd57409f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/templates/new_yaml_task/README.md @@ -0,0 +1,46 @@ +# Task-name + +### Paper + +Title: `paper titles goes here` + +Abstract: `link to paper PDF or arXiv abstract goes here` + +`Short description of paper / benchmark goes here:` + +Homepage: `homepage to the benchmark's website goes here, if applicable` + + +### Citation + +``` +BibTeX-formatted citation goes here +``` + +### Groups, Tags, and Tasks + +#### Groups + +* `group_name`: `Short description` + +#### Tags + +* `tag_name`: `Short description` + +#### Tasks + +* `task_name`: `1-sentence description of what this particular task does` +* `task_name2`: ... + +### Checklist + +For adding novel benchmarks/datasets to the library: +* [ ] Is the task an existing benchmark in the literature? + * [ ] Have you referenced the original paper that introduced the task? + * [ ] If yes, does the original paper provide a reference implementation? If so, have you checked against the reference implementation and documented how to run such a test? + + +If other tasks on this dataset are already supported: +* [ ] Is the "Main" variant of this task clearly denoted? +* [ ] Have you provided a short sentence in a README on what each new variant adds / evaluates? +* [ ] Have you noted which, if any, published evaluation setups are matched by this variant? diff --git a/testbed/EleutherAI__lm-evaluation-harness/templates/new_yaml_task/blank_yaml.yaml b/testbed/EleutherAI__lm-evaluation-harness/templates/new_yaml_task/blank_yaml.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_api.py b/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_api.py new file mode 100644 index 0000000000000000000000000000000000000000..1bca2f7bdbc479d6c8c45171347f11dd8c8892d9 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_api.py @@ -0,0 +1,149 @@ +from unittest.mock import MagicMock, patch + +import pytest + +from lm_eval.models.openai_completions import LocalCompletionsAPI + + +@pytest.fixture +def api(): + return LocalCompletionsAPI( + base_url="http://test-url.com", tokenizer_backend=None, model="gpt-3.5-turbo" + ) + + +@pytest.fixture +def api_tokenized(): + return LocalCompletionsAPI( + base_url="http://test-url.com", + model="EleutherAI/pythia-1b", + tokenizer_backend="huggingface", + ) + + +def test_create_payload_generate(api): + messages = ["Generate a story"] + gen_kwargs = { + "max_tokens": 100, + "temperature": 0.7, + "until": ["The End"], + "do_sample": True, + "seed": 1234, + } + payload = api._create_payload(messages, generate=True, gen_kwargs=gen_kwargs) + + assert payload == { + "prompt": ["Generate a story"], + "model": "gpt-3.5-turbo", + "max_tokens": 100, + "temperature": 0.7, + "stop": ["The End"], + "seed": 1234, + } + + +def test_create_payload_loglikelihood(api): + messages = ["The capital of France is"] + payload = api._create_payload(messages, generate=False, gen_kwargs=None) + + assert payload == { + "model": "gpt-3.5-turbo", + "prompt": ["The capital of France is"], + "max_tokens": 1, + "logprobs": 1, + "echo": True, + "temperature": 0, + "seed": 1234, + } + + +@pytest.mark.parametrize( + "input_messages, generate, gen_kwargs, expected_payload", + [ + ( + ["Hello, how are"], + True, + {"max_gen_toks": 100, "temperature": 0.7}, + { + "prompt": "Hello, how are", + "model": "gpt-3.5-turbo", + "max_tokens": 100, + "temperature": 0.7, + "stop": ["<|endoftext|>"], + "seed": 1234, + }, + ), + ( + ["Hello, how are", "you"], + True, + {}, + { + "prompt": "Hello, how are", + "model": "gpt-3.5-turbo", + "max_tokens": 256, + "temperature": 0, + "stop": ["<|endoftext|>"], + "seed": 1234, + }, + ), + ], +) +def test_model_generate_call_usage( + api, input_messages, generate, gen_kwargs, expected_payload +): + with patch("requests.post") as mock_post: + mock_response = MagicMock() + mock_response.json.return_value = {"result": "success"} + mock_post.return_value = mock_response + + # Act + result = api.model_call( + input_messages, generate=generate, gen_kwargs=gen_kwargs + ) + + # Assert + mock_post.assert_called_once() + _, kwargs = mock_post.call_args + assert "json" in kwargs + assert kwargs["json"] == expected_payload + assert result == {"result": "success"} + + +@pytest.mark.parametrize( + "input_messages, generate, gen_kwargs, expected_payload", + [ + ( + [[1, 2, 3, 4, 5]], + False, + None, + { + "model": "EleutherAI/pythia-1b", + "prompt": [[1, 2, 3, 4, 5]], + "max_tokens": 1, + "logprobs": 1, + "echo": True, + "seed": 1234, + "temperature": 0, + }, + ), + ], +) +def test_model_tokenized_call_usage( + api_tokenized, input_messages, generate, gen_kwargs, expected_payload +): + with patch("requests.post") as mock_post: + mock_response = MagicMock() + mock_response.json.return_value = {"result": "success"} + mock_post.return_value = mock_response + + # Act + result = api_tokenized.model_call( + input_messages, generate=generate, gen_kwargs=gen_kwargs + ) + + # Assert + mock_post.assert_called_once() + _, kwargs = mock_post.call_args + assert "json" in kwargs + assert kwargs["json"] == expected_payload + assert result == {"result": "success"} diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_gguf.py b/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_gguf.py new file mode 100644 index 0000000000000000000000000000000000000000..b5e197e77418fe83e3cc1cf96e23223b80afe633 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_gguf.py @@ -0,0 +1,152 @@ +import hashlib +import json +import os +import pickle +import unittest +from unittest.mock import patch + +from lm_eval.api.instance import Instance +from lm_eval.models.gguf import GGUFLM + + +base_url = "https://matthoffner-ggml-llm-api.hf.space" + + +def gguf_completion_mock(base_url=None, **kwargs): + # Generate a hash from the parameters + hash_kwargs = {"base_url": base_url, **kwargs} + parameters_hash = hashlib.sha256( + json.dumps(hash_kwargs, sort_keys=True).encode("utf-8") + ).hexdigest() + + fname = f"./tests/testdata/gguf_test_{parameters_hash}.pkl" + + if os.path.exists(fname): + with open(fname, "rb") as fh: + return pickle.load(fh) + else: + print("The file does not exist, attempting to write...") + if "stop" in kwargs: + result = { + "choices": [ + { + "text": f"generated text until {kwargs['stop']}", + "logprobs": {"token_logprobs": [-1.2345], "text_offset": 0}, + "finish_reason": "length", + } + ] + } + else: + # generated with # curl -X 'POST' 'http://localhost:8000/v1/completions' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"prompt": "string", "logprobs": 10, "temperature": 0.0, "max_tokens": 1, "echo": true}' + result = { + "id": "cmpl-4023976b-bc6a-43b0-a5a9-629f4216c7f3", + "object": "text_completion", + "created": 1700511361, + "model": "../llama-2-7b.Q8_0.gguf", + "choices": [ + { + "text": "string(", + "index": 0, + "logprobs": { + "text_offset": [0, 7], + "token_logprobs": [None, -1.033263319857306], + "tokens": [" string", "("], + "top_logprobs": [ + None, + { + "(": -1.033263319857306, + "[]": -2.6530743779017394, + ".": -3.0377145947291324, + "\n": -3.0399156750513976, + "_": -3.510376089937872, + " =": -3.6957918347193663, + ",": -3.9309459866358702, + " of": -4.2834550083949035, + '("': -4.322762841112799, + "()": -4.426229113466925, + }, + ], + }, + "finish_reason": "length", + } + ], + "usage": { + "prompt_tokens": 2, + "completion_tokens": 1, + "total_tokens": 3, + }, + } + + try: + os.makedirs(os.path.dirname(fname), exist_ok=True) + print("Writing file at", fname) + with open(fname, "wb") as fh: + pickle.dump(result, fh) + print("File written successfully") + except Exception as e: + print("File writing failed:", e) + + return result + + +class GGUFLMTest(unittest.TestCase): + @patch( + "lm_eval.models.gguf.GGUFLM.gguf_completion", side_effect=gguf_completion_mock + ) + def test_loglikelihood(self, gguf_completion_mock): + lm = GGUFLM(base_url) + + # Test loglikelihood + requests = [ + Instance( + request_type="loglikelihood", + doc=args, + arguments=args, + idx=i, + ) + for i, args in enumerate([("str", "ing"), ("str", "ing")]) + ] + res = lm.loglikelihood(requests) + + # Assert the loglikelihood response is correct + expected_res = [(logprob, True) for logprob in [0, 0]] + self.assertEqual(res, expected_res) + + @patch( + "lm_eval.models.gguf.GGUFLM.gguf_completion", side_effect=gguf_completion_mock + ) + def test_generate_until(self, gguf_completion_mock): + lm = GGUFLM(base_url) + + # Test generate_until + requests = [ + Instance( + request_type="generate_until", + doc={"input": doc}, + arguments=(doc, {"until": stop}), + idx=i, + ) + for i, (doc, stop) in enumerate([("input1", "stop1"), ("input2", "stop2")]) + ] + + res = lm.generate_until(requests) + + # Assert the generate_until response is correct + expected_res = ["generated text until stop1", "generated text until stop2"] + self.assertEqual(res, expected_res) + + # @patch('lm_eval.models.gguf.GGUFLM.gguf_completion', side_effect=gguf_completion_mock) + # def test_loglikelihood_rolling(self, gguf_completion_mock): + # lm = GGUFLM(base_url) + + # # Test loglikelihood_rolling + # requests = ["input1", "input2"] + # res = lm.loglikelihood_rolling(requests) + + # # Assert the loglikelihood_rolling response is correct + # expected_res = [(-1.2345, True), (-1.2345, True)] + # self.assertEqual(res, expected_res) + + +if __name__ == "__main__": + unittest.main() diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_huggingface.py b/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_huggingface.py new file mode 100644 index 0000000000000000000000000000000000000000..9f495402397a7b336384bb8d2ffe8fd24ddce706 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_huggingface.py @@ -0,0 +1,148 @@ +from __future__ import annotations + +import os +import sys +from pathlib import Path + +import numpy as np +import torch + +from lm_eval import tasks +from lm_eval.api.instance import Instance +from lm_eval.models.huggingface import HFLM + + +os.environ["TOKENIZERS_PARALLELISM"] = "false" +task_manager = tasks.TaskManager() + +TEST_STRING = "foo bar" + + +class Test_HFLM: + torch.use_deterministic_algorithms(True) + task_list = task_manager.load_task_or_group(["arc_easy", "gsm8k", "wikitext"]) + version_minor = sys.version_info.minor + multiple_choice_task = task_list["arc_easy"] # type: ignore + multiple_choice_task.build_all_requests(limit=10, rank=0, world_size=1) + MULTIPLE_CH: list[Instance] = multiple_choice_task.instances + generate_until_task = task_list["gsm8k"] # type: ignore + generate_until_task._config.generation_kwargs["max_gen_toks"] = 10 + generate_until_task.set_fewshot_seed(1234) # fewshot random generator seed + generate_until_task.build_all_requests(limit=10, rank=0, world_size=1) + generate_until: list[Instance] = generate_until_task.instances + rolling_task = task_list["wikitext"] # type: ignore + rolling_task.build_all_requests(limit=10, rank=0, world_size=1) + ROLLING: list[Instance] = rolling_task.instances + + MULTIPLE_CH_RES = [ + -41.902435302734375, + -42.939308166503906, + -33.914180755615234, + -37.07139205932617, + -22.95258331298828, + -20.342208862304688, + -14.818366050720215, + -27.942853927612305, + -15.80704116821289, + -15.936427116394043, + -13.052018165588379, + -18.04828453063965, + -13.345029830932617, + -13.366025924682617, + -12.127134323120117, + -11.872495651245117, + -47.10598373413086, + -47.76410675048828, + -36.4406852722168, + -50.0289421081543, + -16.72093963623047, + -18.535587310791016, + -26.46993637084961, + -20.355995178222656, + -17.757919311523438, + -21.80595588684082, + -33.1990852355957, + -39.28636932373047, + -14.759679794311523, + -16.753942489624023, + -11.486852645874023, + -15.42177677154541, + -13.15798282623291, + -15.887393951416016, + -15.28614616394043, + -12.339089393615723, + -44.59441375732422, + -55.40888214111328, + -52.70050811767578, + -56.25089645385742, + ] + generate_until_RES = [ + " The average of $2.50 each is $", + " A robe takes 2 bolts of blue fiber and half", + " $50,000 in repairs.\n\nQuestion", + " He runs 1 sprint 3 times a week.", + " They feed each of her chickens three cups of mixed", + " The price of the glasses is $5, but", + " The total percentage of students who said they like to", + " Carla is downloading a 200 GB file. Normally", + " John drives for 3 hours at a speed of 60", + " Eliza sells 4 tickets to 5 friends so she", + ] + ROLLING_RES = [ + -3603.6328125, + -19779.23974609375, + -8834.16455078125, + -27967.591796875, + -7636.794982910156, + -9491.93505859375, + -41043.4248046875, + -8397.689819335938, + -45969.47155761719, + -7158.90625, + ] + LM = HFLM(pretrained="EleutherAI/pythia-70m", device="cpu", dtype="float32") + + def test_logliklihood(self) -> None: + res = self.LM.loglikelihood(self.MULTIPLE_CH) + _RES, _res = self.MULTIPLE_CH_RES, [r[0] for r in res] + # log samples to CI + dir_path = Path("test_logs") + dir_path.mkdir(parents=True, exist_ok=True) + + file_path = dir_path / f"outputs_log_{self.version_minor}.txt" + file_path = file_path.resolve() + with open(file_path, "w", encoding="utf-8") as f: + f.write("\n".join(str(x) for x in _res)) + assert np.allclose(_res, _RES, atol=1e-2) + # check indices for Multiple Choice + argmax_RES, argmax_res = ( + np.argmax(np.array(_RES).reshape(-1, 4), axis=1), + np.argmax(np.array(_res).reshape(-1, 4), axis=1), + ) + assert (argmax_RES == argmax_res).all() + + def test_generate_until(self) -> None: + res = self.LM.generate_until(self.generate_until) + assert res == self.generate_until_RES + + def test_logliklihood_rolling(self) -> None: + res = self.LM.loglikelihood_rolling(self.ROLLING) + assert np.allclose(res, self.ROLLING_RES, atol=1e-1) + + def test_toc_encode(self) -> None: + res = self.LM.tok_encode(TEST_STRING) + assert res == [12110, 2534] + + def test_toc_decode(self) -> None: + res = self.LM.tok_decode([12110, 2534]) + assert res == TEST_STRING + + def test_batch_encode(self) -> None: + res = self.LM.tok_batch_encode([TEST_STRING, "bar foo"])[0].tolist() + assert res == [[12110, 2534], [2009, 17374]] + + def test_model_generate(self) -> None: + context = self.LM.tok_batch_encode([TEST_STRING])[0] + res = self.LM._model_generate(context, max_length=10, stop=["\n\n"]) + res = self.LM.tok_decode(res[0]) + assert res == "foo bar\n!info bar" diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_neuralmagic.py b/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_neuralmagic.py new file mode 100644 index 0000000000000000000000000000000000000000..e0a36ceeb2847f60449572777a5b3a9595ccafd4 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_neuralmagic.py @@ -0,0 +1,62 @@ +import pytest + +from lm_eval import evaluator +from lm_eval.api.registry import get_model + + +SPARSEML_MODELS_TASKS = [ + # loglikelihood + ("facebook/opt-125m", "lambada_openai"), + # loglikelihood_rolling + ("hf-internal-testing/tiny-random-gpt2", "wikitext"), + # generate_until + ("mgoin/tiny-random-llama-2-quant", "gsm8k"), +] + +DEEPSPARSE_MODELS_TASKS = [ + # loglikelihood + ("hf:mgoin/llama2.c-stories15M-quant-ds", "lambada_openai"), + # loglikelihood_rolling (not supported yet) + # ("hf:mgoin/llama2.c-stories15M-quant-ds", "wikitext"), + # generate_until + ("hf:mgoin/llama2.c-stories15M-quant-ds", "gsm8k"), +] + + +@pytest.mark.skip(reason="test failing") +@pytest.mark.parametrize("model_id,task", SPARSEML_MODELS_TASKS) +def test_sparseml_eval(model_id, task): + lm = get_model("sparseml").create_from_arg_string( + f"pretrained={model_id}", + { + "batch_size": 1, + "device": "cpu", + "dtype": "float32", + }, + ) + + limit = 5 + evaluator.simple_evaluate( + model=lm, + tasks=[task], + num_fewshot=0, + limit=limit, + ) + + +@pytest.mark.parametrize("model_id,task", DEEPSPARSE_MODELS_TASKS) +def test_deepsparse_eval(model_id, task): + lm = get_model("deepsparse").create_from_arg_string( + f"pretrained={model_id}", + { + "batch_size": 1, + }, + ) + + limit = 5 + evaluator.simple_evaluate( + model=lm, + tasks=[task], + num_fewshot=0, + limit=limit, + ) diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_neuron_optimum.py b/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_neuron_optimum.py new file mode 100644 index 0000000000000000000000000000000000000000..564d52303968e210439a7931f012487a959a367f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_neuron_optimum.py @@ -0,0 +1,26 @@ +import pytest +import torch + +from lm_eval.models.neuron_optimum import wrap_constant_batch_size + + +def test_wrap_constant_batch_size(): + class Tester: + def __init__(self, batch_size): + self.batch_size = batch_size + + @wrap_constant_batch_size + def test_constant_batch_size(self, inputs): + assert len(inputs) == self.batch_size + return inputs + + batch_size_test = 8 + for i in range(1, batch_size_test + 1): + tensor = torch.ones([i, 2, 2]) + out = Tester(batch_size=batch_size_test).test_constant_batch_size(tensor) + torch.testing.assert_allclose(out, tensor) + + with pytest.raises(ValueError): + Tester(batch_size=batch_size_test).test_constant_batch_size( + torch.ones([batch_size_test + 1, 2, 2]) + ) diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_openvino.py b/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_openvino.py new file mode 100644 index 0000000000000000000000000000000000000000..b8f13cd9adb3d3850a28055c9a6daf43d40e3874 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_openvino.py @@ -0,0 +1,92 @@ +import random +import tempfile +from pathlib import Path + +import pytest +from optimum.intel import OVModelForCausalLM +from transformers import AutoTokenizer + +from lm_eval import evaluator +from lm_eval.api.registry import get_model + + +SUPPORTED_ARCHITECTURES_TASKS = { + "facebook/opt-125m": "lambada_openai", + "hf-internal-testing/tiny-random-gpt2": "wikitext", +} + + +@pytest.mark.parametrize("model_id,task", SUPPORTED_ARCHITECTURES_TASKS.items()) +def test_evaluator(model_id, task): + with tempfile.TemporaryDirectory() as tmpdirname: + model = OVModelForCausalLM.from_pretrained( + model_id, export=True, use_cache=True + ) + model.save_pretrained(tmpdirname) + tokenizer = AutoTokenizer.from_pretrained(model_id) + tokenizer.save_pretrained(tmpdirname) + + lm = get_model("openvino").create_from_arg_string( + f"pretrained={tmpdirname}", + { + "batch_size": 1, + "device": "cpu", + }, + ) + + def ll_fn(reqs): + for ctx, cont in [req.args for req in reqs]: + if len(ctx) == 0: + continue + # space convention + assert ctx[-1] != " " + assert cont[0] == " " or ctx[-1] == "\n" + + res = [] + + random.seed(42) + for _ in reqs: + res.extend([(-random.random(), False)]) + + return res + + def ll_perp_fn(reqs): + for (string,) in [req.args for req in reqs]: + assert isinstance(string, str) + + res = [] + random.seed(42) + for _ in reqs: + res.extend([-random.random()]) + + return res + + lm.loglikelihood = ll_fn + lm.loglikelihood_rolling = ll_perp_fn + + limit = 10 + evaluator.simple_evaluate( + model=lm, + tasks=[task], + num_fewshot=0, + limit=limit, + bootstrap_iters=10, + ) + + +def test_ov_config(): + """Test that if specified, a custom OpenVINO config is loaded correctly""" + model_id = "hf-internal-testing/tiny-random-gpt2" + with tempfile.TemporaryDirectory() as tmpdirname: + config_file = str(Path(tmpdirname) / "ov_config.json") + with open(Path(config_file), "w", encoding="utf-8") as f: + f.write('{"DYNAMIC_QUANTIZATION_GROUP_SIZE" : "32"}') + lm = get_model("openvino").create_from_arg_string( + f"pretrained={model_id},ov_config={config_file}" + ) + assert ( + lm.model.request.get_compiled_model().get_property( + "DYNAMIC_QUANTIZATION_GROUP_SIZE" + ) + == 32 + ) diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_vllm.py b/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_vllm.py new file mode 100644 index 0000000000000000000000000000000000000000..01363bc8dc31b43549f62120a8ce9fde0788b144 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/models/test_vllm.py @@ -0,0 +1,50 @@ +from typing import List + +import pytest + +from lm_eval import tasks +from lm_eval.api.instance import Instance + + +task_manager = tasks.TaskManager() + + +@pytest.mark.skip(reason="requires CUDA") +class Test_VLLM: + vllm = pytest.importorskip("vllm") + try: + from lm_eval.models.vllm_causallms import VLLM + + LM = VLLM(pretrained="EleutherAI/pythia-70m") + except ModuleNotFoundError: + pass + # torch.use_deterministic_algorithms(True) + task_list = task_manager.load_task_or_group(["arc_easy", "gsm8k", "wikitext"]) + multiple_choice_task = task_list["arc_easy"] # type: ignore + multiple_choice_task.build_all_requests(limit=10, rank=0, world_size=1) + MULTIPLE_CH: List[Instance] = multiple_choice_task.instances + generate_until_task = task_list["gsm8k"] # type: ignore + generate_until_task._config.generation_kwargs["max_gen_toks"] = 10 + generate_until_task.build_all_requests(limit=10, rank=0, world_size=1) + generate_until: List[Instance] = generate_until_task.instances + rolling_task = task_list["wikitext"] # type: ignore + rolling_task.build_all_requests(limit=10, rank=0, world_size=1) + ROLLING: List[Instance] = rolling_task.instances + + # TODO: make proper tests + def test_logliklihood(self) -> None: + res = self.LM.loglikelihood(self.MULTIPLE_CH) + assert len(res) == len(self.MULTIPLE_CH) + for x in res: + assert isinstance(x[0], float) + + def test_generate_until(self) -> None: + res = self.LM.generate_until(self.generate_until) + assert len(res) == len(self.generate_until) + for x in res: + assert isinstance(x, str) + + def test_logliklihood_rolling(self) -> None: + res = self.LM.loglikelihood_rolling(self.ROLLING) + for x in res: + assert isinstance(x, float) diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anagrams1-v0-greedy_until b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anagrams1-v0-greedy_until new file mode 100644 index 0000000000000000000000000000000000000000..55364250028072b1f238b095c4c3eb9373a4a280 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anagrams1-v0-greedy_until @@ -0,0 +1 @@ +7c0c5246d3f751f39119a5629ac1d4b2c6fd2a315f78d6de9b2c387e24e3fef1 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anagrams1-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anagrams1-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..c89528892ae2cb5dfc87cf28f587062a18323d87 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anagrams1-v0-res.json @@ -0,0 +1 @@ +{"results": {"anagrams1": {"acc": 0.0, "acc_stderr": 0.0}}, "versions": {"anagrams1": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anagrams2-v0-greedy_until b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anagrams2-v0-greedy_until new file mode 100644 index 0000000000000000000000000000000000000000..9db9d158dc07c46ddb5bc88ea797cc41080ca941 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anagrams2-v0-greedy_until @@ -0,0 +1 @@ +6700a3c44e48abe8337238dcbe3b54cf4abafe0c204c52d921e590872fbd05e7 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anagrams2-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anagrams2-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..f74887fe16ec042fcdf995b7b7b694d3fec92659 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anagrams2-v0-res.json @@ -0,0 +1 @@ +{"results": {"anagrams2": {"acc": 0.0, "acc_stderr": 0.0}}, "versions": {"anagrams2": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r1-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r1-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..4450c0628e9d9a6f8ff90c9efa0c5e5b1b7e4069 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r1-v0-loglikelihood @@ -0,0 +1 @@ +3a84baf2f170e138c6ce0bc9f06f905def35d705fa2b8781f10c87aef404c4cb \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r1-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r1-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..b6f6b350182f2a363b2b247b1145dd5c3b54157e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r1-v0-res.json @@ -0,0 +1 @@ +{"results": {"anli_r1": {"acc": 0.334, "acc_stderr": 0.014922019523732967}}, "versions": {"anli_r1": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r2-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r2-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..4a437fc8a8bb7928fade05baac9319b74d939bf8 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r2-v0-loglikelihood @@ -0,0 +1 @@ +d0ea3c3e09d533982c15b4c034439896d6af4bbafb2254d305e20215534a251d \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r2-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r2-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..6dc08ebbaa852afef27dbd6002575ada16870eb0 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r2-v0-res.json @@ -0,0 +1 @@ +{"results": {"anli_r2": {"acc": 0.356, "acc_stderr": 0.015149042659306628}}, "versions": {"anli_r2": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r3-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r3-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..29d3d67c8b038c0b0882e97071033fefb9481a41 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r3-v0-loglikelihood @@ -0,0 +1 @@ +6b6e5c6a794f2fbff78b7aa24fe0c90156039334bbd1cb34f7af9fc6e6183845 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r3-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r3-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..548dea1e2285461362f32707937ff84f37572957 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/anli_r3-v0-res.json @@ -0,0 +1 @@ +{"results": {"anli_r3": {"acc": 0.31916666666666665, "acc_stderr": 0.01346230971200514}}, "versions": {"anli_r3": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_challenge-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_challenge-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..91a3560635db37739cd7504bdc84c6c840192462 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_challenge-v0-loglikelihood @@ -0,0 +1 @@ +41c34c96cca8ace661911d0033d630c554b283f5a3953bcdc50720ae6b00a9c1 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_challenge-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_challenge-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..49f34a73061139ee50a27896a5de9d0f1613941c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_challenge-v0-res.json @@ -0,0 +1 @@ +{"results": {"arc_challenge": {"acc": 0.24488054607508533, "acc_norm": 0.2440273037542662, "acc_norm_stderr": 0.012551447627856257, "acc_stderr": 0.012566273985131354}}, "versions": {"arc_challenge": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_challenge-v2.0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_challenge-v2.0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..53b28b5b86050168e13400d47dbf169de133d035 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_challenge-v2.0-loglikelihood @@ -0,0 +1 @@ +8ebbbc510644ede7bf53496c381e276d5a1eec14828870e8b7e611f231e6d5f6 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_challenge-v2.0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_challenge-v2.0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..f0186c4c4b395b6f57e26120975ec0378cd9c0ea --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_challenge-v2.0-res.json @@ -0,0 +1 @@ +{"results": {"arc_challenge": {"acc": 0.26621160409556316, "acc_norm": 0.28242320819112626, "acc_norm_stderr": 0.01315545688409722, "acc_stderr": 0.01291577478152323}}, "versions": {"arc_challenge": "2.0"}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_easy-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_easy-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..d82be433abe592079dc9ce67ec7e97fe668c8590 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_easy-v0-loglikelihood @@ -0,0 +1 @@ +ffa6e39a35a16299dcb015f17f986aaa598ad8b4840c4cebe0339a7042232741 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_easy-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_easy-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..f217448594199a54d671be7302857509eb6d691f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arc_easy-v0-res.json @@ -0,0 +1 @@ +{"results": {"arc_easy": {"acc": 0.2474747474747475, "acc_norm": 0.24074074074074073, "acc_norm_stderr": 0.008772796145221907, "acc_stderr": 0.008855114414834707}}, "versions": {"arc_easy": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_1dc-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_1dc-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..01756b4d47703cc943f7721509af1ead77739d1e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_1dc-v0-loglikelihood @@ -0,0 +1 @@ +04c3a63a6b3c579bd3775d92b3076ba9130041d5ce7cf9244d3f86e95c804387 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_1dc-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_1dc-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..29e447d578ed11f77d962c079e9db9e3f415d801 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_1dc-v0-res.json @@ -0,0 +1 @@ +{"results": {"arithmetic_1dc": {"acc": 0.0, "acc_stderr": 0.0}}, "versions": {"arithmetic_1dc": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2da-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2da-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..fd95bb231e198d674a556bbec09b2334f1ef1a8e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2da-v0-loglikelihood @@ -0,0 +1 @@ +6ca1ca6ebd7cac4420d5005f7f35b0edbc921377f5e4f8874cc176e4fb6d79d4 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2da-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2da-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..874256a0b8ae0c6fe4874498ecb9e73f383f0d60 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2da-v0-res.json @@ -0,0 +1 @@ +{"results": {"arithmetic_2da": {"acc": 0.0, "acc_stderr": 0.0}}, "versions": {"arithmetic_2da": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2dm-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2dm-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..7b7adaf86251b258f270478b8310660d56a15f4a --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2dm-v0-loglikelihood @@ -0,0 +1 @@ +14ac5e510cdf82967d6827a9ca059906ee1db2e347be1b17f36403a157e73552 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2dm-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2dm-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..8fc5d47310794c3ec4228c51ccb05e58c90aad5c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2dm-v0-res.json @@ -0,0 +1 @@ +{"results": {"arithmetic_2dm": {"acc": 0.0, "acc_stderr": 0.0}}, "versions": {"arithmetic_2dm": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2ds-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2ds-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..28f32c92c67df30eb1548fd27939b45b484a4cbc --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2ds-v0-loglikelihood @@ -0,0 +1 @@ +66f7ff3b40251ee38fadcbee658e309a200224356fc3efa07d0a490a2c24bfa3 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2ds-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2ds-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..a18e6eec6e5fc11e6a613618dddd770e96d8fdd8 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_2ds-v0-res.json @@ -0,0 +1 @@ +{"results": {"arithmetic_2ds": {"acc": 0.0, "acc_stderr": 0.0}}, "versions": {"arithmetic_2ds": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_3da-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_3da-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..6c99dece2230426db75774b5e639b9ca4d871ff4 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_3da-v0-loglikelihood @@ -0,0 +1 @@ +c421f9cd5a5001b80e528441da925128177a04db8526ebcdab543a90b33c9ce2 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_3da-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_3da-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..1bbb3eb0c26b177cb739f58d8098b339278fcd84 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_3da-v0-res.json @@ -0,0 +1 @@ +{"results": {"arithmetic_3da": {"acc": 0.0, "acc_stderr": 0.0}}, "versions": {"arithmetic_3da": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_3ds-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_3ds-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..6bc029c520d8787ad45e3bfd5d728da3e65f15cf --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_3ds-v0-loglikelihood @@ -0,0 +1 @@ +d3d8bad8827d4530945a1d8b3c7589c0235bbed0bc89e7561a6fdac678f6ce5c \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_3ds-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_3ds-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..d76cc9bdf55935bc1bc4e71d35267cb58ec618ef --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_3ds-v0-res.json @@ -0,0 +1 @@ +{"results": {"arithmetic_3ds": {"acc": 0.0, "acc_stderr": 0.0}}, "versions": {"arithmetic_3ds": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_4da-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_4da-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..b52790c74b649b455fd90ca93cc70ad23c3d129b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_4da-v0-loglikelihood @@ -0,0 +1 @@ +d3557beb8b9e5704122c2fc6362b11fbe2c3f2f3cb72aed4462b208767c40e01 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_4da-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_4da-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..57ce0e3007f3e987096d09f4442fa6bd106ab2ca --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_4da-v0-res.json @@ -0,0 +1 @@ +{"results": {"arithmetic_4da": {"acc": 0.0, "acc_stderr": 0.0}}, "versions": {"arithmetic_4da": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_4ds-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_4ds-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..154cf9c5946ed829ce7e2f173a2b03554fe789a1 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_4ds-v0-loglikelihood @@ -0,0 +1 @@ +d915830b8621e66331383bb2ae4c60acebf008e2f94741092ef4c33ea5441037 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_4ds-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_4ds-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..4321db2604d4ef8d992f587841264964acfb065f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_4ds-v0-res.json @@ -0,0 +1 @@ +{"results": {"arithmetic_4ds": {"acc": 0.0, "acc_stderr": 0.0}}, "versions": {"arithmetic_4ds": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_5da-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_5da-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..a751332bc6fbae7b680f4412609dcf0695eb972c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_5da-v0-loglikelihood @@ -0,0 +1 @@ +49edb1e735660631ea6cc309721e6c0b80b7106a613a6959514852ca48f1130e \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_5da-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_5da-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..fb9a5671e8a4269fce5c477cbc3c795801e75fe1 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_5da-v0-res.json @@ -0,0 +1 @@ +{"results": {"arithmetic_5da": {"acc": 0.0, "acc_stderr": 0.0}}, "versions": {"arithmetic_5da": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_5ds-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_5ds-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..0f959c21f6bb46a40cf1dd83c5525583189d3793 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_5ds-v0-loglikelihood @@ -0,0 +1 @@ +2888d6d098a5ef8c1e7f0d8295ba80826e2e04e431f57508dfb71d53e1cd4604 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_5ds-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_5ds-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..c7773f373de3cf44b0d750454a45c4cb581a9957 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/arithmetic_5ds-v0-res.json @@ -0,0 +1 @@ +{"results": {"arithmetic_5ds": {"acc": 0.0, "acc_stderr": 0.0}}, "versions": {"arithmetic_5ds": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_adjunct_island-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_adjunct_island-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..85f0e8fb2af3101c8a916368f957ab4968fd132b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_adjunct_island-v0-loglikelihood @@ -0,0 +1 @@ +976a5cac4bdb724632eebd4cb9e522203ce3da8d5525288a597c86e80469f3f2 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_adjunct_island-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_adjunct_island-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..39e2517bbc481b6727ff2fc1337de9600cd5451c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_adjunct_island-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_adjunct_island": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_adjunct_island": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_anaphor_gender_agreement-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_anaphor_gender_agreement-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..32b700ea9e48728cbf99c82ae417261e53698bb3 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_anaphor_gender_agreement-v0-loglikelihood @@ -0,0 +1 @@ +2d8964e56a17661502ecf3f09c0befba63915360ddf2145b0bd845816950515d \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_anaphor_gender_agreement-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_anaphor_gender_agreement-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..1c39ab70454e6589ea0c506e3e98bbd5a21449bf --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_anaphor_gender_agreement-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_anaphor_gender_agreement": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_anaphor_gender_agreement": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_anaphor_number_agreement-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_anaphor_number_agreement-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..347570f3a6912d8f556eec252867f26777516506 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_anaphor_number_agreement-v0-loglikelihood @@ -0,0 +1 @@ +0bdad31c974ba064e1f1ba931841ec2ba7461e8b0ca54ea5f79f08b6bae0bab5 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_anaphor_number_agreement-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_anaphor_number_agreement-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..68bbe21379d0d6326ce5cc07b0a2bc1589ed73df --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_anaphor_number_agreement-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_anaphor_number_agreement": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_anaphor_number_agreement": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_animate_subject_passive-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_animate_subject_passive-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..47cd3d3be14eedc3d525b408e76abe69c45f8586 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_animate_subject_passive-v0-loglikelihood @@ -0,0 +1 @@ +064c38fcd072b8bd12f54ea4f8e41599ed4e11dc386e93b77e1fc07967d1f960 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_animate_subject_passive-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_animate_subject_passive-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..96a7ed5e2a8715027b1bf853cc1836b4f587a2e5 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_animate_subject_passive-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_animate_subject_passive": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_animate_subject_passive": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_animate_subject_trans-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_animate_subject_trans-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..07106a905853aad9876257f308e3af5900066253 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_animate_subject_trans-v0-loglikelihood @@ -0,0 +1 @@ +2a84231e7b79f517427e57e2099c88fed3d60a7efab4ef9506e263b4091d5cfa \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_animate_subject_trans-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_animate_subject_trans-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..480cf29a4d403852153ef59fe596bcc6a5cf34df --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_animate_subject_trans-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_animate_subject_trans": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_animate_subject_trans": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_causative-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_causative-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..5a0f6a35590db43e610a0550607dd7ab5e382f5f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_causative-v0-loglikelihood @@ -0,0 +1 @@ +3d67ad025185dbb0808ebd7f508edcb5750c18fc3c01ad91f20fda80780c916c \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_causative-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_causative-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..90dc95da8116c38d2ff3bec041973004b7f5703b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_causative-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_causative": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_causative": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_complex_NP_island-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_complex_NP_island-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..3a6d0875c6aadaf550692275a3ecd0b3ac099d3c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_complex_NP_island-v0-loglikelihood @@ -0,0 +1 @@ +f46cfcc7e43050a235fd2a6b989cabbfbcce76786df74db9f0d4a9cd1caa1628 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_complex_NP_island-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_complex_NP_island-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..5bfbffb6e4c931490930f37e256e5f2ed3892cec --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_complex_NP_island-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_complex_NP_island": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_complex_NP_island": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_coordinate_structure_constraint_complex_left_branch-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_coordinate_structure_constraint_complex_left_branch-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..8970b32aff4c8e5f815453c87bc241e8ca2f01e5 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_coordinate_structure_constraint_complex_left_branch-v0-loglikelihood @@ -0,0 +1 @@ +7e1cc5b9f71abfbe56c4bdf343a1e5632785b66a986b8e904a41ed8f45a2c33e \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_coordinate_structure_constraint_complex_left_branch-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_coordinate_structure_constraint_complex_left_branch-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..2750fcda2aa5ee2efc6f20faa8932853f0f42ba2 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_coordinate_structure_constraint_complex_left_branch-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_coordinate_structure_constraint_complex_left_branch": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_coordinate_structure_constraint_complex_left_branch": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_coordinate_structure_constraint_object_extraction-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_coordinate_structure_constraint_object_extraction-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..f1edb69cb10b150f68b62dad3a18b5248bba95d1 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_coordinate_structure_constraint_object_extraction-v0-loglikelihood @@ -0,0 +1 @@ +23ddafdff7b1ebe331b146e23b2c21aa109fe57aa1ce8ca201a0d239fcbdd166 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_coordinate_structure_constraint_object_extraction-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_coordinate_structure_constraint_object_extraction-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..80f2c6a7a02aec124cc43a4e0b0b48110ea60d02 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_coordinate_structure_constraint_object_extraction-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_coordinate_structure_constraint_object_extraction": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_coordinate_structure_constraint_object_extraction": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_1-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_1-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..5fe9e64bc639f3fdf1521cd6f71b8019c987f09e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_1-v0-loglikelihood @@ -0,0 +1 @@ +2df8cc7f17089f7e8c7d974dcb324c809d30ef059a5be22aed6b69f44230809f \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_1-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_1-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..a2457550677d4a39a7e466d1fddaa4583bc649d7 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_1-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_determiner_noun_agreement_1": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_determiner_noun_agreement_1": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_2-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_2-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..72ab237e58550ef3d5f57edcc44f716e0ebece64 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_2-v0-loglikelihood @@ -0,0 +1 @@ +123e2acd00fbba60aba1fbae607c79a062e512c9e79c7d8dfafff63e30111d76 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_2-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_2-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..bc2dc6e1ed3ad7f38496a2de9610db4d145fc41f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_2-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_determiner_noun_agreement_2": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_determiner_noun_agreement_2": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_irregular_1-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_irregular_1-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..f808af460570411d4616b6187dd67fa2ddd6ecee --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_irregular_1-v0-loglikelihood @@ -0,0 +1 @@ +7fab9f02e71a224ae7931aa77f8a9a61d887a7480756adc965d4746e97fb04a5 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_irregular_1-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_irregular_1-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..8caeecf43de4f434ede855dca08c5f62b702a46c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_irregular_1-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_determiner_noun_agreement_irregular_1": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_determiner_noun_agreement_irregular_1": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_irregular_2-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_irregular_2-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..12a4ebe1d2a83e1a8d5dc85ade8913f31931d8b6 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_irregular_2-v0-loglikelihood @@ -0,0 +1 @@ +ddb24ddfaebe076b3aa7107937d71bf5f4503a78283bc889e39200368603681e \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_irregular_2-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_irregular_2-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..c04ead457767b4bf390b2ba28f55d7f23c95d4cb --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_irregular_2-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_determiner_noun_agreement_irregular_2": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_determiner_noun_agreement_irregular_2": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_2-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_2-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..a260838746d5405e89cba4147101e9194f93b88e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_2-v0-loglikelihood @@ -0,0 +1 @@ +95acb74fac7d57ae2c9d208361a5f8ad36b0b19a055f02e648ed8e99505f4b43 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_2-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_2-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..67ea47559d248f90cc66870a37fdecd850ba4c79 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_2-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_determiner_noun_agreement_with_adj_2": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_determiner_noun_agreement_with_adj_2": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_irregular_1-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_irregular_1-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..6756cc4020c8016b08fb43470dcdfcc4d1d5b374 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_irregular_1-v0-loglikelihood @@ -0,0 +1 @@ +ad61c619aa79433d02f1aeacde2ab87291fd5d5c370032c24d41c4f0065ed1f9 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_irregular_1-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_irregular_1-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..defc3560d98de3c640d8e7f41e5bf9bf95d34aa4 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_irregular_1-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_determiner_noun_agreement_with_adj_irregular_1": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_determiner_noun_agreement_with_adj_irregular_1": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_irregular_2-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_irregular_2-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..13176ac613358d8dbdb6031f8220a3dcddac815f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_irregular_2-v0-loglikelihood @@ -0,0 +1 @@ +ccc64b4d5e80c081d5161aae5828212ba49d277ca8c5a4281f181744727a6a99 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_irregular_2-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_irregular_2-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..276f03f76d1f76f242415e9cdeabf368c9a0f8ce --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adj_irregular_2-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_determiner_noun_agreement_with_adj_irregular_2": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_determiner_noun_agreement_with_adj_irregular_2": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adjective_1-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adjective_1-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..d765bb590653a5c4eb3e2517f9b3788cdefc7fa5 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adjective_1-v0-loglikelihood @@ -0,0 +1 @@ +007c47e5fbf88119c5180feef75e1345d448e56adcd4c7ab2d52fb8d67350d34 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adjective_1-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adjective_1-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..66b30be1b864c277e52541b2bd54cda1eb51d4a0 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_determiner_noun_agreement_with_adjective_1-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_determiner_noun_agreement_with_adjective_1": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_determiner_noun_agreement_with_adjective_1": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_distractor_agreement_relational_noun-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_distractor_agreement_relational_noun-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..f926cf3d4b7c1fb9fe3662b21754329ecc15ee2f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_distractor_agreement_relational_noun-v0-loglikelihood @@ -0,0 +1 @@ +8aab641bd5933f84f46a14f5c1208a3c855cace7e67b44abcd5aff8fec96717d \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_distractor_agreement_relational_noun-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_distractor_agreement_relational_noun-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..d8ce0672c29ac799339056d0464c733e3f169745 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_distractor_agreement_relational_noun-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_distractor_agreement_relational_noun": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_distractor_agreement_relational_noun": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_distractor_agreement_relative_clause-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_distractor_agreement_relative_clause-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..1fddc2190c85c0161921a5a4026cd518445fc386 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_distractor_agreement_relative_clause-v0-loglikelihood @@ -0,0 +1 @@ +bf78e2b53c0f3531303c668c96bd3897a0a35e960da37439e63724ecba4e371a \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_distractor_agreement_relative_clause-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_distractor_agreement_relative_clause-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..cf08b036b9eccc0d0151cb41a6ec0c4eeede2f91 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_distractor_agreement_relative_clause-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_distractor_agreement_relative_clause": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_distractor_agreement_relative_clause": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_drop_argument-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_drop_argument-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..1d6bea95e1001e7e8986a48afda483ba9dc1933b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_drop_argument-v0-loglikelihood @@ -0,0 +1 @@ +616109e63f162dcd31a632943e7ef0c9e0431afeb179e83e9b04b39007b16f5b \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_drop_argument-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_drop_argument-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..853a4d2f92c5c6da8d146a85e120a32dca147c4c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_drop_argument-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_drop_argument": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_drop_argument": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_ellipsis_n_bar_1-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_ellipsis_n_bar_1-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..611211bec04bc5833413b1ea21baf5f216b2cb3b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_ellipsis_n_bar_1-v0-loglikelihood @@ -0,0 +1 @@ +d14e4b7fcdd68991eb39b9cf3ade4b37dee9ddd39b688f861d81a327e47a969f \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_ellipsis_n_bar_1-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_ellipsis_n_bar_1-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..82f320ce8f2bbca0496d130ff9662de6284417be --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_ellipsis_n_bar_1-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_ellipsis_n_bar_1": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_ellipsis_n_bar_1": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_ellipsis_n_bar_2-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_ellipsis_n_bar_2-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..1005f68060123bf94b6bf001f9284a7070a64258 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_ellipsis_n_bar_2-v0-loglikelihood @@ -0,0 +1 @@ +0523771a217759f0b22b89807694ee7f6381ce98a584b1fd070ba96194a3273b \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_ellipsis_n_bar_2-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_ellipsis_n_bar_2-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..5b721ca1529d4fe03bb77f8f581411a6fccbfc92 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_ellipsis_n_bar_2-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_ellipsis_n_bar_2": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_ellipsis_n_bar_2": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_object_raising-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_object_raising-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..d23fba902ae50f259bed6e5fb5f33083dc1bf5fc --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_object_raising-v0-loglikelihood @@ -0,0 +1 @@ +63567712076256f373131971676c1c6d711efef73cd0e4de3cc639bc631a2413 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_object_raising-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_object_raising-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..da3deb1aaf576e90101d03035ae3f9f41b80fd27 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_object_raising-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_existential_there_object_raising": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_existential_there_object_raising": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_quantifiers_1-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_quantifiers_1-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..7697713f85bef6fd2d624f5b9075aae5bfd8f168 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_quantifiers_1-v0-loglikelihood @@ -0,0 +1 @@ +d77594382e6d9af31a8b8ef00ba1ef6c29d6be6d0ddb7a9c27ef25ace654e05a \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_quantifiers_1-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_quantifiers_1-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..076319f01e4309fae1bebb80834d35ebdebec6ec --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_quantifiers_1-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_existential_there_quantifiers_1": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_existential_there_quantifiers_1": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_quantifiers_2-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_quantifiers_2-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..4b1a428c4d32831cc6181054631c723408b8382a --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_quantifiers_2-v0-loglikelihood @@ -0,0 +1 @@ +6e6add7baff4217f383425bef58288202018e041b24084edcaa5df8af08f820c \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_quantifiers_2-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_quantifiers_2-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..b8500d68b553a66f850ebc39192644c2d138f0a1 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_quantifiers_2-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_existential_there_quantifiers_2": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_existential_there_quantifiers_2": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_subject_raising-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_subject_raising-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..925e5b4680b003be07aad25d99c377b16c5c18e0 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_subject_raising-v0-loglikelihood @@ -0,0 +1 @@ +9b324b28ae3e1b5d49ecf4b7b2a16c7bbc8ff38d000cf216fab75df633da2084 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_subject_raising-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_subject_raising-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..00c913dcd3ba3846464d04067c5b896c7e5c3c19 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_existential_there_subject_raising-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_existential_there_subject_raising": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_existential_there_subject_raising": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_expletive_it_object_raising-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_expletive_it_object_raising-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..31772c9a1cc093da4efd09f298d98c26c7fe8383 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_expletive_it_object_raising-v0-loglikelihood @@ -0,0 +1 @@ +ceede5b38248a62125a74a8332602b8eac5ef40864f071ad8d86e7971e07219d \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_expletive_it_object_raising-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_expletive_it_object_raising-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..735dc09826d056ed20a40b8bd9ccf54b434d05a8 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_expletive_it_object_raising-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_expletive_it_object_raising": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_expletive_it_object_raising": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_inchoative-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_inchoative-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..b494980087dc4ac33621cca2fe716f1fee83fbd1 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_inchoative-v0-loglikelihood @@ -0,0 +1 @@ +3ff73629fb4473986a0e8ae2fcb7c40e88292189ab0d8755d20836c5aa5a2f99 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_inchoative-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_inchoative-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..8d1b39c2d44fc9651099252fbb4c5d4e37c4668d --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_inchoative-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_inchoative": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_inchoative": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_intransitive-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_intransitive-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..b16238545d5e94fa8c1c8e3166bf0d00863dbf89 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_intransitive-v0-loglikelihood @@ -0,0 +1 @@ +6469ae3b0d46b008846b5fd132f2d2b26ea2858745d056df1470b89aa97a790f \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_intransitive-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_intransitive-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..d5b2f91179f553c61c519f50380d6f36fcb6240d --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_intransitive-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_intransitive": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_intransitive": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_past_participle_adjectives-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_past_participle_adjectives-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..a030be1d72c6a2d1794464b4c9b0cf2e48454197 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_past_participle_adjectives-v0-loglikelihood @@ -0,0 +1 @@ +47c56f336df11924d8b97feb46339ce55bea4b216b6fd13946cc999ea36a4a95 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_past_participle_adjectives-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_past_participle_adjectives-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..e3b8718ff8cee5d379a4ec8e8bda05b8a8d3e8b8 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_past_participle_adjectives-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_irregular_past_participle_adjectives": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_irregular_past_participle_adjectives": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_past_participle_verbs-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_past_participle_verbs-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..1ff9f6b991cfefa168f678db82904660157cdc27 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_past_participle_verbs-v0-loglikelihood @@ -0,0 +1 @@ +63ec733873f94ace71cb34112d1c3cd5bb768c26b975fb90acc9b8ba3f4e938e \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_past_participle_verbs-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_past_participle_verbs-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..94d73d41da2f66060d05319caa8641493c7f8fc9 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_past_participle_verbs-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_irregular_past_participle_verbs": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_irregular_past_participle_verbs": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_plural_subject_verb_agreement_1-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_plural_subject_verb_agreement_1-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..bd7f4bd9ea496a4c8cd2c39c519c21caa26bf42e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_plural_subject_verb_agreement_1-v0-loglikelihood @@ -0,0 +1 @@ +7084358b1b7dd7fb5ead1a58f4b499d6f7610eca897bfac25a986d0f9a91aa5d \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_plural_subject_verb_agreement_1-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_plural_subject_verb_agreement_1-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..d70bd8bad3bdbb6d000939f1cf57261a9351a00a --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_plural_subject_verb_agreement_1-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_irregular_plural_subject_verb_agreement_1": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_irregular_plural_subject_verb_agreement_1": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_plural_subject_verb_agreement_2-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_plural_subject_verb_agreement_2-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..187b79e94c9ec4c378da110948775afc8be14920 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_plural_subject_verb_agreement_2-v0-loglikelihood @@ -0,0 +1 @@ +9534751f83a86b6cbe1fb12fb9feb827b0b7836a663108928b4ecc1d70b08871 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_plural_subject_verb_agreement_2-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_plural_subject_verb_agreement_2-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..b0289b9dea483e58b56403fdfa30575b61fdfbd1 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_irregular_plural_subject_verb_agreement_2-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_irregular_plural_subject_verb_agreement_2": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_irregular_plural_subject_verb_agreement_2": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_left_branch_island_echo_question-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_left_branch_island_echo_question-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..da909529e5ae766814dc24d28e65ef3df4e7109c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_left_branch_island_echo_question-v0-loglikelihood @@ -0,0 +1 @@ +9852b38612db8c6adf938a5d8a7a9e5ce9e655259d6cc806b142506fcaff0ed4 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_left_branch_island_echo_question-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_left_branch_island_echo_question-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..198f9a289c4bb7892c87113e9356f3de7709669b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_left_branch_island_echo_question-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_left_branch_island_echo_question": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_left_branch_island_echo_question": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_left_branch_island_simple_question-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_left_branch_island_simple_question-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..22adb2995e9b5d4173b4ae7096714514022c8e9f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_left_branch_island_simple_question-v0-loglikelihood @@ -0,0 +1 @@ +6cb36bbdae7754f8832f50872c3dd511ce12547e00fa0771deb747be3355eb85 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_left_branch_island_simple_question-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_left_branch_island_simple_question-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..057af2db85481de8a2e64488c35d48dbf3061ad7 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_left_branch_island_simple_question-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_left_branch_island_simple_question": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_left_branch_island_simple_question": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_matrix_question_npi_licensor_present-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_matrix_question_npi_licensor_present-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..a5c4bc6ca2b4f3624dd5781c58efee26c100c3af --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_matrix_question_npi_licensor_present-v0-loglikelihood @@ -0,0 +1 @@ +a3a702a3335c79b02b36caf37c68069050c2a8a3a03c3610c09afc39d2b83fb1 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_matrix_question_npi_licensor_present-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_matrix_question_npi_licensor_present-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..4fba717b88b566130bd8dbd52dd0da2d5a65ee17 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_matrix_question_npi_licensor_present-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_matrix_question_npi_licensor_present": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_matrix_question_npi_licensor_present": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_npi_present_1-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_npi_present_1-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..910e490a982ab520346e71df2a3de6369db05dd3 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_npi_present_1-v0-loglikelihood @@ -0,0 +1 @@ +3ef532a85e0ee8f8ff779bc7ddc873d515969a708da84a4eb4a85b7c843cf244 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_npi_present_1-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_npi_present_1-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..8e4ae8d6efba191c09ebc369b93437a441f188cb --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_npi_present_1-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_npi_present_1": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_npi_present_1": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_npi_present_2-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_npi_present_2-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..543fdc061433e58041b92ecc9d3f5e34d2427db1 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_npi_present_2-v0-loglikelihood @@ -0,0 +1 @@ +fdb688ac6259bb65d234ef0a36e9a9ee449f9608f633b12e1943b462aead8e17 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_npi_present_2-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_npi_present_2-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..efe40ced37f6a7890d247b0292e80d55dde1849c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_npi_present_2-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_npi_present_2": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_npi_present_2": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_only_npi_licensor_present-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_only_npi_licensor_present-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..03f45fd6199a5f9ba70098e00937fe0603cae2dd --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_only_npi_licensor_present-v0-loglikelihood @@ -0,0 +1 @@ +d2d0711611b5b218c6fa8c7278494749252b7868c396451919b761303556bd66 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_only_npi_licensor_present-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_only_npi_licensor_present-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..321702a66e7f2a1e762a4f9b9ae4b99a6f813c3b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_only_npi_licensor_present-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_only_npi_licensor_present": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_only_npi_licensor_present": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_only_npi_scope-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_only_npi_scope-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..82fbbab07d39f44d560d77f2f93535846b413e8e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_only_npi_scope-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_only_npi_scope": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_only_npi_scope": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_passive_1-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_passive_1-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..183b815d22d6227785479681934c05726dc912b9 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_passive_1-v0-loglikelihood @@ -0,0 +1 @@ +fa4addddd8e380031b8e0871776cabcb707c0f21dcaf5d8b3defec66cce55043 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_passive_1-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_passive_1-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..64070cf58dd53d10a9e3b8f3510d3387f2983cfd --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_passive_1-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_passive_1": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_passive_1": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_passive_2-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_passive_2-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..d667f4694632d514448e58d30d7e2f051b5b707b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_passive_2-v0-loglikelihood @@ -0,0 +1 @@ +755bdfe2c89737c43001ff1dc83d68ad33e444aaf0669af66aaf82dcd09f2eca \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_c_command-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_c_command-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..87b49c5de9f79253e3cfa34ad3e6fb5c8d8a7b06 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_c_command-v0-loglikelihood @@ -0,0 +1 @@ +7c2ed82612af9175052cd44d8e178b6dd084c04eb462a3d88fcacfad2df8be8e \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_c_command-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_c_command-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..43fadc2e0b0ea5cd762868a13629b85daec7f499 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_c_command-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_principle_A_c_command": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_principle_A_c_command": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_case_1-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_case_1-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..ce8166c4605ac5d9968da1d3370a73fab286e886 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_case_1-v0-loglikelihood @@ -0,0 +1 @@ +49d2b8ce6667a6166fdc2a2e5dbe7ff07d9b8415e9f33482aef15956b3ebc24a \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_case_2-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_case_2-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..8c043857d4845d1bfebf34ede397049c16e981c2 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_case_2-v0-loglikelihood @@ -0,0 +1 @@ +cd68adb65c891d672e22bf53c054b2083ab08bc1da43951732b409c942d14bc7 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_case_2-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_case_2-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..ec8108c88d9554aefbeb34e6e0432e490253d26c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_case_2-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_principle_A_case_2": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_principle_A_case_2": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_domain_2-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_domain_2-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..0e201fe3c840152dbb271ba82c794f5ab5c9d5b5 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_principle_A_domain_2-v0-loglikelihood @@ -0,0 +1 @@ +eb5ddf0a97982373ab1a4e58267cfcdebdecdb86c376dfd5ebf46737c9d3ee12 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_regular_plural_subject_verb_agreement_1-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_regular_plural_subject_verb_agreement_1-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..0a32ca7f971e537ab6fc6d338db3ad1c3d506f64 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_regular_plural_subject_verb_agreement_1-v0-loglikelihood @@ -0,0 +1 @@ +5bc0441f31e32443cf761bca6e961d504e1e84b15aa4e1d79e5c8ed5b4c2aa3a \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_sentential_negation_npi_licensor_present-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_sentential_negation_npi_licensor_present-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..8e254de7a73880a1880c1632e88d91fb4a9affdc --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_sentential_negation_npi_licensor_present-v0-loglikelihood @@ -0,0 +1 @@ +e6666c5657215ff4bfd646b8ee3ae6df956e71c0be9ab1c287fb1b68291dd0d1 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_sentential_negation_npi_scope-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_sentential_negation_npi_scope-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..c7aa260f9198481df3d83af52c9c16cc9e877d40 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_sentential_negation_npi_scope-v0-loglikelihood @@ -0,0 +1 @@ +32fcbd0a1c6e664af2751bad552587b5ca3911973b07f4fb2cf0a2acd3de5349 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_sentential_subject_island-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_sentential_subject_island-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..a7f8f1825ac91b69d8ba1a50a5f87f048aeb3f78 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_sentential_subject_island-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_sentential_subject_island": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_sentential_subject_island": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_superlative_quantifiers_1-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_superlative_quantifiers_1-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..b69d445f3c257608fd5be46aa74bd53cd598042c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_superlative_quantifiers_1-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_superlative_quantifiers_1": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_superlative_quantifiers_1": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_superlative_quantifiers_2-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_superlative_quantifiers_2-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..2733d251cf90f264f28db48a2b17b520e528f2c7 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_superlative_quantifiers_2-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_superlative_quantifiers_2": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_superlative_quantifiers_2": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_tough_vs_raising_1-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_tough_vs_raising_1-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..a26cb174a06e1941ae79e137161d85c4f5814838 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_tough_vs_raising_1-v0-loglikelihood @@ -0,0 +1 @@ +973fe56534fdef1207f0fc08dd09a210304c55f33c6cbb17552754bf54f11c86 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_tough_vs_raising_1-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_tough_vs_raising_1-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..44ea10c1380c3dccdbc8d2ad6a2d84e716e81773 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_tough_vs_raising_1-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_tough_vs_raising_1": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_tough_vs_raising_1": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_tough_vs_raising_2-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_tough_vs_raising_2-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..c9b8c7d06179f5427a99dda5e6b24245e2ea0dbb --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_tough_vs_raising_2-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_tough_vs_raising_2": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_tough_vs_raising_2": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_transitive-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_transitive-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..98156dcf1ea33db946094d1e9d47c979f158b8b2 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_transitive-v0-loglikelihood @@ -0,0 +1 @@ +d0d47fe40a7ee558ba782edbc4f49f7d9123c8472a36decc97f8ab142b45b9d8 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_transitive-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_transitive-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..d2c99ab803288212934142c2507a8c316695a34b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_transitive-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_transitive": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_transitive": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_island-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_island-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..d27f1316dc96be401dee9392f973e9bbd799a409 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_island-v0-loglikelihood @@ -0,0 +1 @@ +91a9e4b60b0f3572a7fdbd7648d0e69f36e5eb34db715315b0082558d7ed8b65 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_island-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_island-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..1d50683774ecacf772eaf6287328994d4abc0a98 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_island-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_wh_island": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_wh_island": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_object_gap-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_object_gap-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..c3e6af12f2da0a1857c0f0456bf4052d5558329e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_object_gap-v0-loglikelihood @@ -0,0 +1 @@ +4d4aaa0274ccd485ff8430ed61b8f83806febe18c16616c7d050f637a0463eba \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_object_gap-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_object_gap-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..60228b79185dd96e5e71a1c2f85ade32348d9f10 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_object_gap-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_wh_questions_object_gap": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_wh_questions_object_gap": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_subject_gap-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_subject_gap-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..1a88f8fa87a86cbff20d0def9955059e9cd73861 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_subject_gap-v0-loglikelihood @@ -0,0 +1 @@ +d5486ffcc075cad4302e37ece9bbf5b2063c0b5a48e76c8e1dd365e22a5a48fc \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_subject_gap-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_subject_gap-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..4b21da71d54c0a8fe09f204dd4a78f0841c6ae85 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_subject_gap-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_wh_questions_subject_gap": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_wh_questions_subject_gap": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_subject_gap_long_distance-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_subject_gap_long_distance-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..f83ed1fb7413ddccae66c32078a9a5f7b19eb03e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_subject_gap_long_distance-v0-loglikelihood @@ -0,0 +1 @@ +37483dfda688b62ad27161c9fc1e1e7710c5a6e6a7cd3474df119bcafd30e97f \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_subject_gap_long_distance-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_subject_gap_long_distance-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..fe6bbf95e5406ad38d4894bf5d4609beeaa05f9a --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_questions_subject_gap_long_distance-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_wh_questions_subject_gap_long_distance": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_wh_questions_subject_gap_long_distance": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_no_gap-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_no_gap-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..dfd3f66b77cb52234d967a827a3c6dffc706e5aa --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_no_gap-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_wh_vs_that_no_gap": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_wh_vs_that_no_gap": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_no_gap_long_distance-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_no_gap_long_distance-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..13359ac3d2092bb8d38d44f17a125124c034d317 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_no_gap_long_distance-v0-loglikelihood @@ -0,0 +1 @@ +a142cc2a6fcd93230b650927b07367cad957b8f3f42cb4072151da53dea301df \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_no_gap_long_distance-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_no_gap_long_distance-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..de9e8007180f265cb7b2aed51e277b93fded9ce6 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_no_gap_long_distance-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_wh_vs_that_no_gap_long_distance": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_wh_vs_that_no_gap_long_distance": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_with_gap-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_with_gap-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..4c15f2283eb93c5ab4b9cdbddf3e91117211918d --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_with_gap-v0-loglikelihood @@ -0,0 +1 @@ +d41a9b85e4c31e445bf9b46b8642df02203ccc02b4a9b254bf76066d5c54b4b7 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_with_gap-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_with_gap-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..14befd4ab6450dbb2147d66e5458981756bfc25b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_with_gap-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_wh_vs_that_with_gap": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_wh_vs_that_with_gap": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_with_gap_long_distance-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_with_gap_long_distance-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..34b959139635a241b0fe814ce2ae7240c32a7c1c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_with_gap_long_distance-v0-loglikelihood @@ -0,0 +1 @@ +eed67491bdf493a1dad8f1d9766bc7bd0e79946365b833c0f7eb81ac998e3dca \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_with_gap_long_distance-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_with_gap_long_distance-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..95a2c0c7e115167e44288a57dc38ea1d40274c87 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/blimp_wh_vs_that_with_gap_long_distance-v0-res.json @@ -0,0 +1 @@ +{"results": {"blimp_wh_vs_that_with_gap_long_distance": {"acc": 0.485, "acc_stderr": 0.0158121796418149}}, "versions": {"blimp_wh_vs_that_with_gap_long_distance": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/boolq-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/boolq-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..14c1bf5f5ee1300b8652f6a73185badea754ec73 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/boolq-v0-loglikelihood @@ -0,0 +1 @@ +de5aa6f77a2e0fd050b9c272f10c4d5d5581e4f75ffa60926f79e60ae1738960 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/boolq-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/boolq-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..2b459d8b28901b531dc0068425a4583747ac552d --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/boolq-v0-res.json @@ -0,0 +1 @@ +{"results": {"boolq": {"acc": 0.5048929663608562, "acc_stderr": 0.00874463623355505}}, "versions": {"boolq": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/boolq-v1-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/boolq-v1-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..7811121c9fda0c7ec33c2c36639c8ed8febccb05 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/boolq-v1-loglikelihood @@ -0,0 +1 @@ +6577e0d88572772ef08e64f624c0e3df0953286ae1f118ccef15623b59ffeabf \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/boolq-v1-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/boolq-v1-res.json new file mode 100644 index 0000000000000000000000000000000000000000..291b9f122d0219c93c941daeb9ae362c439bb4e0 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/boolq-v1-res.json @@ -0,0 +1 @@ +{"results": {"boolq": {"acc": 0.5048929663608562, "acc_stderr": 0.00874463623355505}}, "versions": {"boolq": 1}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cb-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cb-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..6fa6f6dae6c806be8a5cad8416df6766f22ae475 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cb-v0-loglikelihood @@ -0,0 +1 @@ +ec3b1bbb9561e39c43c6f77a23b4060b15c606141c5346e3d0791b3e92aaa5d0 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cb-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cb-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..ba386fd6c7e67c5048d2f4a4240e1b308dca7db5 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cb-v0-res.json @@ -0,0 +1 @@ +{"results": {"cb": {"acc": 0.3392857142857143, "acc_stderr": 0.06384226561930825, "f1": 0.2819143819143819}}, "versions": {"cb": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cb-v1-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cb-v1-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..ad7e928fe6a3d79857c3c076c6459d8b6c31897c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cb-v1-loglikelihood @@ -0,0 +1 @@ +77b11f4348eb8a7f57faf95c531fda01ab4bf0e729f91a82451ed8e71ec8e66d \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cb-v1-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cb-v1-res.json new file mode 100644 index 0000000000000000000000000000000000000000..1cff410b2c35a16b457d163d95ac7cbd8eb704e2 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cb-v1-res.json @@ -0,0 +1 @@ +{"results": {"cb": {"acc": 0.3392857142857143, "acc_stderr": 0.06384226561930825, "f1": 0.2819143819143819}}, "versions": {"cb": 1}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cola-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cola-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..45737909e7c21c528a647e91cceca3d2534869fc --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cola-v0-loglikelihood @@ -0,0 +1 @@ +e8635578ed8ee70b707a666d35e468b9321db24470f80c92080651e2bfa01751 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cola-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cola-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..462e5d9401318226da067adcc39b27a09157a127 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cola-v0-res.json @@ -0,0 +1 @@ +{"results": {"cola": {"mcc": -0.04538802810223175, "mcc_stderr": 0.023100371589225246}}, "versions": {"cola": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/copa-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/copa-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..ebe4c6512a5a4befba815e4ab3b52a3732600607 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/copa-v0-loglikelihood @@ -0,0 +1 @@ +66276b9045b5300cba4b81340db06f674f031fa0b8883714ad0d03be464cd799 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/copa-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/copa-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..9a537ec768e7311cd4ef3fafcfde63cf9ff42f59 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/copa-v0-res.json @@ -0,0 +1 @@ +{"results": {"copa": {"acc": 0.48, "acc_stderr": 0.050211673156867795}}, "versions": {"copa": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/coqa-v0-greedy_until b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/coqa-v0-greedy_until new file mode 100644 index 0000000000000000000000000000000000000000..c1a9e165a7e42191745e38b1dd8d6b9e2fe609cb --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/coqa-v0-greedy_until @@ -0,0 +1 @@ +4a8605d5deed0423ec095700251ed93325b45d320aca35d4ce1e94702094435e \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/coqa-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/coqa-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..9ca8024e3ba0fb80420952bceaf01d85c42b0fcc --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/coqa-v0-res.json @@ -0,0 +1 @@ +{"results": {"coqa": {"em": 0.0, "em_stderr": 0.0, "f1": 0.0, "f1_stderr": 0.0}}, "versions": {"coqa": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/coqa-v1-greedy_until b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/coqa-v1-greedy_until new file mode 100644 index 0000000000000000000000000000000000000000..f6e3f64b18a1d7d3ec2702d115c694bbe62cc8ef --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/coqa-v1-greedy_until @@ -0,0 +1 @@ +57581470b921435d40da97872bb1cfda6ecf963ccc4b0240a3b04e3fea8c8e3a \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/coqa-v1-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/coqa-v1-res.json new file mode 100644 index 0000000000000000000000000000000000000000..7941ad62997cb5129be9390a727352b689f807ae --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/coqa-v1-res.json @@ -0,0 +1 @@ +{"results": {"coqa": {"em": 0.0, "em_stderr": 0.0, "f1": 0.0, "f1_stderr": 0.0}}, "versions": {"coqa": 1}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..63749433f1703a4c81965e6c04fec04177631bae --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english-v0-loglikelihood @@ -0,0 +1 @@ +ee3ce1ddb8071d4189e5b06e7f3c618a434221ac52935d0f434c4d183f01458a \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..c4210f5f11540d44476cdf99252e9268ca85a6e0 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_english": {"likelihood_difference": 0.3367363060632734, "likelihood_difference_stderr": 0.005827747024053628, "pct_stereotype": 0.5062611806797853, "pct_stereotype_stderr": 0.012212341600228745}}, "versions": {"crows_pairs_english": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_age-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_age-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..598d2cce10cc3ecefb6eb8d1deb74801e25b11af --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_age-v0-loglikelihood @@ -0,0 +1 @@ +de74d2ac7f926f2f486c045d84aae8f71711102f9d77b31f758fd148810d13d3 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_age-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_age-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..5dad8bf864709209d905dadb52930eaf43ff3eb0 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_age-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_english_age": {"likelihood_difference": 0.3160680928470684, "likelihood_difference_stderr": 0.02397758321605678, "pct_stereotype": 0.43956043956043955, "pct_stereotype_stderr": 0.05231815698566189}}, "versions": {"crows_pairs_english_age": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_autre-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_autre-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..ab0d9a4db42a5e4da196834b40457a95bf9a9129 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_autre-v0-loglikelihood @@ -0,0 +1 @@ +a197ccc8538231404a8e43f5ed0fbbfb2c317b4da337f6e7aa9642131aeb426a \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_autre-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_autre-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..dbe264794f6009bd604d2d55928e1958c74ae35a --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_autre-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_english_autre": {"likelihood_difference": 0.3424336593343321, "likelihood_difference_stderr": 0.08588068996335849, "pct_stereotype": 0.2727272727272727, "pct_stereotype_stderr": 0.14083575804390605}}, "versions": {"crows_pairs_english_autre": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_disability-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_disability-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..50c7b025631010289ee73762c8f493d8888122d3 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_disability-v0-loglikelihood @@ -0,0 +1 @@ +90c1bcfdeec0ff51d891ee8cf00ae2a5ec61bab6739faea9865809b8ffed2cdb \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_disability-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_disability-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..14510a13a1c390adfbb9c73149b88e5b8a2c4f64 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_disability-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_english_disability": {"likelihood_difference": 0.3148684792547637, "likelihood_difference_stderr": 0.02800803147051987, "pct_stereotype": 0.36923076923076925, "pct_stereotype_stderr": 0.06032456592830047}}, "versions": {"crows_pairs_english_disability": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_gender-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_gender-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..44a4c513e5ba88fe7ed54dcb35021b709bc407e2 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_gender-v0-loglikelihood @@ -0,0 +1 @@ +2bf62b7cc678f64ffad4a6e6715ff76a2b984bfe8d1165da4b76b3b4dfafb2f9 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_gender-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_gender-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..c24fb9dd6dfb9c494474fc08011d6d86ef18f5ef --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_gender-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_english_gender": {"likelihood_difference": 0.3361377482385407, "likelihood_difference_stderr": 0.012853081126751691, "pct_stereotype": 0.478125, "pct_stereotype_stderr": 0.027967820983765136}}, "versions": {"crows_pairs_english_gender": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_nationality-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_nationality-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..1186c252981559fc1e9859252f82aaea27310c4f --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_nationality-v0-loglikelihood @@ -0,0 +1 @@ +b85bc849811ccfa9971a6ee3fca7342752c314c0cb6f126e10d9ec4d0450c541 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_nationality-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_nationality-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..5fd526ccc1c07111d2cceef633ccb72b0d65387b --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_nationality-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_english_nationality": {"likelihood_difference": 0.3383027778174895, "likelihood_difference_stderr": 0.015957585374543233, "pct_stereotype": 0.4675925925925926, "pct_stereotype_stderr": 0.03402801581358966}}, "versions": {"crows_pairs_english_nationality": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_physical_appearance-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_physical_appearance-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..fedfdac52d966f6edcdb229456858da1959b24d1 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_physical_appearance-v0-loglikelihood @@ -0,0 +1 @@ +d1823f5038afafa7a5338e42531720480c8ccf4e177789526caf294d52d56e89 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_physical_appearance-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_physical_appearance-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..4e5ce5b3e7d4df6366fc2cb0219a24b92f1fabed --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_physical_appearance-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_english_physical_appearance": {"likelihood_difference": 0.3221673223187262, "likelihood_difference_stderr": 0.026978346460100555, "pct_stereotype": 0.4027777777777778, "pct_stereotype_stderr": 0.05820650942569533}}, "versions": {"crows_pairs_english_physical_appearance": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_race_color-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_race_color-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..9feec03298368b126f4c7361084fb894b8170ffd --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_race_color-v0-loglikelihood @@ -0,0 +1 @@ +0a750596d77cd96502dc414ff699a399b1b91c2078adeec1d3dd982b3d591089 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_race_color-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_race_color-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..75d356522edf08f93f03d3ba37ed323d39f5b35e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_race_color-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_english_race_color": {"likelihood_difference": 0.3322827903840805, "likelihood_difference_stderr": 0.01019838186372816, "pct_stereotype": 0.4822834645669291, "pct_stereotype_stderr": 0.022191835500120254}}, "versions": {"crows_pairs_english_race_color": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_religion-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_religion-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..b56bc901ca48380f5a188f9c18ef12ba0abe49ca --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_religion-v0-loglikelihood @@ -0,0 +1 @@ +2ed57377174adaf0fb30037eb055eafdd02cd46e57bc32066d5fecd90a14b6e1 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_religion-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_religion-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..670f2d2cffeac37f0510e17d7195a0a68700d4fe --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_religion-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_english_religion": {"likelihood_difference": 0.32170622542430666, "likelihood_difference_stderr": 0.022101541392310232, "pct_stereotype": 0.43243243243243246, "pct_stereotype_stderr": 0.04723583229758394}}, "versions": {"crows_pairs_english_religion": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_sexual_orientation-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_sexual_orientation-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..0a58b730c1e43271ba9d287c6b645ab97d10a560 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_sexual_orientation-v0-loglikelihood @@ -0,0 +1 @@ +e754a309296b157677dfba6e6feef983d1ce38dd0169ae726265621a7b573163 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_sexual_orientation-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_sexual_orientation-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..9a93b9add705c62cd228fd21a89ea670022189ab --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_sexual_orientation-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_english_sexual_orientation": {"likelihood_difference": 0.31947594049467243, "likelihood_difference_stderr": 0.024404952720497735, "pct_stereotype": 0.43010752688172044, "pct_stereotype_stderr": 0.051616798980291805}}, "versions": {"crows_pairs_english_sexual_orientation": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_socioeconomic-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_socioeconomic-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..32065ff76227a91aa5631f95b66ff1ce19490800 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_socioeconomic-v0-loglikelihood @@ -0,0 +1 @@ +c309eabfd247a702e32efc4e08211f9a72693d38995be5dd444d497b476396bd \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_socioeconomic-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_socioeconomic-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..89bd7338ada6ff7ef485492c5656342881b70600 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_english_socioeconomic-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_english_socioeconomic": {"likelihood_difference": 0.3424577735757881, "likelihood_difference_stderr": 0.017459994170011896, "pct_stereotype": 0.46842105263157896, "pct_stereotype_stderr": 0.036297038088316094}}, "versions": {"crows_pairs_english_socioeconomic": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..d0fc86b66760ef71b6791ffeb9b9061e4cb49720 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french-v0-loglikelihood @@ -0,0 +1 @@ +4fb61dcf4d2c59d6470b297a01d5f429ee442864e225e1760fbf191b2a0901cd \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..77195255653eaebf9f1d542df02b9720c1f37df8 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_french": {"likelihood_difference": 0.3367363060632734, "likelihood_difference_stderr": 0.005827747024053628, "pct_stereotype": 0.5062611806797853, "pct_stereotype_stderr": 0.012212341600228745}}, "versions": {"crows_pairs_french": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_age-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_age-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..dbec353c35db547d54e918c718164a0788abc569 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_age-v0-loglikelihood @@ -0,0 +1 @@ +b14a5769f415a234abe89063a1b546aa4a990c84217e5d4a697874cd7f85af35 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_age-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_age-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..4bd87f68c37946bcb26e2a989e98a79251a8361c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_age-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_french_age": {"likelihood_difference": 0.31896094607685194, "likelihood_difference_stderr": 0.024068391933540753, "pct_stereotype": 0.4444444444444444, "pct_stereotype_stderr": 0.05267171812666418}}, "versions": {"crows_pairs_french_age": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_autre-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_autre-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..3900f561993a333909d46e7a4fc18906c9b69721 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_autre-v0-loglikelihood @@ -0,0 +1 @@ +f145ad5086da0bf8c76f0730258529fa243efe32b7ab792d3c4716284b4b5495 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_autre-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_autre-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..44d8ff96e413cf6eb458a896d47321a0f3996b70 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_autre-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_french_autre": {"likelihood_difference": 0.3517045997290783, "likelihood_difference_stderr": 0.07647821858130377, "pct_stereotype": 0.23076923076923078, "pct_stereotype_stderr": 0.12162606385262997}}, "versions": {"crows_pairs_french_autre": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_disability-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_disability-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..9cc4d2bb8012080bb2030e494eebd97e945b203c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_disability-v0-loglikelihood @@ -0,0 +1 @@ +fa1e5fc7492a66c9a90765e605003c38408347617db5ecf36706f1d374af5d42 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_disability-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_disability-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..cb2b8b79ac3d37913992a56e688ea80d24c0af9e --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_disability-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_french_disability": {"likelihood_difference": 0.31387939561315326, "likelihood_difference_stderr": 0.027598132299657168, "pct_stereotype": 0.36363636363636365, "pct_stereotype_stderr": 0.05966637484671758}}, "versions": {"crows_pairs_french_disability": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_gender-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_gender-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..c1713a5a881657c9ae4417f6adcf7480491a2915 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_gender-v0-loglikelihood @@ -0,0 +1 @@ +010b8404655911c86555616da23afffce9dc3981e1acbbfdb022d9c474430209 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_gender-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_gender-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..bdb363e75dc8006cd39e237392b2cf589741fb46 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_gender-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_french_gender": {"likelihood_difference": 0.3364019171359413, "likelihood_difference_stderr": 0.012815700745990895, "pct_stereotype": 0.4766355140186916, "pct_stereotype_stderr": 0.027920316348204986}}, "versions": {"crows_pairs_french_gender": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_nationality-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_nationality-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..e6e282414b02b032bd5b879775686c24e731fd9d --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_nationality-v0-loglikelihood @@ -0,0 +1 @@ +146eb60c8796fe3f25307a6776337f0b077b58ce02edec64c99df4b906c19b9f \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_nationality-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_nationality-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..f9dd321f7f3c9525491145df99fb4f7658be8065 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_nationality-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_french_nationality": {"likelihood_difference": 0.33534193269044926, "likelihood_difference_stderr": 0.01429836309463257, "pct_stereotype": 0.4743083003952569, "pct_stereotype_stderr": 0.031455431847992904}}, "versions": {"crows_pairs_french_nationality": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_physical_appearance-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_physical_appearance-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..167b5e3ba055d1d67ca70e4f9cd3879f6b40b179 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_physical_appearance-v0-loglikelihood @@ -0,0 +1 @@ +ea61eaad64e9292790d4bbef955ffeebed7a595de098bc5ac726a6e51f27f9af \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_physical_appearance-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_physical_appearance-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..eea3efa006503d2062660ae0e0625c85b4196899 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_physical_appearance-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_french_physical_appearance": {"likelihood_difference": 0.3221673223187262, "likelihood_difference_stderr": 0.026978346460100555, "pct_stereotype": 0.4027777777777778, "pct_stereotype_stderr": 0.05820650942569533}}, "versions": {"crows_pairs_french_physical_appearance": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_race_color-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_race_color-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..16127e96ad2c7051d8daf0bc0ad5114a6a07eb69 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_race_color-v0-loglikelihood @@ -0,0 +1 @@ +6f9119026abff33c5c882d6172e092e806a8b21bd86864022978b1961839350f \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_race_color-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_race_color-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..bdb9d9c6aff73eac1def51836e15733ad940835c --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_race_color-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_french_race_color": {"likelihood_difference": 0.33233909422443764, "likelihood_difference_stderr": 0.010623405969915857, "pct_stereotype": 0.4782608695652174, "pct_stereotype_stderr": 0.023315932363473738}}, "versions": {"crows_pairs_french_race_color": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_religion-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_religion-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..b31daf0e281664ab74ae88a9edd6bb1029f28d57 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_religion-v0-loglikelihood @@ -0,0 +1 @@ +8af6445eeb634dad5f0723e40615afe993e1e3f129a4f314fe4117e633c2efd3 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_religion-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_religion-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..990eab593f8a175be48d44c7318eeb968aab2921 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_religion-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_french_religion": {"likelihood_difference": 0.32691651640972225, "likelihood_difference_stderr": 0.021833493193249474, "pct_stereotype": 0.45217391304347826, "pct_stereotype_stderr": 0.046614569799583463}}, "versions": {"crows_pairs_french_religion": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_sexual_orientation-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_sexual_orientation-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..0336c1ddc64ef089490495a817922f3e7c9bdc73 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_sexual_orientation-v0-loglikelihood @@ -0,0 +1 @@ +2ce823fdb93d325aa8fb40db5d335b093b4b69792763532d940a752440ee3a76 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_sexual_orientation-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_sexual_orientation-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..5bb8a4336d89c12896186dc53f0bdd7f480c8df0 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_sexual_orientation-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_french_sexual_orientation": {"likelihood_difference": 0.3160680928470684, "likelihood_difference_stderr": 0.02397758321605678, "pct_stereotype": 0.43956043956043955, "pct_stereotype_stderr": 0.05231815698566189}}, "versions": {"crows_pairs_french_sexual_orientation": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_socioeconomic-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_socioeconomic-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..2f6455aec029fea8d7ee8fa866e9f7779ac99914 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_socioeconomic-v0-loglikelihood @@ -0,0 +1 @@ +8ba0a525c65f795c99f6416e70c998e75e4b6cc43bf9a4bd7ccacd3c3591e9cb \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_socioeconomic-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_socioeconomic-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..7372018798d522cdfda7e458f1d608f1a3c13169 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/crows_pairs_french_socioeconomic-v0-res.json @@ -0,0 +1 @@ +{"results": {"crows_pairs_french_socioeconomic": {"likelihood_difference": 0.3394681494647815, "likelihood_difference_stderr": 0.01702488895584347, "pct_stereotype": 0.4642857142857143, "pct_stereotype_stderr": 0.035714285714285705}}, "versions": {"crows_pairs_french_socioeconomic": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cycle_letters-v0-greedy_until b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cycle_letters-v0-greedy_until new file mode 100644 index 0000000000000000000000000000000000000000..9068a24ef5af549a13fe5b4362c2b5afc741bd29 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cycle_letters-v0-greedy_until @@ -0,0 +1 @@ +eb23f7d5de7528eefd8ed5f8054c402ff947319cccfef7195995946f99389201 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cycle_letters-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cycle_letters-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..5b05a9430e90ec2ce0ddcb49a243be9479d3fad1 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/cycle_letters-v0-res.json @@ -0,0 +1 @@ +{"results": {"cycle_letters": {"acc": 0.0, "acc_stderr": 0.0}}, "versions": {"cycle_letters": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/drop-v0-greedy_until b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/drop-v0-greedy_until new file mode 100644 index 0000000000000000000000000000000000000000..6470b349d2e2a54c1ab113346885eb97c045a0ed --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/drop-v0-greedy_until @@ -0,0 +1 @@ +ca566c630d8ac853d5785d4b5c40a5137172c34b48af3350e1f79e6d548b36ba \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/drop-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/drop-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..9384ca72fe6c84f3a6a9c419b82a7dd7f39bf7d1 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/drop-v0-res.json @@ -0,0 +1 @@ +{"results": {"drop": {"em": 0.0, "em_stderr": 0.0, "f1": 0.0, "f1_stderr": 0.0}}, "versions": {"drop": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/drop-v1-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/drop-v1-res.json new file mode 100644 index 0000000000000000000000000000000000000000..8f397b410df7a77e25fd2916787b6050a5806d1d --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/drop-v1-res.json @@ -0,0 +1 @@ +{"results": {"drop": {"em": 0.0, "em_stderr": 0.0, "f1": 0.0, "f1_stderr": 0.0}}, "versions": {"drop": 1}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_cm-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_cm-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..69289144e0e3ceb0051596d5768b70667f7d19a8 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_cm-v0-loglikelihood @@ -0,0 +1 @@ +92d136ebb2bd86cd036e61699ad9a1417dbb48651f0a3afa5045cf57cef5a3f6 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_cm-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_cm-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..f81a700903262aec7eae2b4c39260f3f2c8f1dd0 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_cm-v0-res.json @@ -0,0 +1 @@ +{"results": {"ethics_cm": {"acc": 0.49987129987129986, "acc_stderr": 0.008022881531793336}}, "versions": {"ethics_cm": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_deontology-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_deontology-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..ab01349737c063432656f3951ae913a63a85adba --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_deontology-v0-loglikelihood @@ -0,0 +1 @@ +74ecebe322457d70afc16fde848978410a09b854dc65c47f428d100bd1593248 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_utilitarianism-v0-loglikelihood b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_utilitarianism-v0-loglikelihood new file mode 100644 index 0000000000000000000000000000000000000000..0c01f548806c747150690d942f7def8b2d98f2a2 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_utilitarianism-v0-loglikelihood @@ -0,0 +1 @@ +88872f1ed1b203f9649a4ced4fb4627d18c17af455d713de6e17c05eced4ec60 \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_utilitarianism_original-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_utilitarianism_original-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..16940c8f5a7dd9ebb1d73298346ab1d19811ec90 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_utilitarianism_original-v0-res.json @@ -0,0 +1 @@ +{"results": {"ethics_utilitarianism_original": {"acc": 0.5214226289517471, "acc_stderr": 0.007204999520618661}}, "versions": {"ethics_utilitarianism_original": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_virtue-v0-res.json b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_virtue-v0-res.json new file mode 100644 index 0000000000000000000000000000000000000000..cf3e02d82662bc1c4de5f1cf3dd9442b321de623 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/ethics_virtue-v0-res.json @@ -0,0 +1 @@ +{"results": {"ethics_virtue": {"acc": 0.5035175879396985, "acc_stderr": 0.0070893491553555765, "em": 0.036180904522613064}}, "versions": {"ethics_virtue": 0}} \ No newline at end of file diff --git a/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/gsm8k-v0-greedy_until b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/gsm8k-v0-greedy_until new file mode 100644 index 0000000000000000000000000000000000000000..d49400007f95ecd048628bb2f1cadf92132bef24 --- /dev/null +++ b/testbed/EleutherAI__lm-evaluation-harness/tests/testdata/gsm8k-v0-greedy_until @@ -0,0 +1 @@ +e7292dbdd7fd8419ba954f2e0701e04c8d0e8842fe053dbf2fe47d926630e35e \ No newline at end of file