mughosh commited on
Commit
add7c13
·
verified ·
1 Parent(s): 78753c4

Update README.md

Browse files

max_length param added to Hugging Face Transformer part

Files changed (1) hide show
  1. README.md +1 -1
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():