|
pulsatrix 1.1.0
|
An attribution graph before pruning: every active feature, error and token, the explained logits, and the full adjacency. More...
#include <circuit_tracing.hpp>
Classes | |
| struct | Feature |
Public Member Functions | |
| int64_t | num_nodes () const |
| int64_t | error_node (int64_t layer, int64_t position) const |
| int64_t | token_node (int64_t position) const |
| int64_t | logit_node (int64_t k) const |
Public Attributes | |
| std::vector< Feature > | features |
| int64_t | num_layers = 0 |
| int64_t | num_positions = 0 |
| std::vector< int64_t > | tokens |
| std::vector< int64_t > | logit_tokens |
| The explained logits' token ids and probabilities. | |
| std::vector< double > | logit_probabilities |
| std::vector< double > | target_values |
| Each target's value with the frozen model: the pre-activation without b_enc, or the logit minus the mean logit. One per node (0 for errors and tokens). | |
| std::vector< double > | adjacency |
An attribution graph before pruning: every active feature, error and token, the explained logits, and the full adjacency.
Node order (circuit-tracer's): features, then errors (layer-major, one per layer and position), then token embeddings, then logits. adjacency[t * n + s] is the attribution of source s to target t: s's output vector, through the frozen model, dotted with t's input vector. A feature's input vector is its encoder row (pre-activation without b_enc); a logit's is its unembedding minus the mean unembedding, at the final norm's output.
| int64_t pulsatrix::CircuitTrace::error_node | ( | int64_t | layer, |
| int64_t | position | ||
| ) | const |
| int64_t pulsatrix::CircuitTrace::logit_node | ( | int64_t | k | ) | const |
| int64_t pulsatrix::CircuitTrace::num_nodes | ( | ) | const |
| int64_t pulsatrix::CircuitTrace::token_node | ( | int64_t | position | ) | const |
| std::vector<double> pulsatrix::CircuitTrace::adjacency |
| std::vector<Feature> pulsatrix::CircuitTrace::features |
| std::vector<double> pulsatrix::CircuitTrace::logit_probabilities |
| std::vector<int64_t> pulsatrix::CircuitTrace::logit_tokens |
The explained logits' token ids and probabilities.
| int64_t pulsatrix::CircuitTrace::num_layers = 0 |
| int64_t pulsatrix::CircuitTrace::num_positions = 0 |
| std::vector<double> pulsatrix::CircuitTrace::target_values |
Each target's value with the frozen model: the pre-activation without b_enc, or the logit minus the mean logit. One per node (0 for errors and tokens).
| std::vector<int64_t> pulsatrix::CircuitTrace::tokens |