MCPcopy Create free account

hub / github.com/FastMAS/KVCOMM / functions

Functions446 in github.com/FastMAS/KVCOMM

↓ 95 callersMethodget
Retrieve a concrete `LLM` instance by name and provider hints. Args: model_name: Provider/model identifier; defaults to a general
KVCOMM/llm/llm_registry.py:21
↓ 67 callersMethodsetdefault
(self, key: str, default: Any = None)
KVCOMM/llm/kvcomm_engine.py:599
↓ 66 callersMethodget
(cls, name: str, *args, **kwargs)
KVCOMM/agents/agent_registry.py:19
↓ 60 callersMethoditems
(self)
KVCOMM/llm/kvcomm_engine.py:585
↓ 53 callersMethodsplit
(self)
datasets/mmlu_dataset.py:48
↓ 32 callersMethodjoin
(self, timeout=None)
KVCOMM/tools/coding/executor_utils.py:27
↓ 29 callersMethodkeys
(cls)
KVCOMM/llm/llm_registry.py:17
↓ 21 callersMethodvalues
(self)
KVCOMM/llm/kvcomm_engine.py:589
↓ 14 callersMethodget
(self)
experiments/accuracy.py:13
↓ 13 callersFunction_escape_loguru_markup
Escape Loguru markup tokens in free-form text.
KVCOMM/llm/gpt_chat.py:44
↓ 13 callersMethodpop
(self, key: str, default: Any = _MISSING)
KVCOMM/llm/kvcomm_engine.py:615
↓ 11 callersFunction_set_seen_tokens
(cache: DynamicCache, length: int)
KVCOMM/llm/kvcomm_engine.py:190
↓ 11 callersMethodexecute
Synchronous execution wrapper that normalizes outputs to a list.
KVCOMM/graph/node.py:154
↓ 10 callersMethod_ensure_agent_memory
Return the shared memory slot for a given agent id.
KVCOMM/llm/gpt_chat.py:541
↓ 10 callersFunction_get_layer_count
Return number of transformer layers tracked in the cache.
KVCOMM/llm/kvcomm_engine.py:32
↓ 10 callersFunctionconcat_
In-place concatenation of the token inputs from another TokenInput along the time dimension.
KVCOMM/llm/token_ops.py:76
↓ 10 callersMethodrun
Execute nodes topologically for `num_rounds` and return final answers.
KVCOMM/graph/graph.py:213
↓ 9 callersFunction_get_layer_kv
Return key/value tensors (or None) for a given layer index.
KVCOMM/llm/kvcomm_engine.py:39
↓ 9 callersFunction_is_layered_cache
Return True if the cache uses the newer `layers` structure.
KVCOMM/llm/kvcomm_engine.py:27
↓ 8 callersMethodfrom_env
Create a config from environment variables with safe defaults.
KVCOMM/llm/config.py:25
↓ 8 callersMethodget
(self, key: str, default: Any = None)
KVCOMM/llm/kvcomm_engine.py:593
↓ 7 callersMethodcommit
(self)
KVCOMM/llm/kvcomm_engine.py:636
↓ 7 callersFunctionexecute_code_get_return
在子进程执行 code,超过 timeout 秒直接终止,并返回 answer 变量(或错误信息)。
KVCOMM/tools/coding/python_executor.py:43
↓ 7 callersMethodgen
Synchronously generate a completion. Args: messages: Conversation history to condition the model. max_tokens: Maximum
KVCOMM/llm/llm.py:43
↓ 7 callersMethodresolve_request_state
Public alias to access or create the request-scoped state.
KVCOMM/llm/kvcomm_engine.py:761
↓ 7 callersMethodset_id
Bind the chat instance to a graph node id and role.
KVCOMM/llm/gpt_chat.py:886
↓ 6 callersFunction_clone_tensor_or_empty
(tensor: Optional[torch.Tensor])
KVCOMM/llm/kvcomm_engine.py:173
↓ 6 callersFunction_layer_is_empty
(tensor: Optional[torch.Tensor])
KVCOMM/llm/kvcomm_engine.py:123
↓ 6 callersFunction_stack_cache_tensors
Return stacked key/value tensors when all layers are dense tensors.
KVCOMM/llm/kvcomm_engine.py:77
↓ 6 callersMethod_stack_cache_tensors
(cache: DynamicCache)
KVCOMM/llm/kvcomm_engine.py:698
↓ 6 callersMethodagen
Asynchronously generate a completion. Args: messages: Conversation history to condition the model. max_tokens: Maximu
KVCOMM/llm/llm.py:24
↓ 6 callersMethodasync_execute
Execute a node asynchronously with optional KV cache handling modes.
KVCOMM/graph/node.py:167
↓ 6 callersMethodfinalize_request
(cls, request_uid: str)
KVCOMM/llm/gpt_chat.py:534
↓ 6 callersMethodgenerate_for_agent
Generate a response using the requested strategy with sensible fallbacks.
KVCOMM/llm/gpt_chat.py:823
↓ 6 callersMethodget_decision_few_shot
TODO
KVCOMM/prompt/prompt_set.py:75
↓ 6 callersMethodhas_prefix_initialized
Check if prefix KV has been initialized for an agent.
KVCOMM/llm/gpt_chat.py:553
↓ 6 callersMethodprepare_prefix_kv_segments
Materialize and store prefix KV segments and placeholder indices. The rendered prompt is tokenized and executed once to obtain the KV
KVCOMM/llm/gpt_chat.py:895
↓ 6 callersMethodupdate_input_anchor
Ensure the user input placeholder cache is ready and choose a strategy.
KVCOMM/llm/gpt_chat.py:677
↓ 5 callersFunction_copy_cache
(cache: DynamicCache)
KVCOMM/llm/kvcomm_engine.py:197
↓ 5 callersMethod_log_warning
(self, message: str)
KVCOMM/llm/kvcomm_engine.py:694
↓ 5 callersMethod_map_in_pool
(self, fn, iterable, timeout=None)
KVCOMM/llm/gpt_chat.py:872
↓ 5 callersFunction_safe_seq_len
Best-effort sequence length from cache (APIs vary across transformers).
KVCOMM/llm/kvcomm_engine.py:155
↓ 5 callersFunctionconfigure_logging
Configure the logging settings for the application. Args: print_level (str): The logging level for console output. logfile_l
KVCOMM/utils/log.py:8
↓ 5 callersMethodupdate_condition_anchor
Materialise condition KV cache for another agent and update anchors.
KVCOMM/llm/gpt_chat.py:567
↓ 4 callersFunction_assign_stack_to_cache
Overwrite cache layers with stacked tensors maintaining per-layer metadata.
KVCOMM/llm/kvcomm_engine.py:100
↓ 4 callersFunction_empty_like_tensor
(tensor: Optional[torch.Tensor])
KVCOMM/llm/kvcomm_engine.py:179
↓ 4 callersFunction_set_layer_kv
Assign key/value tensors to a specific layer, updating metadata if present.
KVCOMM/llm/kvcomm_engine.py:51
↓ 4 callersMethodapply_overrides
Return a copy with provided non-None fields overridden.
KVCOMM/llm/config.py:35
↓ 4 callersMethodapply_rotary_pos_emb
Rotate placeholder cache keys by absolute offset (with optional drop).
KVCOMM/llm/kvcomm_engine.py:1190
↓ 4 callersMethodarun
Asynchronous execution entry supporting standard and KV-reuse workflows.
KVCOMM/graph/graph.py:261
↓ 4 callersMethodconnect_decision_node
Connect every node to the decision node with a spatial edge.
KVCOMM/graph/graph.py:175
↓ 4 callersMethodconstruct_spatial_connection
Rebuild spatial edges from masks while preventing cycles.
KVCOMM/graph/graph.py:180
↓ 4 callersMethodconstruct_temporal_connection
Rebuild temporal edges for non-zero rounds from masks while preventing cycles.
KVCOMM/graph/graph.py:195
↓ 4 callersMethodfind_node
(self, id: str)
KVCOMM/graph/graph.py:122
↓ 4 callersFunctionget_combine_materials
(materials: Dict[str, Any], avoid_vague=True)
KVCOMM/prompt/common.py:5
↓ 4 callersMethodget_decision_constraint
TODO
KVCOMM/prompt/prompt_set.py:65
↓ 4 callersMethodget_decision_role
TODO
KVCOMM/prompt/prompt_set.py:70
↓ 4 callersMethodget_role
TODO
KVCOMM/prompt/prompt_set.py:11
↓ 4 callersMethodget_spatial_info
Return a dict that maps id to info.
KVCOMM/graph/node.py:123
↓ 4 callersMethodget_temporal_info
(self, message=None, prefix=False)
KVCOMM/graph/node.py:139
↓ 4 callersMethodinstance
(cls)
KVCOMM/utils/globals.py:5
↓ 4 callersMethodkeys
(self)
KVCOMM/llm/kvcomm_engine.py:577
↓ 4 callersMethodparse
To be overriden by the descendant class
KVCOMM/tools/reader/readers.py:28
↓ 4 callersMethodpredict_as_anchor
( self, candidate_kv_cache: DynamicCache, anchor_kv_cache_list: List[Dict], an
KVCOMM/llm/kvcomm_engine.py:991
↓ 4 callersMethodreset
(self, prompt_length: int)
KVCOMM/llm/gpt_chat.py:93
↓ 4 callersFunctionslice
Returns a new TokenInput with input_ids and attention_mask sliced along the time dimension. Negative indexing is allowed.
KVCOMM/llm/token_ops.py:55
↓ 4 callersMethodtokenize_segment
Tokenize a single chat segment and move tensors to the model device.
KVCOMM/llm/gpt_chat.py:472
↓ 4 callersMethodupdate
(self, predicted: str, target: str)
experiments/accuracy.py:8
↓ 3 callersMethod__init__
( self, id: str | None = None, domain: str = "", llm_name: str = "", l
KVCOMM/agents/final_decision.py:339
↓ 3 callersMethod_build_chat_inputs
Tokenize chat messages and return model inputs, text, and prompt length.
KVCOMM/llm/gpt_chat.py:397
↓ 3 callersMethod_process_inputs
Prepare prompts, optionally populate anchors, and return mode hints.
KVCOMM/agents/copy_machine.py:39
↓ 3 callersMethod_process_inputs
To be overriden by the descendant class
KVCOMM/agents/final_decision.py:95
↓ 3 callersMethod_process_inputs
To be overriden by the descendant class
KVCOMM/agents/final_decision.py:353
↓ 3 callersMethod_process_inputs
Prepare prompts, run quick internal checks, and return mode hints.
KVCOMM/agents/code_writing.py:31
↓ 3 callersMethod_process_inputs
Prepare prompts, optionally populate anchors, and return mode hints.
KVCOMM/agents/analyze_agent.py:41
↓ 3 callersMethod_process_inputs
Prepare prompts, possibly set anchors, and return mode hints.
KVCOMM/agents/math_solver.py:30
↓ 3 callersMethodadd_successor
(self, operation: 'Node', st='spatial')
KVCOMM/graph/node.py:81
↓ 3 callersMethodextract_example
(self, prompt: str)
KVCOMM/agents/code_writing.py:156
↓ 3 callersFunctionfunction_with_timeout
(func, args, timeout)
KVCOMM/tools/coding/executor_utils.py:34
↓ 3 callersMethodget_request_state
Return per-request state used by the KV engine.
KVCOMM/llm/gpt_chat.py:537
↓ 3 callersMethodlog_cumulative
Log the cumulative average reuse rate across all processed requests.
KVCOMM/utils/metrics.py:175
↓ 3 callersMethodread
(self, task, file)
KVCOMM/tools/reader/readers.py:334
↓ 3 callersFunctionsearch_wiki_main
(queries)
KVCOMM/tools/search/wiki.py:88
↓ 3 callersMethodupdate_memory
Propagate memory update across nodes; supports multi-request keys.
KVCOMM/graph/graph.py:421
↓ 3 callersMethodvalidate
Validate value ranges and return self.
KVCOMM/llm/config.py:44
↓ 2 callersFunction_append_latency_record
Persist a latency record to JSON, tolerating malformed or missing files.
KVCOMM/llm/gpt_chat.py:63
↓ 2 callersMethod_async_execute
To be overriden by the descendant class
KVCOMM/graph/node.py:267
↓ 2 callersFunction_clone_default
(value: Any)
KVCOMM/llm/kvcomm_engine.py:532
↓ 2 callersFunction_concat_inplace
In-place concatenate multiple caches along sequence dimension.
KVCOMM/llm/kvcomm_engine.py:303
↓ 2 callersFunction_concat_tensors
( base: Optional[torch.Tensor], additions: Sequence[Optional[torch.Tensor]], )
KVCOMM/llm/kvcomm_engine.py:272
↓ 2 callersFunction_elementwise_binary_op
Apply an elementwise binary op to two caches layer-by-layer.
KVCOMM/llm/kvcomm_engine.py:442
↓ 2 callersFunction_ensure_cache_sequence
( caches: Union[DynamicCache, Sequence[DynamicCache], None] )
KVCOMM/llm/kvcomm_engine.py:293
↓ 2 callersFunction_ensure_same_layout
(cache: DynamicCache, other: DynamicCache)
KVCOMM/llm/kvcomm_engine.py:185
↓ 2 callersFunction_extract_boxed_content
Return the content inside a \\boxed expression, handling nested braces.
datasets/gsm8k_dataset.py:26
↓ 2 callersMethod_is_python_code_block
(text: str)
KVCOMM/agents/final_decision.py:52
↓ 2 callersFunction_layer_length
(tensor: Optional[torch.Tensor])
KVCOMM/llm/kvcomm_engine.py:133
↓ 2 callersFunction_normalize_indices
Convert None/negative indices into bounded absolute [start, end).
KVCOMM/llm/kvcomm_engine.py:139
↓ 2 callersFunction_normalize_slice_indices
Convert negative indices and None into concrete slice bounds.
KVCOMM/llm/token_ops.py:4
↓ 2 callersMethod_render_base_messages
Render base messages from the current template with provided text.
KVCOMM/llm/gpt_chat.py:434
↓ 2 callersFunction_replace_inplace
In-place replace [start, end) with the content from `real`.
KVCOMM/llm/kvcomm_engine.py:352
next →1–100 of 446, ranked by callers