Instructions to use flax-community/t5-vae-python with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flax-community/t5-vae-python with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import T5VaeForAutoencoding model = T5VaeForAutoencoding.from_pretrained("flax-community/t5-vae-python", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from flax-community/t5-vae-python: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/flax-community/t5-vae-python/resolve/main/README.md
- Command line
-
hf download hf://flax-community/t5-vae-python/README.md
-
curl -L -o README.md https://huggingface.co/flax-community/t5-vae-python/resolve/main/README.md
1.24 kB
metadata
language: python
tags: vae
license: apache-2.0
datasets: Fraser/python-lines
T5-VAE-Python (flax)
A Transformer-VAE made using flax.
Try the demo!
It has been trained to interpolate on lines of Python code from the python-lines dataset.
Done as part of Huggingface community training (see forum post).
Builds on T5, using an autoencoder to convert it into an MMD-VAE (more info).
How to use from the 🤗/transformers library
Add model repo as a submodule:
git submodule add https://github.com/Fraser-Greenlee/t5-vae-flax.git t5_vae_flax
from transformers import AutoTokenizer
from t5_vae_flax.src.t5_vae import FlaxT5VaeForAutoencoding
tokenizer = AutoTokenizer.from_pretrained("t5-base")
model = FlaxT5VaeForAutoencoding.from_pretrained("flax-community/t5-vae-python")
Setup
Run setup_tpu_vm_venv.sh to setup a virtual enviroment on a TPU VM for training.