benchmarking.benchmark_definitions.finetune_transformer_glue module
- benchmarking.benchmark_definitions.finetune_transformer_glue.finetune_transformer_glue_benchmark(sagemaker_backend=False, choose_model=False, dataset='rte', model_type='bert-base-cased', num_train_epochs=3, train_valid_fraction=0.7, random_seed=31415927, **kwargs)[source]
This benchmark consists of fine-tuning a Hugging Face transformer model, selected from the zoo, on one of the GLUE benchmarks:
Wang etal.GLUE: A Multi-task Benchmark and Analysis Platform for NaturalLanguage UnderstandingICLR 2019- Parameters:
sagemaker_backend (
bool
) – Use SageMaker backend? This affects the choice of instance type. Defaults toFalse
choose_model (
bool
) – Should tuning involve selecting the best pre-trained model fromPRETRAINED_MODELS
? If so, the configuration space is extended by another choice variable. Defaults toFalse
dataset (
str
) – Name of GLUE task, fromTASK2METRICSMODE
. Defaults to “rte”model_type (
str
) – Pre-trained model to be used. Ifchoose_model
is set, this is the model used in the first evaluation. Defaults to “bert-base-cased”num_train_epochs (
int
) – Maximum number of epochs for fine-tuning. Defaults to 3train_valid_fraction (
float
) – The original training set is split into training and validation part, this is the fraction of the training partrandom_seed (
int
) – Random seed for training scriptkwargs – Overwrites default params in
RealBenchmarkDefinition
object returned
- Return type:
- benchmarking.benchmark_definitions.finetune_transformer_glue.finetune_transformer_glue_all_benchmarks(sagemaker_backend=False, model_type='bert-base-cased', num_train_epochs=3, train_valid_fraction=0.7, random_seed=31415927, **kwargs)[source]
- Return type:
Dict
[str
,RealBenchmarkDefinition
]