Skip to content

Commit

Permalink
Merge pull request #54 from michael-quinlan/main
Browse files Browse the repository at this point in the history
Remove code that overrides max_seq_length
  • Loading branch information
hongjin-su authored Jul 2, 2023
2 parents ca2e296 + 3530638 commit 30b5e5c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion InstructorEmbedding/instructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ def __init__(self, model_name_or_path: str, max_seq_length = None,

#No max_seq_length set. Try to infer from model
# print('max_seq_length ', max_seq_length)
max_seq_length = 512
if max_seq_length is None:
if hasattr(self.auto_model, "config") and hasattr(self.auto_model.config, "max_position_embeddings") and hasattr(self.tokenizer, "model_max_length"):
max_seq_length = min(self.auto_model.config.max_position_embeddings, self.tokenizer.model_max_length)
Expand Down

0 comments on commit 30b5e5c

Please sign in to comment.