Hugging Face Multi-Label Classification Training
Learn about the hf_clf_multi_label_train
function within Simplifine’s Train Engine
hf_clf_multi_label_train(
model_name:str,
dataset_name:str='',
num_epochs:int=3,
batch_size:int=8,
lr:float=5e-5,
from_hf:bool=True,
inputs:list=[],
labels:list=[],
use_peft:bool=False,
peft_config=None,
accelerator=None,
apply_class_weights:bool=False,
num_labels:int=0
)
The name or path of the pre-trained model to use.
The name of the dataset to be used for training. Defaults to an empty string.
The number of training epochs. Defaults to 3
.
The batch size for training. Defaults to 8
.
The learning rate for optimization. Defaults to 5e-5
.
A flag to determine whether to load the dataset from Hugging Face. Defaults to True
.
A list of input data for training. Defaults to an empty list.
A list of labels for training. Defaults to an empty list.
A flag to enable Parameter-Efficient Fine-Tuning (PEFT). Defaults to False
.
The configuration object for PEFT. Defaults to None
.
The accelerator object for distributed training. Defaults to None
.
A flag to apply class weights to handle imbalanced datasets. Defaults to False
.
The number of labels in the dataset. Defaults to 0
.