Skip to content

Commit cc5b9ce

Browse files
craymichaelfacebook-github-bot
authored andcommitted
Add logprobs to results in service (pytorch#1628)
Summary: Pull Request resolved: pytorch#1628 Logprobs are now added to results which can help better understand attribution scores. Reviewed By: vivekmig Differential Revision: D78491492 fbshipit-source-id: d647e859ac0c421a131a2e31a3c2e13c4292c41f
1 parent 4fc093e commit cc5b9ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

captum/attr/_core/llm_attr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class LLMAttributionResult:
5555
token_attr: Optional[Tensor]
5656
input_tokens: List[str]
5757
output_tokens: List[str]
58+
output_probs: Optional[Tensor] = None
5859

5960
@property
6061
def seq_attr_dict(self) -> Dict[str, float]:

0 commit comments

Comments
 (0)