cnmoro commited on
Commit
7a85132
·
verified ·
1 Parent(s): cfcbfd8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -21,8 +21,8 @@ def rerank(question, passages, normalize_scores=True):
21
  templates = [f"Query: {question}\nSentence: {passage}" for passage in passages]
22
  encoded_inputs = reranker_tokenizer.encode_batch(templates)
23
 
24
- # Convert to lists and truncate sequences to max length (512)
25
- input_ids = [enc.ids[:512] for enc in encoded_inputs] # Truncate here
26
  attention_mask = [[1] * len(ids) for ids in input_ids]
27
 
28
  # Find max length in batch
 
21
  templates = [f"Query: {question}\nSentence: {passage}" for passage in passages]
22
  encoded_inputs = reranker_tokenizer.encode_batch(templates)
23
 
24
+ # Convert to lists and truncate sequences to max length (32768)
25
+ input_ids = [enc.ids[:32768] for enc in encoded_inputs] # Truncate here
26
  attention_mask = [[1] * len(ids) for ids in input_ids]
27
 
28
  # Find max length in batch