Skip to main content

Utilities for 'Hands-On Generative AI with Transformers and Diffusion Models' (upcoming)

Project description

genaibook

This package contains some utilities to support the upcoming O’Reilly book Hands-On Generative AI with Transformers and Diffusion Models. The book is currently in progress, if you have access to the Early Release through your O’Reilly account, feel free to explore it and send us your feedback!

Setup

Code is an essential part of the book content, and we highly recommend to run the code examples while reading it. We also recommend to explore on your own by modifying the code snippets or creating your own!

This package will help you setup your environment and provides some basic utilities used throughout the book.

Hardware and Software Requirements

genaibook only requires Python 3.10 or better. Dealing with transformers and diffusion models is a compute-intensive task, so having access to a computer with a NVIDIA GPU will be needed. There are multiple online options that you can use such as Google Colaboratory and Kaggle Notebooks.

You can also run in a local environment if your computer has a NVIDIA GPU. Support for mps on Apple Silicon Macs has not been tested yet.

Local Environment

If you want to install in your computer, please install a Python 3.10 virtual environment using your preferred method. As an example, you can do it with conda like this:

conda create -n genaibook python=3.10
conda activate genaibook

Package Install

If you are using your own local environment, just run the following in a terminal window:

pip install genaibook

If you are using a notebook-based environment such as Google Colaboratory or Kaggle Notebooks, enter the following in the first cell of a new notebook:

!pip install genaibook

This will in turn install PyTorch, matplotlib, numpy and other essentials.

Additional Software Install

If you are following the book, you’ll also need to install transformers, diffusers and other related libraries:

pip install transformers diffusers accelerate datasets[audio] evaluate sentencepiece

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

genaibook-0.0.3.tar.gz (12.0 kB view hashes)

Uploaded Source

Built Distribution

genaibook-0.0.3-py3-none-any.whl (11.2 kB view hashes)

Uploaded Python 3

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