Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/EricFillion/happy-transformer
Happy Transformer makes it easy to fine-tune and perform inference with NLP Transformer models.
https://github.com/EricFillion/happy-transformer
ai artificial-intelligence bert deep-learning language-models machine-learning natural-language-processing nlp python question-answering roberta text-classification transformers
Last synced: 3 months ago
JSON representation
Happy Transformer makes it easy to fine-tune and perform inference with NLP Transformer models.
- Host: GitHub
- URL: https://github.com/EricFillion/happy-transformer
- Owner: EricFillion
- License: apache-2.0
- Created: 2019-10-06T22:02:12.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-16T19:00:04.000Z (7 months ago)
- Last Synced: 2024-07-15T14:40:37.414Z (5 months ago)
- Topics: ai, artificial-intelligence, bert, deep-learning, language-models, machine-learning, natural-language-processing, nlp, python, question-answering, roberta, text-classification, transformers
- Language: Python
- Homepage: http://happytransformer.com
- Size: 18.8 MB
- Stars: 514
- Watchers: 7
- Forks: 67
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Downloads](https://pepy.tech/badge/happytransformer)](https://pepy.tech/project/happytransformer)
[![Website shields.io](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](http://happytransformer.com)
![PyPI](https://img.shields.io/pypi/v/happytransformer)
[![](https://github.com/EricFillion/happy-transformer/workflows/build/badge.svg)](https://github.com/EricFillion/happy-transformer/actions)# Happy Transformer
**Documentation and news: [happytransformer.com](http://happytransformer.com)**Join our Discord server: [![Support Server](https://img.shields.io/discord/839263772312862740.svg?label=Discord&logo=Discord&colorB=7289da&style=?style=flat-square&logo=appveyor)](https://discord.gg/psVwe3wfTb)
![HappyTransformer](logo.png)
Happy Transformer makes it easy to fine-tune and perform inference with NLP Transformer models.
## 3.0.0
1. DeepSpeed for training
2. Apple's MPS for training and inference
3. WandB to track training runs
4. Data supplied for training is automatically split into portions for training and evaluating
5. Push models directly to Hugging Face's Model HubRead about the full 3.0.0 update including breaking changes [here](https://happytransformer.com/news/).
## Tasks
| Tasks | Inference | Training |
|--------------------------|-----------|------------|
| Text Generation | ✔ | ✔ |
| Text Classification | ✔ | ✔ |
| Word Prediction | ✔ | ✔ |
| Question Answering | ✔ | ✔ |
| Text-to-Text | ✔ | ✔ |
| Next Sentence Prediction | ✔ | |
| Token Classification | ✔ | |## Quick Start
```sh
pip install happytransformer
``````python
from happytransformer import HappyWordPrediction
#--------------------------------------#
happy_wp = HappyWordPrediction() # default uses distilbert-base-uncased
result = happy_wp.predict_mask("I think therefore I [MASK]")
print(result) # [WordPredictionResult(token='am', score=0.10172799974679947)]
print(result[0].token) # am
```## Maintainers
- [Eric Fillion](https://github.com/ericfillion) Lead Maintainer
- [Ted Brownlow](https://github.com/ted537) Maintainer## Tutorials
[Text generation with training (GPT-Neo)](https://youtu.be/GzHJ3NUVtV4)[Text classification (training)](https://www.vennify.ai/train-text-classification-transformers/)
[Text classification (hate speech detection)](https://youtu.be/jti2sPQYzeQ)
[Text classification (sentiment analysis)](https://youtu.be/Ew72EAgM7FM)
[Word prediction with training (DistilBERT, RoBERTa)](https://youtu.be/AWe0PHsPc_M)
[Top T5 Models ](https://www.vennify.ai/top-t5-transformer-models/)
[Grammar Correction](https://www.vennify.ai/grammar-correction-python/)
[Fine-tune a Grammar Correction Model](https://www.vennify.ai/fine-tune-grammar-correction/)