lm_polygraph.stat_calculators.attention_eliciting_prompt module
- class lm_polygraph.stat_calculators.attention_eliciting_prompt.AttentionElicitingPromptCalculator[source]
- class lm_polygraph.stat_calculators.attention_eliciting_prompt.BaseAttentionPromptCalculator(prompt: str, suffix_prompt: str, method: str, input_text_dependency: str = 'input_texts', generation_text_dependency: str = 'greedy_texts', output_attentions: bool = False)[source]
Bases:
StatCalculatorCalculates the attention weights for a specific token to be generated from the specific prompt. Used for CSL method.