FarhanAK128 commited on
Commit
11080a7
·
verified ·
1 Parent(s): 54415bf

Update model_class.py

Browse files
Files changed (1) hide show
  1. model_class.py +1 -1
model_class.py CHANGED
@@ -191,7 +191,7 @@ class TicketGPT(
191
 
192
  # Prepare inputs to the model
193
  input_ids = tokenizer.encode(text)
194
- supported_context_length = model.pos_emb.weight.shape[0]
195
 
196
  # Truncate sequences if they too long
197
  input_ids = input_ids[:min(max_length, supported_context_length)]
 
191
 
192
  # Prepare inputs to the model
193
  input_ids = tokenizer.encode(text)
194
+ supported_context_length = self.config.context_length
195
 
196
  # Truncate sequences if they too long
197
  input_ids = input_ids[:min(max_length, supported_context_length)]