Practical overview
When it fits
Use it as an inspectable starting point when studying an older notebook-based training workflow or adapting its examples. Check the library-version caveat before relying on it with a current Transformers installation.
Who it is for
- Developers studying or adapting a notebook-based Transformer text-classification workflow.
- Practitioners who want to examine an example using Yelp Reviews and model families including BERT, XLNet, RoBERTa and XLM.
Documented uses
- Prepare Yelp Reviews files for a text-classification example.
- Fine-tune a Transformer model on prepared classification data.
- Evaluate the model in the example workflow.
- Inspect or adapt training code for BERT, XLNet, RoBERTa or XLM.
Requirements & limits
The repository is public and licensed under Apache-2.0.
- The README lists BERT, XLNet, RoBERTa and XLM support.
- The documented setup uses Conda, PyTorch and the older pytorch-transformers package, alongside Jupyter and common data-science dependencies.
- The README explicitly marks the repository deprecated, says it will not be updated, and warns of possible incompatibility with current Hugging Face Transformers versions.
- The README directs readers seeking a maintained, simpler training and evaluation library to Simple Transformers.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare the Conda environment and repository
Set up the environment and clone the repository for working with its notebooks.
Before you start
- Anaconda or Miniconda
- A machine with Conda available; the README gives separate PyTorch installation instructions for CUDA and CPU
Steps
Create and activate a Conda environment with Python, pandas, tqdm and Jupyter.
Install PyTorch using the README's CUDA or CPU-only instructions.
Install SciPy and scikit-learn with Conda, then install pytorch-transformers and tensorboardX with pip.
Clone the repository using the README's Git command.
Expected outcome
A Conda environment with the listed dependencies and a local copy of the notebook repository.
Guide limitations
- The repository is deprecated and may not be compatible with current Hugging Face Transformers versions.
- The README says the project will not be updated.
Prepare and run the Yelp classification example
Use the documented Yelp Reviews workflow to prepare data, fine-tune a Transformer model and evaluate results.
Before you start
- The repository notebooks and dependencies
- Yelp Reviews dataset files, with train.csv and test.csv placed in the data/ directory
Steps
Download and extract the Yelp Reviews dataset, or use data_download.sh on Linux.
Run data_prep.ipynb to prepare the dataset.
Run run_model.ipynb to fine-tune a Transformer model on the Yelp data and evaluate results.
Expected outcome
The documented workflow prepares Yelp data and uses it to train and evaluate a text-classification model.
Guide limitations
- The repository is deprecated and may not work with current Hugging Face Transformers versions.
- The README does not guarantee compatibility with current library releases.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- ThilinaRajapakse/pytorch-transformers-classification · Official homepage title · retained in its source language
Related options
Simple Transformers — The repository README recommends it as the updated, maintained successor for training and evaluating Transformer models with a simpler interface.
Explore project →
