Skip to main content

Train and use generative language models with only three lines of code.

Project description

Train and use generative text models in a few lines of code.

Installation

Use the package manager pip to install blather.

pip install blather

Fine tuning large generative language models in tractable time require the use of at least a single GPU. For the time being running blather on a CPU only system will cause errors. This may be addressed in the future

Usage

from blather import Blather

blather = Blather()

# fine tunes an appropriate model on your dataset
blather.read(['Text Examples One', 'Second Text Example'... 'Text Example k'])

# returns a text sample generated from the model
blather.write('Sample text to complete')

# saves model
blather.save('model.pt')

# load model from previous training
blather.load('model.pt')

Contributing

https://github.com/bigthonk/blather

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

Apache

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

blather-1.0.6.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file blather-1.0.6.tar.gz.

File metadata

  • Download URL: blather-1.0.6.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for blather-1.0.6.tar.gz
Algorithm Hash digest
SHA256 789e9721994f2c82e244764d71a9e72845c3e3b1ffcf744a12d792e72e714a31
MD5 682f03f0c8e8c085381bb10900da3a30
BLAKE2b-256 1ac290ed58183bab2e1a918ded767b4d386d77d60858d7dc95323ab5cbd7c62d

See more details on using hashes here.

Supported by

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