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 train.sh from flax-community/t5-vae-python: direct link, hf CLI and curl.
- Browser
- Download file 466 Bytes
-
https://huggingface.co/flax-community/t5-vae-python/resolve/main/train.sh
- Command line
-
hf download hf://flax-community/t5-vae-python/train.sh
-
curl -L -o train.sh https://huggingface.co/flax-community/t5-vae-python/resolve/main/train.sh
466 Bytes
| export RUN_NAME=two_latent | |
| ./venv/bin/python train.py \ | |
| --t5_model_name_or_path="t5-base" \ | |
| --output_dir="output/${RUN_NAME}" \ | |
| --overwrite_output_dir \ | |
| --dataset_name="Fraser/python-lines" \ | |
| --do_train --do_eval \ | |
| --n_latent_tokens 2 \ | |
| --latent_token_size 16 \ | |
| --save_steps="2500" \ | |
| --eval_steps="2500" \ | |
| --block_size="32" \ | |
| --per_device_train_batch_size="10" \ | |
| --per_device_eval_batch_size="10" \ | |
| --overwrite_output_dir \ | |
| --num_train_epochs="1" \ | |
| --push_to_hub \ | |