Coverage for pattern_lens\consts.py: 100%
17 statements
« prev ^ index » next coverage.py v7.6.9, created at 2025-01-03 23:21 -0700
« prev ^ index » next coverage.py v7.6.9, created at 2025-01-03 23:21 -0700
1"""implements some constants and types"""
3import re
5import numpy as np
6from jaxtyping import Float
8AttentionMatrix = Float[np.ndarray, "n_ctx n_ctx"]
9"type alias for attention matrix"
11ActivationCacheNp = dict[str, np.ndarray]
12"type alias for a cache of attention matrices, subset of ActivationCache"
14DATA_DIR: str = "attn_data"
15"default directory for attention data"
17ATTN_PATTERN_REGEX: re.Pattern = re.compile(r"blocks\.(\d+)\.attn\.hook_pattern")
18"regex for finding attention patterns in model state dicts"
20SPINNER_KWARGS: dict = dict(
21 config=dict(success="✔️ "),
22)
23"default kwargs for `muutils.spinner.Spinner`"
25DIVIDER_S1: str = "=" * 70
26"divider string for separating sections"
28DIVIDER_S2: str = "-" * 50
29"divider string for separating subsections"