From 12e4e75f6633518f4b1926a2dd9bdfb2ce91c666 Mon Sep 17 00:00:00 2001 From: Zach Carmichael Date: Thu, 17 Jul 2025 19:20:54 -0700 Subject: [PATCH] Add logprobs to results in service (#1628) Summary: Pull Request resolved: https://github.com/pytorch/captum/pull/1628 Logprobs are now added to results which can help better understand attribution scores. Differential Revision: D78491492 --- captum/attr/_core/llm_attr.py | 1 + 1 file changed, 1 insertion(+) diff --git a/captum/attr/_core/llm_attr.py b/captum/attr/_core/llm_attr.py index 7c124b727..90540b1bd 100644 --- a/captum/attr/_core/llm_attr.py +++ b/captum/attr/_core/llm_attr.py @@ -55,6 +55,7 @@ class LLMAttributionResult: token_attr: Optional[Tensor] input_tokens: List[str] output_tokens: List[str] + output_probs: Optional[Tensor] = None @property def seq_attr_dict(self) -> Dict[str, float]: