MCPcopy Create free account

hub / github.com/TransluceAI/observatory / functions

Functions1,028 in github.com/TransluceAI/observatory

↓ 2 callersFunctionjudge_belief_from_completions
The actual logic for judging belief using LLM judge. Args: subject_inputs: List of SubjectInputForLLMJudge objects. completi
project/user_modeling/user_modeling/belief_eval.py:143
↓ 2 callersFunctionlimited_task
(messages: list[ChatMessage])
lib/util/util/openai.py:84
↓ 2 callersMethodload_layer_checkpoint
(self, layer: int, split: ExemplarSplit)
lib/activations/activations/exemplars_wrapper.py:414
↓ 2 callersFunctionload_steering_eval_result
( results_path: Path | str, steering_type: Literal["gradient", "circuit"], )
project/latentqa/latentqa/eval/load_results.py:66
↓ 2 callersFunctionparse_completion_for_numbered_list
Parse numbered list from LLM completion text that follows a specific format. The text should contain sections marked with `start_marker` and
project/user_modeling/user_modeling/self_describe.py:87
↓ 2 callersFunctionparse_prompt
Finds all locations of "unknown" in the prompt. The prompt format is generally like this: token<tab>unknown unknown_tokens is a hack for
lib/explanations/explanations/simulation_utils.py:274
↓ 2 callersFunctionparse_seed_from_exp_name
Returns (exp_name_without_seed, seed). Defaults to seed=64.
project/latentqa/latentqa/eval/load_results.py:58
↓ 2 callersFunctionprepare_input_for_subject
( conversation: list[dict], conversation_read_range: tuple[int, int], tokenizer: PreTrainedTokeniz
project/latentqa/latentqa/data_util.py:160
↓ 2 callersFunctionprocess_activations_for_batch
Process activations for a batch, handling both pre-computed and subject activations. Context: pre-computed activations can be part of the da
project/latentqa/latentqa/train_util.py:580
↓ 2 callersMethodresults_path
(self, eval_type: Literal["reading", "control"])
project/latentqa/latentqa/eval/circuit_based_steering_eval.py:164
↓ 2 callersMethodresults_path
(self, eval_type: Literal["reading", "control"])
project/latentqa/latentqa/eval/steering_eval.py:780
↓ 2 callersMethodreturn_match
(self, obj: T, return_raw: bool = False)
project/user_modeling/user_modeling/db_wrapper.py:204
↓ 2 callersFunctionsave
(curr_step: int, num_tokens_seen_so_far: int)
lib/activations/activations/exemplars_computation.py:221
↓ 2 callersFunctionsave_decoder_and_optimizer_checkpoint
( decoder: BaseModelWithGenerate | PeftModel | DDP | FSDP, base_checkpoint_path: str, dir_name: st
project/latentqa/latentqa/train_util.py:531
↓ 2 callersMethodsave_layer_checkpoint
( self, layer: int, split: ExemplarSplit, seq_acts: Dict[ExemplarType, NDFloat
lib/activations/activations/exemplars_wrapper.py:477
↓ 2 callersFunctionscrollToClusterRow
()
project/monitor/web/app/dashboard/chat/components/datatable.tsx:139
↓ 2 callersMethodsend_message
Sends messages using the ChatConversation. Handles interventions and updates activations after each token.
lib/neurondb/neurondb/view.py:125
↓ 2 callersFunctionsetChatTokens
(state, action: PayloadAction<ChatToken[] | undefined>)
project/monitor/web/app/store/slices/chatSlice.ts:33
↓ 2 callersFunctionsetMousedOverTokenIndex
(state, action: PayloadAction<number | undefined>)
project/monitor/web/app/store/slices/neuronsSlice.ts:73
↓ 2 callersFunctionsetShowChatArea
(state, action: PayloadAction<boolean>)
project/monitor/web/app/store/slices/uiStateSlice.ts:48
↓ 2 callersFunctionsetShowNeuronsFrom
(state, action: PayloadAction<'attribution' | 'activation'>)
project/monitor/web/app/store/slices/neuronsSlice.ts:79
↓ 2 callersFunctionsetShowNeuronsPanel
(state, action: PayloadAction<boolean>)
project/monitor/web/app/store/slices/uiStateSlice.ts:51
↓ 2 callersFunctionsetShowSteeringPanel
(state, action: PayloadAction<boolean>)
project/monitor/web/app/store/slices/uiStateSlice.ts:54
↓ 2 callersFunctionsetSteeringSpec
(state, action: PayloadAction<{ id: string; spec: SteeringSpec }>)
project/monitor/web/app/store/slices/steeringSlice.ts:36
↓ 2 callersMethodset_batch
Cache a batch of completions.
lib/llm_util/llm_util/llm_cache.py:156
↓ 2 callersMethodsetup
( model_path: str, hf_model_id: str, model_parallel_size: int, compile: bool =
lib/explanations/explanations/simulation_utils.py:513
↓ 2 callersFunctionsimulate_and_score
( split_exemplars: SplitExemplars, explanations: List[NeuronExplanation], exemplar_type: ExemplarT
lib/explanations/explanations/explanations.py:375
↓ 2 callersMethodto_activations_list
Convert batched activations to list of individual activations
project/latentqa/latentqa/model_wrapper.py:167
↓ 2 callersFunctiontokenize_subject_input
( tokenizer: PreTrainedTokenizer, chat_template: str, system_prompt: str | None, user_prompt:
project/latentqa/latentqa/data_util.py:224
↓ 2 callersFunctionupdate_top_acts_and_starts
( acts: torch.Tensor, # (batch_size, seq_len, num_neurons) input_ids: torch.Tensor, # (batch_size, s
lib/activations/activations/exemplars_computation.py:59
↓ 2 callersFunctionwrap_fsdp
( model: BaseModelWithGenerate | PeftModel, hf_model_id: str, fsdp_config: FSDPConfig )
project/latentqa/latentqa/train_util.py:401
↓ 1 callersMethod__add__
Add two Usage objects together, combining their token counts.
lib/llm_util/llm_util/types.py:270
↓ 1 callersMethod__init__
(self, generation_config: DataGeneratorConfig)
project/user_modeling/user_modeling/synthsys/system_prompts.py:69
↓ 1 callersMethod__init__
( self, generation_config: DataGeneratorConfig, validation_config: DataGeneratorConfig
project/user_modeling/user_modeling/synthsys/user_prompts.py:287
↓ 1 callersMethod__init__
(self, engine: Engine)
lib/neurondb/neurondb/postgres.py:74
↓ 1 callersMethod__new__
(cls, engine: Engine)
lib/neurondb/neurondb/postgres.py:35
↓ 1 callersMethod__repr__
(self)
lib/neurondb/neurondb/schemas/base.py:8
↓ 1 callersMethod_and_ids
AND over all neurons in l1 and l2 in O(N). This is complex since the neurons may have `None` tokens or `None` polarity, which are cat
lib/neurondb/neurondb/view.py:469
↓ 1 callersMethod_convert_serialized_obj_to_obj
(self, obj_dict: dict[str, Any])
project/user_modeling/user_modeling/db_wrapper.py:146
↓ 1 callersFunction_ensure_copy
Copy the DB file (and configs dir) from *old_db_dir* → *new_db_dir*. Returns the **path** to the copied DB file.
project/user_modeling/scripts/alter_schema.py:33
↓ 1 callersFunction_extract_usage_tokens
Extract token counts from OpenAI-style usage payloads.
lib/llm_util/llm_util/openai.py:541
↓ 1 callersFunction_get_client
Create a provider client with an optional explicit API key.
lib/llm_util/llm_util/prod_llms.py:88
↓ 1 callersMethod_get_filtered_ids
Recursively applies a filter to a list of neurons. If neurons is None, that means all neurons are in the set.
lib/neurondb/neurondb/view.py:397
↓ 1 callersMethod_get_general_generation_prompt
Get the generation prompt for a general question type
project/latentqa/latentqa/qas.py:139
↓ 1 callersMethod_get_generation_prompt
Get the generation prompt for a given attribute class
project/user_modeling/user_modeling/synthsys/system_prompts.py:72
↓ 1 callersMethod_get_generation_prompt
Get the generation prompt for a given attribute class
project/user_modeling/user_modeling/synthsys/user_prompts.py:307
↓ 1 callersMethod_get_iterator
Creates appropriate iterator for dataset type.
lib/activations/activations/dataset.py:249
↓ 1 callersMethod_get_neurons_metadata_general
( self, neurons: list[Neuron] )
lib/neurondb/neurondb/view.py:341
↓ 1 callersMethod_get_neurons_metadata_run
Here's how we get run metadata: - All activations are returned for each (layer, neuron, token) - The current filter may have
lib/neurondb/neurondb/view.py:301
↓ 1 callersFunction_get_openai_embeddings_async_one_batch
( client: AsyncOpenAI, texts_batch: list[str], model_name: str, dimensions: int | None )
lib/util/util/openai.py:144
↓ 1 callersFunction_get_openai_embeddings_async_one_batch
( client: AsyncOpenAI, texts_batch: list[str], model_name: str, dimensions: int | None )
lib/llm_util/llm_util/openai.py:426
↓ 1 callersFunction_get_tool_call
(i: int, j: int)
lib/llm_util/llm_util/openai.py:275
↓ 1 callersFunction_get_tool_calls
(i: int)
lib/llm_util/llm_util/openai.py:269
↓ 1 callersMethod_get_validation_prompt
Get the validation prompt for a given attribute class
project/user_modeling/user_modeling/synthsys/user_prompts.py:315
↓ 1 callersMethod_init_db
(self)
lib/llm_util/llm_util/llm_cache.py:26
↓ 1 callersFunction_load_eval_results
( data_dir: Path, names: list[str], exps_to_load: dict[str, list[str]] )
project/latentqa/latentqa/blogpost.py:195
↓ 1 callersMethod_open_db
Open an async connection (read-only if requested).
project/user_modeling/user_modeling/db_wrapper.py:60
↓ 1 callersMethod_or_ids
OR over all neurons in l1 and l2 in O(N). This is complex since the neurons may have `None` tokens, which is a catch-all. TO
lib/neurondb/neurondb/view.py:524
↓ 1 callersFunction_parallelize_calls
( single_output_getter: Any, streaming_callback: AsyncStreamingCallback | None, completion_callbac
lib/llm_util/llm_util/prod_llms.py:105
↓ 1 callersMethod_parse_generation_response
Parse the LLM's generation response into SystemPrompt objects
project/user_modeling/user_modeling/synthsys/system_prompts.py:80
↓ 1 callersMethod_parse_generation_response
Parse the LLM's generation response into AttributePrompt objects
project/user_modeling/user_modeling/synthsys/user_prompts.py:323
↓ 1 callersFunction_parse_openai_tool_call
(tc: ChatCompletionMessageToolCall)
lib/llm_util/llm_util/openai.py:523
↓ 1 callersFunction_parse_tool_call
(tc_partial: ToolCallPartial)
lib/llm_util/llm_util/types.py:367
↓ 1 callersMethod_parse_validation_response
Parse the LLM's validation response
project/user_modeling/user_modeling/synthsys/user_prompts.py:370
↓ 1 callersFunction_process_eval_results
(data_dir: Path, names: list[str], overwrite: bool = False)
project/latentqa/latentqa/blogpost.py:176
↓ 1 callersFunction_resolve_api_key
Get the API key for a provider from explicit keys or environment.
lib/llm_util/llm_util/prod_llms.py:69
↓ 1 callersMethod_rotate_keys_and_swap_provider
Rotate to the next API key for the current provider. If all keys for the current provider are exhausted, move to the next provider.
lib/util/util/prod_llms.py:91
↓ 1 callersFunction_set_finish_reason
(i: int, finish_reason: FinishReasonType | None)
lib/llm_util/llm_util/openai.py:264
↓ 1 callersFunction_set_text
(i: int, text: str)
lib/llm_util/llm_util/openai.py:253
↓ 1 callersFunction_set_tool_call
(i: int, j: int, tool_call: ToolCallPartial)
lib/llm_util/llm_util/openai.py:285
↓ 1 callersMethod_sync_init_schema
Synchronously create the table and indices if they don't exist. Called from __init__ for non-read-only instances.
project/user_modeling/user_modeling/db_wrapper.py:73
↓ 1 callersMethod_update_activations
(self)
lib/neurondb/neurondb/view.py:151
↓ 1 callersFunctionabsolute_dev_explained_score_from_sequences
( real_activations: List[float] | NDFloatArray, predicted_activations: List[float] | NDFloatArray, )
lib/explanations/explanations/scoring_utils.py:112
↓ 1 callersMethodadd
Add a list of tensors for the given layer and module
project/latentqa/latentqa/model_wrapper.py:213
↓ 1 callersFunctionaddSteeringSpec
(state, action: PayloadAction<SteeringSpec>)
project/monitor/web/app/store/slices/steeringSlice.ts:19
↓ 1 callersFunctionadd_missing_columns
Issue ``ALTER TABLE`` statements for any *missing* columns. The set of desired columns (and their SQLite types) is taken from the subclass' `
project/user_modeling/scripts/alter_schema.py:64
↓ 1 callersFunctionaggregate_and_add_train_eval_results
Aggregate eval results saved during training and combine with standalone evaluation results. During distributed training, each rank saves ev
project/latentqa/latentqa/eval/reading_eval.py:418
↓ 1 callersMethodall_negative
(self)
lib/activations/activations/activations.py:22
↓ 1 callersMethodall_positive
(self)
lib/activations/activations/activations.py:16
↓ 1 callersMethodany_negative
(self)
lib/activations/activations/activations.py:25
↓ 1 callersMethodany_positive
(self)
lib/activations/activations/activations.py:19
↓ 1 callersMethodattr_class
(self)
project/latentqa/latentqa/eval/steering_util.py:71
↓ 1 callersFunctionbuild_subject_inputs_with_baselines
Build SubjectInput objects with eval and baseline results bundled together. For each key, queries both eval_db and baseline_db, computes faithful
project/user_modeling/user_modeling/synthsys/subject_inputs.py:226
↓ 1 callersFunctioncalculate_min_activation
(activation_records: Sequence[ActivationRecord])
lib/activations/activations/activations.py:33
↓ 1 callersFunctioncalibrate_simulation
( uncalibrated_simulation: SequenceSimulation, regression_model: linear_model.LinearRegression )
lib/explanations/explanations/scoring_utils.py:133
↓ 1 callersMethodcheck_if_prompt_and_completion_exists
( self, attr_class: Type[UserAttribute], attr: UserAttribute | None, system_pr
project/user_modeling/user_modeling/synthsys/faithfulness_eval.py:411
↓ 1 callersMethodclear_neuron_interventions
(self)
lib/neurondb/neurondb/view.py:119
↓ 1 callersFunctioncluster_neurons
Cluster a list of neurons. These should already be filtered to interesting neurons. Neurons will be automatically deduplicated.
lib/investigator/investigator/clustering.py:110
↓ 1 callersFunctionconstruct_dataset
:param samples: List of tuples containing a prompt and a completion :param shift_labels: Okay hear me out, this is stupid. By default
lib/util/util/dataset.py:17
↓ 1 callersFunctionconstruct_llm_judge_prompt
( subject_input: SubjectInputForLLMJudge, completion: str, num_permutations: int, max_num_choi
project/user_modeling/user_modeling/belief_eval.py:84
↓ 1 callersFunctionconvert_full_lqa_data_to_lqa_data
( d: FullLQAData, id: Any, rng: np.random.Generator | None = None )
project/latentqa/latentqa/lqa_data.py:436
↓ 1 callersFunctionconvert_to_byte_array
(s: str)
lib/explanations/explanations/simulation_utils.py:185
↓ 1 callersFunctioncorrelation_score
( real_activations: List[float] | NDFloatArray, predicted_activations: List[float] | NDFloatArray, )
lib/explanations/explanations/scoring_utils.py:98
↓ 1 callersFunctioncreate_mc_qa
(stem: str, answer: str, distractors: list[str], rng: np.random.Generator)
project/latentqa/latentqa/eval/steering_qas.py:509
↓ 1 callersFunctioncreate_prism_gender_dataset
( save_dir: str | Path, subject_client_url: str, )
project/user_modeling/user_modeling/prism.py:140
↓ 1 callersFunctioncreate_self_describe_dataset
( stereotypes_path: str, subject_hf_model_id: str, save_dir: str | Path, subject_client_url: s
project/user_modeling/user_modeling/self_describe.py:274
↓ 1 callersFunctioncreate_synthsys_dataset
(db_dir: str, save_path: str, eps: float = 0.01)
project/user_modeling/user_modeling/synthsys/subject_inputs.py:389
↓ 1 callersMethoddict
(self)
lib/neurondb/neurondb/schemas/base.py:5
↓ 1 callersFunctiondismiss
()
project/monitor/web/hooks/use-toast.ts:153
↓ 1 callersFunctiondo_circuit_based_steering_eval
( config: CircuitBasedSteeringEvalConfig, subject: PreTrainedModel | None = None, decoder: PeftMod
project/latentqa/latentqa/eval/circuit_based_steering_eval.py:523
← previousnext →201–300 of 1,028, ranked by callers