Fraser commited on
Commit
06f36dd
1 Parent(s): 24315fc

add load instructions

Browse files
Files changed (1) hide show
  1. README.md +17 -1
README.md CHANGED
@@ -15,6 +15,22 @@ Done as part of Huggingface community training ([see forum post](https://discuss
15
 
16
  Builds on T5, using an autoencoder to convert it into an MMD-VAE.
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  ## Setup
19
 
20
- Run `setup_tpu_vm_venv.sh` to setup a virtual enviroment.
 
15
 
16
  Builds on T5, using an autoencoder to convert it into an MMD-VAE.
17
 
18
+ ## How to use from the 🤗/transformers library
19
+
20
+ Clone the model repo.
21
+ ```bash
22
+ git clone https://github.com/Fraser-Greenlee/t5-vae-flax.git
23
+ ```
24
+
25
+ ```python
26
+ from transformers import AutoTokenizer
27
+ from t5_vae_flax.src.t5_vae import FlaxT5VaeForAutoencoding
28
+
29
+ tokenizer = AutoTokenizer.from_pretrained("t5-base")
30
+
31
+ model = T5VaeForAutoencoding.from_pretrained("flax-community/t5-vae-python")
32
+ ```
33
+
34
  ## Setup
35
 
36
+ Run `setup_tpu_vm_venv.sh` to setup a virtual enviroment on a TPU VM for training.