Skip to content

Commit

Permalink
Update npm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AakritiKinra authored Jan 1, 2025
1 parent 18e454b commit 582a524
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llments/eval/factscore/npm.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def get_probabilty(self, topic: str, question: str) -> float:
passages = [p["text"].strip() for p in passages_2]
cache_key = question + "#" + "#".join(passages)
if cache_key not in self.cache_dict:
encoded = self.encode(passages, skip_special_tokens=True)
encoded = cast(List[Tuple[List[int], np.ndarray]], self.encode(passages, skip_special_tokens=True))
stacked_passage_tokens: List[int] = []
stacked_passage_vectors: np.ndarray = []
for input_ids, vectors in encoded:
Expand Down

0 comments on commit 582a524

Please sign in to comment.