MCPcopy Create free account

hub / github.com/TransluceAI/observatory / functions

Functions1,028 in github.com/TransluceAI/observatory

↓ 99 callersFunctioncn
(...inputs: ClassValue[])
project/monitor/web/lib/utils.ts:4
↓ 92 callersMethoditems
Iterate over (key, item) tuples
project/latentqa/latentqa/model_wrapper.py:73
↓ 90 callersFunctiondispatch
(action: Action)
project/monitor/web/hooks/use-toast.ts:136
↓ 77 callersMethodget
Get an item for the given layer and module
project/latentqa/latentqa/model_wrapper.py:53
↓ 56 callersMethodto
( self, device: str | torch.device | None = None, dtype: torch.dtype | None = None )
lib/util/util/activations.py:16
↓ 47 callersMethodadd
Add a batched tensor for the given layer and module
project/latentqa/latentqa/model_wrapper.py:137
↓ 45 callersMethodkeys
Get all layer module keys
project/latentqa/latentqa/model_wrapper.py:69
↓ 37 callersMethodupdate
(self, new_metadata: ExplanationGenerationMetadata)
lib/explanations/explanations/explanations.py:70
↓ 33 callersMethodformat
(self, record: logging.LogRecord)
lib/log_util/log_util/logger.py:57
↓ 25 callersMethod_stringify_field
(self, value: Any)
project/user_modeling/user_modeling/db_wrapper.py:131
↓ 23 callersMethodapply_chat_template
(self, messages: List[ChatMessage], *args: Any, **kwargs: Any)
lib/explanations/explanations/llama_model.py:80
↓ 23 callersMethodget
Get cached completion for a conversation if it exists.
lib/llm_util/llm_util/llm_cache.py:87
↓ 20 callersMethoddecode
(self, token_ids: int | list[int] | torch.Tensor)
lib/util/util/subject.py:217
↓ 17 callersMethodrepeat_interleave
Repeat each element in the activation lists n times before moving to the next element. This is equivalent to the pattern: [p
project/latentqa/latentqa/model_wrapper.py:390
↓ 14 callersMethodget_db
(self)
project/user_modeling/user_modeling/db_wrapper.py:111
↓ 13 callersMethodbatch_size
Get the batch size (validates consistency across all tensors)
project/latentqa/latentqa/model_wrapper.py:158
↓ 13 callersMethodget
Example usage: ```python neurons = db.get( SQLANeuronDescription, filter=and_(SQLANeuron.layer == 5,
lib/neurondb/neurondb/postgres.py:99
↓ 12 callersFunctionaddLinterMessage
(state, action: PayloadAction<LinterMessage>)
project/monitor/web/app/store/slices/aiLinterSlice.ts:97
↓ 11 callersFunctionpad_sequence
Pad a list of sequences to the same length and return input_ids and attention_mask tensors. If `max_length` is provided, AND if the `max_len
project/user_modeling/user_modeling/padding_util.py:4
↓ 11 callersMethodset
Cache a completion for a conversation.
lib/llm_util/llm_util/llm_cache.py:122
↓ 11 callersFunctionsetSelectedTokenRange
(state, action: PayloadAction<[number, number] | undefined>)
project/monitor/web/app/store/slices/neuronsSlice.ts:67
↓ 10 callersMethod_build_where_clause
Construct a ``WHERE`` clause (plus its bound parameters) from the given ``conditions`` mapping. - scalar → equality check (``col = ?
project/user_modeling/user_modeling/db_wrapper.py:157
↓ 10 callersFunctiontoast
({ ...props }: Toast)
project/monitor/web/hooks/use-toast.ts:145
↓ 9 callersMethodfilter
(self)
lib/neurondb/neurondb/view.py:113
↓ 9 callersFunctionget_dataloader
( data: list[LQAData] | list[MinimalDatapoint], hf_model_id: str, tokenizer: PreTrainedTokenizer,
project/latentqa/latentqa/train_util.py:312
↓ 9 callersMethodget_modules
(self, keys: Sequence[LayerModuleKey])
project/latentqa/latentqa/model_wrapper.py:458
↓ 8 callersMethodconcat
Concatenate multiple ActivationsList into a single ActivationsList
project/latentqa/latentqa/model_wrapper.py:290
↓ 8 callersFunctionget_logger
Get a colored logger for the specified namespace. Args: namespace: The namespace for the logger Returns: A configured l
lib/log_util/log_util/logger.py:117
↓ 8 callersFunctionrenderStatsCard
(title: string, value: number, total: number)
project/monitor/web/app/dashboard/status/page.tsx:43
↓ 8 callersMethodtokenize
(self, text: str)
lib/util/util/subject.py:203
↓ 8 callersFunctionuseDebounce
(value: T, delay: number)
project/monitor/web/hooks/use-debounce.ts:3
↓ 7 callersFunction_make_neuron
(l: int, n: int, p: NeuronPolarity | None, t: int | None)
lib/neurondb/neurondb/view.py:578
↓ 7 callersFunctionget_llm_completion_strs_async
( messages_list: list[list[dict[str, Any]]], config: DataGeneratorConfig, use_cache: bool = False,
project/user_modeling/user_modeling/llm_util.py:30
↓ 7 callersMethodget_time_str
(self)
project/user_modeling/user_modeling/db_wrapper.py:187
↓ 6 callersFunctioncomplete_async
Single-call convenience wrapper around ``get_llm_completions_async``. Returns a single ``LLMOutput`` instead of a list.
lib/llm_util/llm_util/prod_llms.py:397
↓ 6 callersMethodconvert_row_to_obj
(self, row: list[Any])
project/user_modeling/user_modeling/db_wrapper.py:199
↓ 6 callersMethodforward
(self, batch: Dict[str, torch.Tensor])
lib/explanations/explanations/llama_model.py:133
↓ 6 callersMethodforward_with_intervention
( self, activations: Union[Activations, ActivationsList], token_range_from: list[tuple
project/latentqa/latentqa/model_wrapper.py:583
↓ 6 callersFunctionget_llm_completions_async
( messages_list: list[list[ChatMessage]], model_category: str, max_new_tokens: int = 32, tempe
lib/util/util/prod_llms.py:122
↓ 6 callersMethodget_neuron_scored_explanations
Loads NeuronExplanations for given neuron if it exists.
lib/explanations/explanations/explanations_wrapper.py:416
↓ 6 callersMethodget_sync_db
(self)
project/user_modeling/user_modeling/db_wrapper.py:119
↓ 6 callersMethodinsert_batch
Insert a batch of model instances. All rows share the same ``batch_time``. ``batch_time`` defaults to current UTC ISO timestamp.
project/user_modeling/user_modeling/db_wrapper.py:282
↓ 6 callersMethoditerrows
Asynchronously iterate over rows that satisfy ``conditions``, yielding Pydantic objects one-by-one.
project/user_modeling/user_modeling/db_wrapper.py:375
↓ 6 callersFunctionload_lqa_data
(data_path: str | os.PathLike, cls: Type[LQAData] = LQAData)
project/latentqa/latentqa/lqa_data.py:529
↓ 6 callersFunctionparse_chat_message
(message_data: dict[str, Any])
lib/llm_util/llm_util/types.py:196
↓ 6 callersFunctionsetSteeringDialogSpec
(state, action: PayloadAction<SteeringSpec | null | undefined>)
project/monitor/web/app/store/slices/uiStateSlice.ts:57
↓ 6 callersMethodsync_iterrows
(self, **conditions: Any)
project/user_modeling/user_modeling/db_wrapper.py:359
↓ 5 callersMethod_get_connection
(self)
lib/llm_util/llm_util/llm_cache.py:40
↓ 5 callersFunction_parse_message_content
( content: str | list[Content], )
lib/llm_util/llm_util/openai.py:64
↓ 5 callersMethodapply
(text: str, color: ColorCode)
lib/log_util/log_util/logger.py:31
↓ 5 callersFunctioncompute_exemplars_for_layer
( exemplars_wrapper: ExemplarsWrapper, layer: int, split: ExemplarSplit, save_every: int = 100
lib/activations/activations/exemplars_computation.py:141
↓ 5 callersFunctionfinalize_llm_output_partial
(partial: LLMOutputPartial)
lib/llm_util/llm_util/types.py:366
↓ 5 callersMethodfrom_disk
(cls, db_dir: str, read_only: bool = True)
project/user_modeling/user_modeling/synthsys/faithfulness_eval.py:227
↓ 5 callersFunctiongenerate_mc_qas_for_attr
Used for experiments for blog post.
project/latentqa/scripts/prepare_lqa_datasets.py:36
↓ 5 callersMethodget_layer_data
Loads exemplar data for a layer.
lib/activations/activations/exemplars_wrapper.py:687
↓ 5 callersMethodget_layer_dir
(self, layer: int, split: ExemplarSplit)
lib/activations/activations/exemplars_wrapper.py:408
↓ 5 callersMethodget_neuron_exemplars
Returns NeuronExemplars for a neuron, given a split.
lib/activations/activations/exemplars_wrapper.py:760
↓ 5 callersFunctionget_num_patch_tokens_multiplier
Support for a single write layer to read from multiple read layers ("flattening").
project/latentqa/latentqa/train_util.py:294
↓ 5 callersMethodget_read_layer_module_keys
(self)
project/latentqa/latentqa/train_util.py:266
↓ 5 callersFunctionget_subject_config
(hf_model_id: str)
lib/util/util/subject.py:686
↓ 5 callersFunctionsetSelectedAttributionToken
(state, action: PayloadAction<number | undefined>)
project/monitor/web/app/store/slices/neuronsSlice.ts:76
↓ 5 callersMethodshare_memory_
(self)
lib/util/util/activations.py:52
↓ 5 callersMethodsync_iterrows_raw
(self, **conditions: Any)
project/user_modeling/user_modeling/db_wrapper.py:367
↓ 4 callersFunction_ct
(x: Any)
lib/util/util/subject.py:20
↓ 4 callersMethod_validate_chat
Checks that: - Role/content formatting is correct - Chat starts with system or user - Chat alternates between system/
lib/util/util/chat_input.py:171
↓ 4 callersMethodcompute_cost
All costs are in dollars per million tokens.
lib/llm_util/llm_util/types.py:297
↓ 4 callersMethodcompute_lr
(self, step: int)
project/latentqa/latentqa/train_util.py:67
↓ 4 callersFunctionconstruct_mc_options_for_eval
Construct multiple choice options for evaluation data. Uses uppercase letters (A, B, C, ...) as labels with period delimiter (e.g., "A. Opti
project/latentqa/latentqa/mc_util.py:150
↓ 4 callersFunctionformat_example
Assumes activations are normalized and discretized to the range [0, 10].
lib/explanations/explanations/few_shot_examples.py:28
↓ 4 callersMethodgenerate
Generate text using the model with optional neuron and hidden state interventions.
lib/util/util/subject.py:327
↓ 4 callersFunctionget_decoder_model
( hf_model_id: str, tokenizer: PreTrainedTokenizer, use_peft: bool, use_fsdp: bool, device
project/latentqa/latentqa/train_util.py:469
↓ 4 callersMethodget_layer_mapping
(self)
project/latentqa/latentqa/train_util.py:278
↓ 4 callersMethodget_preferred_score
This method may return None in cases where the score is undefined, for example if the normalized activations were all zero, yielding
lib/explanations/explanations/explanations.py:134
↓ 4 callersFunctionget_subject_model
( hf_model_id: str, use_fsdp: bool, device: str, inference_only: bool = False, fsdp_config
project/latentqa/latentqa/train_util.py:439
↓ 4 callersFunctionget_tokenizer
(hf_model_id: str, new_tokens: list[str] | None = None)
project/latentqa/latentqa/train_util.py:302
↓ 4 callersFunctionget_total_loss_over_dataset
( parameters: Activations, dataloader, propagate_grad=True, )
project/latentqa/latentqa/eval/steering_eval.py:73
↓ 4 callersMethodget_write_layer_module_keys
(self)
project/latentqa/latentqa/train_util.py:272
↓ 4 callersFunctionhandleChatSubmit
(message: string | null = inputValue)
project/monitor/web/app/dashboard/chat/components/ChatArea.tsx:271
↓ 4 callersFunctionload_checkpoint_eval_results
Load reading eval results from a jsonl file. If there are any duplicate results for the same data_id, keep the latest result.
project/latentqa/latentqa/eval/reading_eval.py:404
↓ 4 callersFunctionresolve_attr
s is the output of calling str(UserAttribute)
project/user_modeling/user_modeling/user_attribute.py:2271
↓ 4 callersFunctionrun_belief_evaluation
Run belief evaluation on a subject model and save results to a database. Instantiates the appropriate evaluator based on the eval type (gene
project/user_modeling/user_modeling/belief_eval.py:1119
↓ 4 callersMethodsave_config
(self)
project/latentqa/latentqa/config_util.py:28
↓ 4 callersFunctionsetDescriptionKeywordFilter
(state, action: PayloadAction<string | undefined>)
project/monitor/web/app/store/slices/neuronsSlice.ts:85
↓ 4 callersFunctionsetGlobalNeuronFilter
(state, action: PayloadAction<NeuronFilter | undefined>)
project/monitor/web/app/store/slices/neuronsSlice.ts:61
↓ 4 callersFunctionsetSelectedClusterId
(state, action: PayloadAction<string | undefined>)
project/monitor/web/app/store/slices/aiLinterSlice.ts:85
↓ 4 callersFunctionsetTableHighlightedNeuronIds
(state, action: PayloadAction<string[] | undefined>)
project/monitor/web/app/store/slices/neuronsSlice.ts:88
↓ 4 callersMethodset_filter
Set and apply a new filter. You may presume that the neuron mask is always fresh, since it's updated when the filter is set.
lib/neurondb/neurondb/view.py:240
↓ 4 callersMethodtokenize
(self, subject: "Subject")
lib/util/util/chat_input.py:47
↓ 3 callersMethod__init__
(self, **kwargs: Any)
lib/neurondb/neurondb/schemas/tables.py:45
↓ 3 callersMethod_create_key
Create a deterministic hash key from messages and model.
lib/llm_util/llm_util/llm_cache.py:47
↓ 3 callersFunction_pad_and_truncate
(l: list[int], pad_int: int)
lib/util/util/dataset.py:47
↓ 3 callersMethodadd_messages
(self, messages: list[ChatMessage])
lib/util/util/chat_input.py:249
↓ 3 callersMethodapply_lr_to_optimizer
(self, lr: float)
project/latentqa/latentqa/train_util.py:79
↓ 3 callersMethoddecode
(self, *args: Any, **kwargs: Any)
lib/explanations/explanations/llama_model.py:97
↓ 3 callersFunctionformat_activation_records_for_one_act_sign
( act_recs: List[ActivationRecord], act_thresh: float, sign: ActivationSign )
lib/explanations/explanations/explanation_utils.py:110
↓ 3 callersMethodget_activation_records
( self, rng: random.Random, normalize: bool = False, include_ranks: bool = Fal
lib/explanations/explanations/explanation_utils.py:199
↓ 3 callersFunctionget_activations_computing_func
Returns a function that computes activations for a given input: input_ids: torch.Tensor attn_mask: torch.Tensor
lib/activations/activations/activations_computation.py:7
↓ 3 callersMethodget_all_unique_keys
(self, **conditions: Any)
project/user_modeling/user_modeling/synthsys/faithfulness_eval.py:440
↓ 3 callersMethodget_datasets
Returns a list of PyTorch Datasets one for each HuggingFace dataset.
lib/activations/activations/exemplars_wrapper.py:576
↓ 3 callersFunctionget_generators
( dataloader: DataLoader[Any], )
lib/activations/activations/exemplars_computation.py:131
next →1–100 of 1,028, ranked by callers