Skip to main content

Happy Transformer makes it easy to fine-tune NLP Transformer models and use them for inference.

Project description

License Downloads Website shields.io PyPI

Happy Transformer

Documentation and news: happytransformer.com

Join our Discord server: Support Server

HappyTransformer

Happy Transformer makes it easy to fine-tune NLP Transformer models and use them for inference.

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 Hub

Read about the full 3.0.0 update including breaking changes here.

Tasks

Tasks Inference Training
Text Generation
Text Classification
Word Prediction
Question Answering
Text-to-Text
Next Sentence Prediction
Token Classification

Quick Start

pip install happytransformer
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

Tutorials

Text generation with training (GPT-Neo)

Text classification (training)

Text classification (hate speech detection)

Text classification (sentiment analysis)

Word prediction with training (DistilBERT, RoBERTa)

Top T5 Models

Grammar Correction

Fine-tune a Grammar Correction Model

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

happytransformer-3.0.0.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

happytransformer-3.0.0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file happytransformer-3.0.0.tar.gz.

File metadata

  • Download URL: happytransformer-3.0.0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.10

File hashes

Hashes for happytransformer-3.0.0.tar.gz
Algorithm Hash digest
SHA256 f12e5e03da5f1c10317408e5bfcaccb7ffbf3ab192cb89a56f91c0f70545a0bb
MD5 1476457af778d2d6d27c7aeaabe8081b
BLAKE2b-256 0af577b99cdfc9ff49866273c492ee05a50dad36d03e00f65412842a7f2cd6df

See more details on using hashes here.

File details

Details for the file happytransformer-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for happytransformer-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30e01622603ae191f5febe252a01ba28a6eac9edc3ad123010f667657dfe47d2
MD5 9a3a8e09dd1f686a8c65aaf4320474f9
BLAKE2b-256 f6ed8abe77d280294a454534003242431439b102cf17e1089fde6020f90ab621

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page