MCPcopy Create free account

hub / github.com/adamkarvonen/activation_oracles / functions

Functions716 in github.com/adamkarvonen/activation_oracles

↓ 101 callersMethodreplace
( self, target_feature_test_sentences: Slist[int] | None = None, train_activating_sent
nl_probes/autointerp_detection_eval/eval_detection_v2.py:840
↓ 101 callersMethodsplit
(self, proportions)
nl_probes/dataset_classes/classification_dataset_manager.py:797
↓ 73 callersMethodload
(self, num_qa_per_sample: int)
nl_probes/dataset_classes/classification_dataset_manager.py:44
↓ 29 callersMethoddecode
Must be implemented by child classes
nl_probes/sae.py:106
↓ 25 callersFunctionload_tokenizer
( model_name: str, )
nl_probes/utils/common.py:39
↓ 24 callersMethodto
Handle device and dtype updates
nl_probes/sae.py:115
↓ 20 callersFunctioncalculate_confidence_interval
Calculate 95% confidence interval for accuracy data from list of accuracies.
experiments/final_paper_plots/plot_lr_sweep_combined.py:260
↓ 18 callersMethodcall
( self, messages: ChatHistory, config: InferenceConfig, try_number: int = 1,
nl_probes/autointerp_detection_eval/caller.py:392
↓ 16 callersFunctionload_model
( model_name: str, dtype: torch.dtype, **model_kwargs, )
nl_probes/utils/common.py:18
↓ 15 callersMethodencode
Must be implemented by child classes
nl_probes/sae.py:101
↓ 15 callersMethodfrom_user
(content: str)
nl_probes/autointerp_detection_eval/caller.py:90
↓ 15 callersFunctionget_hf_submodule
Gets the residual stream submodule for HF transformers
nl_probes/utils/activation_utils.py:137
↓ 13 callersFunctioncreate_training_datapoint
( datapoint_type: str, prompt: str, target_response: str, layer: int, num_positions: int,
nl_probes/utils/dataset_utils.py:288
↓ 12 callersFunctioncollect_activations_multiple_layers
( model: AutoModelForCausalLM, submodules: dict[int, torch.nn.Module], inputs_BL: dict[str, torch.
nl_probes/utils/activation_utils.py:64
↓ 10 callersFunctionget_shared_palette
Get a palette dictionary mapping labels to colors. Useful for functions that expect a palette dict. Args: labels: List of labels
experiments/final_paper_plots/shared_color_mapping.py:100
↓ 9 callersMethod__init__
(self, group, name)
nl_probes/dataset_classes/classification_dataset_manager.py:36
↓ 9 callersMethodflush
(self)
nl_probes/autointerp_detection_eval/caller.py:421
↓ 9 callersFunctionload_openai_caller
(cache_path: str | Path)
nl_probes/autointerp_detection_eval/caller.py:1117
↓ 9 callersFunctionload_taboo_results
Load all JSON files from the directory.
experiments/final_paper_plots/plot_secret_keeping_results.py:141
↓ 8 callersFunction_highlight_mean
(results_by_lora: dict, keyword: str)
experiments/final_paper_plots/plot_secret_keeping_sequence_vs_token.py:47
↓ 8 callersFunction_highlight_mean
(results_by_lora: dict, keyword: str)
experiments/final_paper_plots/plot_combined_sequence_vs_token.py:53
↓ 8 callersFunctionget_colors_for_labels
Get colors for a list of labels, ensuring consistency. Args: labels: List of human-readable labels highlight_color: Optional
experiments/final_paper_plots/shared_color_mapping.py:75
↓ 8 callersMethodload_dataset
( self, split: Literal["train", "test"], )
nl_probes/dataset_classes/act_dataset_manager.py:68
↓ 8 callersFunctionmk_cfg
( custom_params, *, num_train: int, num_test: int, splits: list[str], model_name: str,
nl_probes/sft.py:577
↓ 7 callersMethodadd_assistant
(self, content: str)
nl_probes/autointerp_detection_eval/caller.py:111
↓ 7 callersMethodadd_model_call
( self, messages: ChatHistory, config: InferenceConfig, try_number: int,
nl_probes/autointerp_detection_eval/caller.py:474
↓ 7 callersFunctionlayer_percent_to_layer
Convert a layer percent to a layer number.
nl_probes/utils/common.py:132
↓ 7 callersFunctionrun_evaluation
Run evaluation and save results.
nl_probes/utils/eval.py:100
↓ 6 callersFunction_sentence_text_v2
Reconstruct full sentence text from V2 tokens.
nl_probes/autointerp_detection_eval/eval_detection_v2.py:107
↓ 6 callersFunctioncompute_stats
(values: list[float])
experiments/final_paper_plots/plot_layer_comparison_secret_keeping.py:389
↓ 6 callersMethodget_cache
(self, model: str)
nl_probes/autointerp_detection_eval/caller.py:581
↓ 6 callersFunctionload_sae
( sae_repo_id: str, sae_filename: str, sae_layer: int, model_name: str, device: torch.devi
nl_probes/sae.py:361
↓ 6 callersMethodsave_dataset
(self, data: list[TrainingDataPoint], split: Literal["train", "test"])
nl_probes/dataset_classes/act_dataset_manager.py:87
↓ 6 callersFunctionto_model_type_progression
Map a {lora_name -> score or (score, error)} dict into {model_type -> (score, error)} using LORA_TO_MODEL_TYPE. Only model types in MODEL_TYP
experiments/final_paper_plots/plot_model_progression_line_chart_shapes.py:745
↓ 5 callersMethodadd_user
(self, content: str)
nl_probes/autointerp_detection_eval/caller.py:107
↓ 5 callersFunctioncalculate_confidence_interval
Calculate 95% confidence interval margin for accuracy data.
experiments/final_paper_plots/plot_model_progression_line_chart_shapes.py:724
↓ 5 callersFunctionget_best_of_n_scores
Calculate best-of-N scores for each record, filtered by the best investigator prompt.
experiments/final_paper_plots/plot_secret_keeping_results.py:376
↓ 5 callersMethodget_model_call
( self, messages: ChatHistory, config: InferenceConfig, try_number: int,
nl_probes/autointerp_detection_eval/caller.py:488
↓ 5 callersFunctionload_gender_results
Load all JSON files from the directory.
experiments/final_paper_plots/plot_secret_keeping_results.py:223
↓ 5 callersFunctionmk_cfg
( custom_params, *, num_train: int, num_test: int, splits: list[str], model_name: str,
experiments/explorations/count_training_data.py:25
↓ 5 callersFunctionset_seed
Seed Python, NumPy, and torch for reproducible runs.
nl_probes/utils/common.py:9
↓ 4 callersFunctionaccuracy
(logits: torch.Tensor, y: torch.Tensor)
experiments/linear_probe.py:163
↓ 4 callersFunctioncalculate_confidence_interval
Calculate 95% confidence interval for accuracy data.
experiments/final_paper_plots/plot_gender_eval_results.py:157
↓ 4 callersFunctioncalculate_confidence_interval
Calculate 95% confidence interval for accuracy data.
experiments/final_paper_plots/plot_ssc_results.py:405
↓ 4 callersFunctioncalculate_confidence_interval
Calculate 95% confidence interval for accuracy data.
experiments/final_paper_plots/plot_taboo_eval_results.py:170
↓ 4 callersFunctioncalculate_confidence_interval
Calculate 95% confidence interval for accuracy data.
experiments/plotting/plot_taboo_eval_results.py:146
↓ 4 callersFunctionci95
(values: list[float])
experiments/final_paper_plots/plot_secret_keeping_results.py:461
↓ 4 callersFunctionextract_lr_from_filename
Extract learning rate from filename. Default is 1e-5.
experiments/final_paper_plots/plot_lr_sweep_combined.py:22
↓ 4 callersFunctionload_results_from_folder
Load all JSON results from folder and calculate accuracies keyed by LoRA name. Args: folder_path: Path to folder containing JSON files
experiments/final_paper_plots/plot_personaqa_results_all_models.py:338
↓ 4 callersFunctionparse_answer
Normalize an answer to a simple whitespace-separated, ASCII lowercase form.
experiments/patchscopes/plot_patchscopes_results.py:58
↓ 3 callersFunction_collect_stats
(results_by_lora: dict[str, list[float]], highlight_keyword: str)
experiments/final_paper_plots/plot_secret_keeping_results.py:469
↓ 3 callersFunction_collect_stats
(results_by_lora: dict[str, list[float]], highlight_keyword: str)
experiments/plotting/plot_secret_keeping_results.py:432
↓ 3 callersMethod_get_caller_for_model
(self, model: str)
nl_probes/autointerp_detection_eval/caller.py:917
↓ 3 callersFunction_legend_labels
(names: list[str], label_map: dict[str, str] | None)
experiments/final_paper_plots/plot_secret_keeping_results.py:496
↓ 3 callersFunction_legend_labels
(names: list[str], label_map: dict[str, str] | None)
experiments/plotting/plot_secret_keeping_results.py:456
↓ 3 callersFunction_parse_entry
(entry: Tuple)
experiments/final_paper_plots/plot_agent_adam.py:86
↓ 3 callersFunction_parse_entry
(entry: Tuple)
experiments/final_paper_plots/plot_em_agent_multi_bars.py:86
↓ 3 callersFunction_parse_entry
(entry: Tuple)
experiments/final_paper_plots/plot_em_agent.py:78
↓ 3 callersFunction_plot_results_panel
( ax, names: list[str], labels: list[str], means: list[float], cis: list[float], title
experiments/final_paper_plots/plot_secret_keeping_results.py:515
↓ 3 callersFunction_plot_results_panel
( ax, names: list[str], labels: list[str], means: list[float], cis: list[float], title
experiments/plotting/plot_secret_keeping_results.py:475
↓ 3 callersFunction_plot_selected_with_extras_panel
( ax, selected_name: str, selected_mean: float, selected_ci: float, extras: list[dict],
experiments/final_paper_plots/plot_secret_keeping_results.py:552
↓ 3 callersFunction_plot_selected_with_extras_panel
( ax, selected_name: str, selected_mean: float, selected_ci: float, extras: list[dict],
experiments/plotting/plot_secret_keeping_results.py:511
↓ 3 callersFunctioncalculate_confidence_interval
Calculate 95% confidence interval for accuracy data.
experiments/final_paper_plots/plot_old_personaqa_results.py:146
↓ 3 callersFunctioncalculate_confidence_interval
Calculate 95% confidence interval for accuracy data.
experiments/final_paper_plots/plot_personaqa_results.py:162
↓ 3 callersFunctioncalculate_confidence_interval
Calculate 95% confidence interval for accuracy data.
experiments/final_paper_plots/plot_personaqa_open_ended_results.py:203
↓ 3 callersFunctioncalculate_confidence_interval
Calculate 95% confidence interval for accuracy data.
experiments/plotting/plot_gender_eval_results.py:143
↓ 3 callersMethodcall_with_schema
( self, messages: ChatHistory, schema: type[GenericBaseModel], config: Inferen
nl_probes/autointerp_detection_eval/caller.py:401
↓ 3 callersFunctionconstruct_batch
( training_data: list[TrainingDataPoint], tokenizer: AutoTokenizer, device: torch.device, )
nl_probes/utils/dataset_utils.py:83
↓ 3 callersMethodfrom_sae
( sae: SAEV2, target_feature_test_sentences: int, target_feature_train_sentences: int,
nl_probes/autointerp_detection_eval/eval_detection_v2.py:178
↓ 3 callersMethodget_all_loaders
()
nl_probes/dataset_classes/classification_dataset_manager.py:595
↓ 3 callersFunctionget_classification_datapoints_from_context_qa_examples
( examples: list[classification_dataset_manager.ContextQASample], )
nl_probes/dataset_classes/classification.py:113
↓ 3 callersMethodget_dataset_filename
(self, split: Literal["train", "test"])
nl_probes/dataset_classes/act_dataset_manager.py:99
↓ 3 callersFunctionload_json_schema
(json_path: str)
experiments/final_paper_plots/plot_secret_keeping_results.py:422
↓ 3 callersFunctionload_ssc_results
Load all JSON files from the directory.
experiments/final_paper_plots/plot_secret_keeping_results.py:428
↓ 3 callersFunctionmaterialize_missing_steering_vectors
Materialization of missing steering vectors for a heterogenous batch where different items can request activations from different layers.
nl_probes/utils/dataset_utils.py:159
↓ 3 callersFunctionparse_answer
(answer: str)
nl_probes/utils/eval.py:162
↓ 3 callersFunctionplot_all_models_iid_and_ood
Create separate IID and OOD plots with all three models as subplots. Args: all_results: List of result dictionaries for each model
experiments/final_paper_plots/plot_classification_eval_all_models.py:396
↓ 3 callersFunctionplot_pair
(ax, title: str, stats50: tuple[float, float], stats75: tuple[float, float], show_ylabel: bool)
experiments/final_paper_plots/plot_layer_comparison_secret_keeping.py:394
↓ 3 callersFunctionplot_results
Create a bar chart of average accuracy by investigator LoRA. Args: results_by_lora: Dictionary mapping LoRA paths to accuracy lists
experiments/final_paper_plots/plot_personaqa_results.py:177
↓ 3 callersFunctionplot_results
Create a bar chart of average accuracy by investigator LoRA. Args: results_by_lora: Dictionary mapping LoRA paths to accuracy lists
experiments/final_paper_plots/plot_personaqa_open_ended_results.py:217
↓ 3 callersFunctionprepare_sft_dataset
(dataset: Dataset, tokenizer: AutoTokenizer, final_message_loss_only: bool)
nl_probes/trl_training/taboo_train.py:244
↓ 3 callersFunctionreorder_by_labels
(names, labels, means, cis)
experiments/final_paper_plots/plot_secret_keeping_results.py:626
↓ 3 callersFunctionsentence_to_prompt_text_only
Convert a SentenceInfoV2 object to a prompt containing only the full sentence text.
nl_probes/autointerp_detection_eval/eval_detection_v2.py:156
↓ 3 callersMethodto_openai_content
(self)
nl_probes/autointerp_detection_eval/caller.py:38
↓ 3 callersFunctionwrite_jsonl_file_from_basemodel
(path: Path | str, basemodels: Sequence[BaseModel])
nl_probes/autointerp_detection_eval/caller.py:237
↓ 2 callersFunctionCustomSFTConfig
Factory returning an SFTConfig with repo defaults. Keeping this as a function avoids breaking dataclasses.replace inside TRL.
nl_probes/trl_training/config.py:36
↓ 2 callersMethod__init__
( self, d_in: int, d_sae: int, model_name: str, hook_layer: int,
nl_probes/sae.py:72
↓ 2 callersMethod__init__
(self, dataset_config: DatasetLoaderConfig)
nl_probes/dataset_classes/sae_training_data.py:216
↓ 2 callersFunction_annotate_bars
(ax, bars, means, cis)
experiments/final_paper_plots/plot_secret_keeping_sequence_vs_token.py:129
↓ 2 callersFunction_annotate_bars
(ax, bars, means, cis)
experiments/final_paper_plots/plot_personaqa_sequence_vs_token.py:52
↓ 2 callersFunction_annotate_bars
(ax, bars, means, cis)
experiments/final_paper_plots/plot_combined_sequence_vs_token.py:151
↓ 2 callersFunction_collect_stats
(results_by_lora: dict[str, list[float]], highlight_keyword: str)
experiments/final_paper_plots/plot_qwen3-8b_eval_results.py:192
↓ 2 callersFunction_collect_stats
Collect stats for a model, ordered with highlight first.
experiments/final_paper_plots/plot_classification_eval_all_models.py:273
↓ 2 callersFunction_full_dataset_stats
(model: str, highlight_keyword: str, task_type: str, sequence: bool)
experiments/final_paper_plots/plot_personaqa_sequence_vs_token.py:33
↓ 2 callersFunction_legend_labels
(names: list[str], label_map: dict[str, str] | None)
experiments/final_paper_plots/plot_qwen3-8b_eval_results.py:222
↓ 2 callersFunction_legend_labels
Convert LoRA names to human-readable labels.
experiments/final_paper_plots/plot_classification_eval_all_models.py:252
↓ 2 callersFunction_plot_results_panel
( ax, names: list[str], labels: list[str], means: list[float], cis: list[float], title
experiments/final_paper_plots/plot_qwen3-8b_eval_results.py:241
↓ 2 callersFunction_plot_results_panel
Plot a single panel with bars using shared palette.
experiments/final_paper_plots/plot_classification_eval_all_models.py:360
↓ 2 callersFunction_plot_split
Plot a single split (IID or OOD) mirroring the style of gender plots.
experiments/final_paper_plots/plot_classification_eval.py:211
↓ 2 callersFunction_plot_split
Plot a single split (IID or OOD) mirroring the style of gender plots.
experiments/plotting/plot_classification_eval.py:193
next →1–100 of 716, ranked by callers