← Python API
vraven · class

VRavenConfig

VRavenConfig(mode: 'ExplanationMode' = 'fast', device: 'str' = 'auto', auto_move_inputs: 'bool' = True, module_policy: 'ModulePolicy' = 'leaf', include_module_types: 'tuple[str, ...]' = (), exclude_module_types: 'tuple[str, ...]' = ('Dropout', 'Identity'), include_name_patterns: 'tuple[str, ...]' = (), exclude_name_patterns: 'tuple[str, ...]' = (), max_layers: 'int' = 256, max_units: 'int' = 128, representation_size: 'int' = 64, max_attention_tokens: 'int' = 128, histogram_bins: 'int' = 32, entropy_sample_limit: 'int' = 262144, capture_entropy: 'bool' = True, capture_representations: 'bool' = True, capture_unit_profiles: 'bool' = True, capture_attention: 'bool' = True, capture_input_attribution: 'bool' = True, capture_full_tensors: 'bool' = False, capture_timing: 'bool' = True, causal_top_k: 'int' = 3, causal_strategy: 'CausalStrategy' = 'zero', causal_scale: 'float' = 0.0, epsilon: 'float' = 1e-08, random_seed: 'int' = 17, strict: 'bool' = True, class_dim: 'int | None' = None, probability_transform: 'str | None' = None, target_reduction: 'str | None' = None, class_names: 'tuple[str, ...] | None' = None, target_label: 'str | None' = None, output_path: 'str | None' = None) -> None

Validated configuration for one explanation run.

``fast`` performs a forward pass and immediately reduces captured tensors.
``gradient`` adds one target-specific reverse pass. ``causal`` performs the
gradient trace and then a limited number of temporary layer interventions.

Usage

from vraven import VRavenConfig

value = VRavenConfig(...)

Methods

to_dict(self) -> 'dict[str, object]'

Public method.

Source of truthThis page is generated from the checked-out public symbol, signature, and docstring. Pin the package version for reproducible work.