Instructions to use lvwerra/bert-imdb with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lvwerra/bert-imdb with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="lvwerra/bert-imdb")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("lvwerra/bert-imdb") model = AutoModelForSequenceClassification.from_pretrained("lvwerra/bert-imdb", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from lvwerra/bert-imdb: direct link, hf CLI and curl.
- Browser
- Download file 619 Bytes
-
https://huggingface.co/lvwerra/bert-imdb/resolve/main/README.md
- Command line
-
hf download hf://lvwerra/bert-imdb/README.md
-
curl -L -o README.md https://huggingface.co/lvwerra/bert-imdb/resolve/main/README.md
619 Bytes
| # BERT-IMDB | |
| ## What is it? | |
| BERT (`bert-large-cased`) trained for sentiment classification on the [IMDB dataset](https://www.kaggle.com/lakshmi25npathi/imdb-dataset-of-50k-movie-reviews). | |
| ## Training setting | |
| The model was trained on 80% of the IMDB dataset for sentiment classification for three epochs with a learning rate of `1e-5` with the `simpletransformers` library. The library uses a learning rate schedule. | |
| ## Result | |
| The model achieved 90% classification accuracy on the validation set. | |
| ## Reference | |
| The full experiment is available in the [tlr repo](https://lvwerra.github.io/trl/03-bert-imdb-training/). | |