Update README.md
Browse filesmax_length param added to Hugging Face Transformer part
README.md
CHANGED
@@ -58,7 +58,7 @@ tokenizer = AutoTokenizer.from_pretrained('mpi-inno-comp/pat_specter')
|
|
58 |
model = AutoModel.from_pretrained('mpi-inno-comp/pat_specter')
|
59 |
|
60 |
# Tokenize sentences
|
61 |
-
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
62 |
|
63 |
# Compute token embeddings
|
64 |
with torch.no_grad():
|
|
|
58 |
model = AutoModel.from_pretrained('mpi-inno-comp/pat_specter')
|
59 |
|
60 |
# Tokenize sentences
|
61 |
+
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt', max_length=512)
|
62 |
|
63 |
# Compute token embeddings
|
64 |
with torch.no_grad():
|