Metadata-Version: 2.1
Name: genaibook
Version: 0.0.5
Summary: Utilities for 'Hands-On Generative AI with Transformers and Diffusion Models' (upcoming)
Home-page: https://github.com/johnowhitaker/genaibook
Author: Jonathan Whitaker
Author-email: johnowhitaker@gmail.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE

`genaibook`
================

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

This package contains some utilities to support the upcoming O’Reilly
book [*Hands-On Generative AI with Transformers and Diffusion
Models*](https://www.oreilly.com/library/view/hands-on-generative-ai/9781098149239/).
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](https://colab.research.google.com/) and [Kaggle
Notebooks](https://www.kaggle.com/docs/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:

``` bash
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:

``` bash
pip install genaibook
```

If you are using a notebook-based environment such as [Google
Colaboratory](https://colab.research.google.com/) or [Kaggle
Notebooks](https://www.kaggle.com/docs/notebooks), enter the following
in the first cell of a new notebook:

``` bash
!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:

``` bash
pip install transformers diffusers accelerate datasets[audio] evaluate sentencepiece
```
