ConceptMatcher¶
- class linear_relational.ConceptMatcher(model, tokenizer, concepts, layer_matcher=None, map_activations_fn=None)[source]¶
Match concepts against subject activations in a model
- concepts¶
- layer_matcher¶
- layer_name_to_num¶
- map_activations_fn¶
- model¶
- tokenizer¶
- class linear_relational.ConceptMatchQuery(text: str, subject: str | int | Callable[[str, list[int]], int])[source]¶
- subject¶
- text¶
- class linear_relational.QueryResult(concept_results: dict[str, linear_relational.ConceptMatcher.ConceptMatchResult])[source]¶
- property best_match¶
- concept_results¶