Customize a Training Job
The SliceX AI Trainer allows you a high degree of customization over several model and training parameters for all tasks. Currently, we support the following :
- Batch size: In general, when training on smaller datasets, we recommend using a lower batch size. A good rule of thumb is having a batch size not greater than 1/5th size of your training data. By default it is set to 64.
- Number of epochs: limited to 20 at the moment, note that our models tend to converge under 10 epochs in most cases. By default it is set to 10
- Learning rate: By default it is set to 1e-3.
- Pretrained SliceX AI models for initialization.
- Lowercase: Choose to make your training job case-sensitive (or not!) as your task demands.
- Model family: Review the task specific SliceX AI™ Cloud Platform model families here.
For text classification we also support three additional options:
- Data augmentation
- Language of the pretrained SliceX AI model (if using for initialization): We currently provide pretrained SliceX AI models for model initialization that have been optimized for three languages-English, Spanish, and Japanese. Note that there are no language specific limitations on custom training itself. SliceX AI APIs can support multilinguality by default.
- Tokenization: Option for multilingual data that might benefit from added tokenization eg. in non-segmented languages like Chinese and Japanese. Check out a tutorial for configuring the SliceX AI Trainer for multilingual data here.
These custom options are packaged under either preprocessing
, training_config
or model_config
in the training REQUEST (quick reference here).
An example REQUEST body for a binary text classification training job customization is:
Binary Text Classification: Training Job Configuration Example
{
"preprocessing": {
"lowercase": true,
"add_tokenization":""
},
"training_config": {
"batch_size": 64,
"learning_rate": 0.001,
"num_epochs": 5,
"language": "english",
"data_augmentation": true,
"use_pretrained": true
},
"model_config": {
"name": "model_name",
"type": "binary-text-classification",
"family": "Papaya",
"size": "mini"
},
"dataset_url": "DATASET_URL"
}
info
The different task types are:
- Binary Text Classification: "binary-text-classification"
- Multiclass Text Classification: "multiclass-text-classification"
- Multilabel Text Classification: "multilabel-text-classification"
- Question Answering: "question-answering"
- Sequence Labeling: "sequence-labeling"