t03i commited on
Commit
2b7670e
1 Parent(s): 9b36cbf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -43,7 +43,7 @@ import torch
43
 
44
  tokenizer = T5Tokenizer.from_pretrained('Rostlab/prot_t5_xl_half_uniref50-enc', do_lower_case=False)
45
 
46
- model = T5EncoderModel.from_pretrained("Rostlab/prot_t5_xl_half_uniref50-enc")
47
 
48
  sequences_Example = ["A E T C Z A O","S K T Z P"]
49
 
@@ -60,6 +60,7 @@ emb_0 = embedding_repr.last_hidden_state[0,:6]
60
  emb_1 = embedding_repr.last_hidden_state[1,:4]
61
  ```
62
 
 
63
 
64
  ### BibTeX entry and citation info
65
 
 
43
 
44
  tokenizer = T5Tokenizer.from_pretrained('Rostlab/prot_t5_xl_half_uniref50-enc', do_lower_case=False)
45
 
46
+ model = T5EncoderModel.from_pretrained("Rostlab/prot_t5_xl_half_uniref50-enc", torch_dtype=torch.float16)
47
 
48
  sequences_Example = ["A E T C Z A O","S K T Z P"]
49
 
 
60
  emb_1 = embedding_repr.last_hidden_state[1,:4]
61
  ```
62
 
63
+ **NOTE**: Please make sure to explicitly set the model to `float16` (`T5EncoderModel.from_pretrained('Rostlab/prot_t5_xl_half_uniref50-enc', torch_dtype=torch.float16)`) otherwise, the generated embeddings will be full precision.
64
 
65
  ### BibTeX entry and citation info
66