Hi @putopavel, to map your str labels to int with nlp you can simply do the following
if you have 3 labels  “A”, “B” and “C”, create dict with string label to int mapping i.e
label_to_int = {"A": 0, "B": 1, "C": 2} then
train_dataset.map(lambda example: {"label": label_to_int[example['LABEL']})

and to specify the number of classes in model, set the num_labels property on config object
model.config.num_labels = 3