27 std::string
slug =
"pulsatrix-graph";
29 std::string
scan =
"pulsatrix";
AttnLRP parity with LXT on a real language model (LLM-7): pulsatrix's relevance against LXT's own Att...
Attribution graphs in the JSON that Neuronpedia's graph viewer and circuit-tracer's local viewer read...
A Llama-family decoder-only language model built from a Hugging Face config, and loading its Hugging ...
Token embedding, num_hidden_layers pre-norm transformer blocks, a final RMSNorm and a language-model ...
Definition causal_lm.hpp:82
Vendor-agnostic compute/memory backend. CPUBackend, CUDABackend (Phase 1.5), and HIPBackend (Phase 1....
Definition device_backend.hpp:248
Selects which LRP rule variant a Module::propagate_relevance() call uses.
Definition acquisition_functions.hpp:16
LRPRuleConfig LxtAttnLrpConfig()
The rule configuration that matches LXT's AttnLRP on a Hugging Face model: the epsilon rule with a ti...
AttributionGraph BuildRelevanceGraph(CausalLM &model, DeviceBackend *backend, const std::vector< int64_t > &ids, int64_t target, const RelevanceGraphOptions &options)
Explains the model's logit for target at the last position with LRP and returns the relevance flow as...
An attribution graph as Neuronpedia's schema (graph-schema.json) and circuit-tracer's create_graph_fi...
Definition attribution_graph.hpp:26
Configuration for LRP relevance propagation: which rule a module applies and its hyperparameters....
Definition lrp_rule_config.hpp:72
Definition relevance_graph.hpp:20
LRPRuleConfig config
The LRP rules: AttnLRP as LXT applies it, by default.
Definition relevance_graph.hpp:22
int64_t max_tokens
Refuse longer inputs: the graph costs one block pass per layer and position.
Definition relevance_graph.hpp:36
double node_threshold
The viewer's default node pruning threshold (ComputeInfluence).
Definition relevance_graph.hpp:26
std::string target_text
The explained token as text, for the output node's label.
Definition relevance_graph.hpp:34
double edge_threshold
Keep the fewest links holding this share of the total |relevance| (PruneLinks).
Definition relevance_graph.hpp:24
std::vector< std::string > prompt_tokens
Definition relevance_graph.hpp:32
std::string prompt
The prompt's text, and each token as text (one per id).
Definition relevance_graph.hpp:31
std::string scan
The model id the viewer shows, for example "Qwen2.5-0.5B".
Definition relevance_graph.hpp:29
std::string slug
Definition relevance_graph.hpp:27