Skip to content

Experiment settings: Text span prediction

Besides having certain common experiment settings with other problem types, the specific settings for a text span prediction experiment are listed and described below.

Dataset Settings

Question Column

Defines the dataset column containing the question text H2O Hydrogen Torch will use during model training.

Context Column

Defines the dataset column containing text that answers the question in the question column; H2O Hydrogen Torch will use the context column during model training.

Answer Column

Defines the dataset column containing the answer text that H2O Hydrogen Torch will use during model training.

Answer Start Column

Defines the dataset column, which describes the start of the answer text in the context column. If not set, H2O Hydrogen Torch will choose the first occurrence of the answer text found in the context text as the start of the answer text in the context column.

Number of Predicted Answers

Defines the number of predicted answers which will be computed and displayed.

Tokenizer Settings

Lowercase

Grid search hyperparameter

Determines whether to transform to lower case the text that H2O Hydrogen Torch will observe during the experiment. This setting is turned Off by default.

Note

When turned On, the observed text will always be lowercased before training and prediction. Tuning this setting can potentially lead to a higher accuracy value for certain types of datasets.

Max Length

Grid search hyperparameter

Defines the maximum length of the input sequence H2O Hydrogen Torch will use during model training. In other words, this setting specifies the maximum number of tokens an input text is transformed to for model training.

Note

A higher token count will lead to higher memory usage that will slow down training while increasing the probability of obtaining a higher accuracy value.

Doc Stride

Defines the length of the striding window H2O Hydrogen Torch that will use for model training.

Note

When the context is too long, it will be split into several chunks.

Architecture Settings

Backbone

Grid search hyperparameter

Defines the backbone neural network architecture to train the model.

Note

H2O Hydrogen Torch provides several backbone state-of-the-art neural network architectures for model training. H2O Hydrogen Torch accepts backbone neural network architectures from the Hugging Face library (enter the architecture name).

Tip

Usually, it is good to use simpler architectures for quicker experiments and larger models when aiming for the highest accuracy.

Gradient Checkpointing

Determines whether H2O Hydrogen Torch will activate gradient-checkpointing (GC) when training the model, starting GC reduces the video random access memory (VRAM) footprint at the cost of a longer runtime (an additional forward pass). Turning On GC will enable it during the training process.

Note

Gradient checkpointing is an experimental setting that is not compatible with all backbones. If a backbone is not supported, the experiment will fail, and H2O Hydrogen Torch will inform through the logs that the selected backbone is not compatible with gradient checkpointing. To learn about the backbone setting, see Backbone.

Tip

Activating GC comes at the cost of a longer training time; for that reason, try training without GC first and only activate when experiencing GPU out-of-memory (OOM) errors.

Custom Intermediate Dropout

Determines whether to enable a custom dropout rate for intermediate layers in the transformer model. When turned Off, H2O Hydrogen Torch will use the pre-trained backbone's usual 0.1 default dropout rate. See Intermediate Dropout to learn how to define a custom dropout rate.

Intermediate Dropout

Defines the custom dropout rate H2O Hydrogen Torch will use for intermediate layers in the transformer model.

Training Settings

A text span prediction experiment does not have specific training settings besides those specified in the training settings section of the common experiment settings page.

Prediction Settings

A text span prediction experiment does not have specific prediction settings besides those specified in the prediction settings section of the common experiment settings page.

Environment Settings

A text span prediction experiment does not have specific environment settings besides those specified in the environment settings section of the common experiment settings page.

Logging Settings

Number of Texts

This setting defines the number of texts to show in the experiment Insights tab.


Back to top