Simple Transformers is an easy-to-use wrapper library for the Transformers library, providing a unified API for training and using transformer models for NLP tasks such as classification, NER, QA, LM, etc. Current version is 0.70.8, released in 2022. Development is in maintenance mode with infrequent updates.
pip install simpletransformersNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minimal example: train a DistilBERT classifier and predict. Set use_cuda=False if no GPU.
Use from simpletransformers.classification import ClassificationModel.
Set args={'labels_list': [0, 1]} instead of passing num_labels to model constructor.Check HuggingFace model type and pass matching `model_type` string.
Set `use_cuda=False` explicitly in non-GPU environments, or detect GPU availability.
Initialize wandb before creating the model: import wandb; wandb.init(project='my_project').
Convert your data to a DataFrame: pd.DataFrame({'text': [...], 'labels': [...]}).