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 check_install.py from flax-community/t5-vae-python: direct link, hf CLI and curl.
- Browser
- Download file 555 Bytes
-
https://huggingface.co/flax-community/t5-vae-python/resolve/5932e26fca8d41981f5be87f6a93a2f4b2bf4568/check_install.py
- Command line
-
hf download hf://flax-community/t5-vae-python@5932e26fca8d41981f5be87f6a93a2f4b2bf4568/check_install.py
-
curl -L -o check_install.py https://huggingface.co/flax-community/t5-vae-python/resolve/5932e26fca8d41981f5be87f6a93a2f4b2bf4568/check_install.py
555 Bytes
| from transformers import FlaxRobertaModel, RobertaTokenizerFast | |
| from datasets import load_dataset | |
| import jax | |
| dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True) | |
| dummy_input = next(iter(dataset))["text"] | |
| tokenizer = RobertaTokenizerFast.from_pretrained("roberta-base") | |
| input_ids = tokenizer(dummy_input, return_tensors="np").input_ids[:, :10] | |
| model = FlaxRobertaModel.from_pretrained("julien-c/dummy-unknown") | |
| # run a forward pass, should return an object `FlaxBaseModelOutputWithPooling` | |
| z = model(input_ids) | |