Joshua Lochner commited on
Commit
9604abd
·
1 Parent(s): 39f6f81

Adjust tokenizer input size based on model input size

Browse files
Files changed (1) hide show
  1. src/model.py +1 -1
src/model.py CHANGED
@@ -112,6 +112,6 @@ def get_model_tokenizer(model_name_or_path, cache_dir=None):
112
  # TODO add this back: means that different models will have different training data
113
  # Currently we only send 512 tokens to the model each time...
114
  # Adjust based on dimensions of model
115
- # tokenizer.model_max_length = model.config.d_model
116
 
117
  return model, tokenizer
 
112
  # TODO add this back: means that different models will have different training data
113
  # Currently we only send 512 tokens to the model each time...
114
  # Adjust based on dimensions of model
115
+ tokenizer.model_max_length = model.config.d_model
116
 
117
  return model, tokenizer