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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for genaibook-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60c4b6908afb01befc6e581652d62e8468d794f177f21629fca552896cc5ccb5 |
|
MD5 | 1010ba15a92d61909272eba9a8fd7e71 |
|
BLAKE2b-256 | 042a6b157a81b20b868bd5e06229bac8ed5137872f3dc4e369c71b3a8c64f7de |