Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/FastMAS/KVCOMM
/ functions
Functions
446 in github.com/FastMAS/KVCOMM
⨍
Functions
446
◇
Types & classes
71
↓ 2 callers
Method
_rotate_segment_caches
(self, segment_meta: Dict[str, Any])
KVCOMM/llm/kvcomm_engine.py:705
↓ 2 callers
Function
_slice_inplace
In-place slice of KV cache along sequence dimension.
KVCOMM/llm/kvcomm_engine.py:224
↓ 2 callers
Function
_strip_string
(s)
datasets/gsm8k_dataset.py:23
↓ 2 callers
Method
agen_kvcomm
Core KV-aware generation entry. Builds merged prefix KV and token ids from stored segments and per-request placeholder caches, then r
KVCOMM/llm/gpt_chat.py:1161
↓ 2 callers
Method
check_cycle
Detect if adding edges would create a cycle starting at `new_node`.
KVCOMM/graph/graph.py:430
↓ 2 callers
Function
concat
Returns a new TokenInput instance with token inputs concatenated along the time dimension.
KVCOMM/llm/token_ops.py:104
↓ 2 callers
Function
download
()
datasets/MMLU/download.py:7
↓ 2 callers
Method
fetch_shared_cache
Retrieve shared KV cache and ids for a placeholder given message context.
KVCOMM/llm/kvcomm_engine.py:1215
↓ 2 callers
Function
find_strings_between_pluses
(text)
KVCOMM/agents/analyze_agent.py:17
↓ 2 callers
Method
get_analyze_constraint
Return role-specific analysis constraints.
KVCOMM/prompt/mmlu_prompt_set.py:108
↓ 2 callers
Method
get_answer_prompt
TODO
KVCOMM/prompt/prompt_set.py:26
↓ 2 callers
Method
get_constraint
TODO
KVCOMM/prompt/prompt_set.py:16
↓ 2 callers
Function
get_wikipedia_summary
(title)
KVCOMM/tools/search/wiki.py:39
↓ 2 callers
Method
parse_file
(file_path: Path)
KVCOMM/tools/reader/readers.py:57
↓ 2 callers
Method
postprocess_answer
Normalize answer into a single string and strip prefix markers.
KVCOMM/prompt/mmlu_prompt_set.py:174
↓ 2 callers
Method
print
(self)
experiments/accuracy.py:16
↓ 2 callers
Method
read_file
(self, file_path: Path, task="describe the file")
KVCOMM/tools/reader/readers.py:311
↓ 2 callers
Method
record_agent_output
Log an agent's generation output and update reuse statistics.
KVCOMM/utils/metrics.py:51
↓ 2 callers
Method
record_to_input
(record: pd.DataFrame)
datasets/mmlu_dataset.py:60
↓ 2 callers
Method
run
(self)
KVCOMM/tools/coding/executor_utils.py:16
↓ 2 callers
Method
search
(self, query)
KVCOMM/tools/search/wiki.py:12
↓ 2 callers
Method
start_request
Initialise bookkeeping for a new request.
KVCOMM/utils/metrics.py:32
↓ 2 callers
Method
trim_token_ids
(ids_dict: Dict[str, torch.Tensor], drop_num: int)
KVCOMM/llm/kvcomm_engine.py:1260
↓ 1 callers
Method
__getstate__
(self)
KVCOMM/llm/gpt_chat.py:1795
↓ 1 callers
Method
__getstate__
(self)
KVCOMM/graph/graph.py:443
↓ 1 callers
Method
__setstate__
(self, state)
KVCOMM/llm/gpt_chat.py:1804
↓ 1 callers
Method
__setstate__
(self, state)
KVCOMM/graph/graph.py:448
↓ 1 callers
Method
_commit_staged_states_locked
Commit all staged request states into the global dictionaries.
KVCOMM/llm/kvcomm_engine.py:753
↓ 1 callers
Method
_compute_anchor_weight_entry
Compute attention-like weights between the real placeholder segment and stored anchors.
KVCOMM/llm/kvcomm_engine.py:814
↓ 1 callers
Function
_concat_functional
Return a new cache that is the concatenation of base and others.
KVCOMM/llm/kvcomm_engine.py:346
↓ 1 callers
Method
_ensure_global_input_buckets
Ensure the global input buckets exist and return the shared store.
KVCOMM/llm/gpt_chat.py:545
↓ 1 callers
Method
_ensure_local
(self, key: str)
KVCOMM/llm/kvcomm_engine.py:545
↓ 1 callers
Method
_ensure_thread_pool
Initialise or resize the shared thread pool used for CPU work.
KVCOMM/llm/gpt_chat.py:525
↓ 1 callers
Method
_execute
To be overriden by the descendant class
KVCOMM/graph/node.py:262
↓ 1 callers
Method
_extract_assistant_prompt
Extract trailing assistant prompt from a legacy text prefix.
KVCOMM/llm/gpt_chat.py:294
↓ 1 callers
Method
_extract_chat_markers
Parse tokenizer chat template to identify structural markers.
KVCOMM/llm/gpt_chat.py:239
↓ 1 callers
Method
_extract_python_code
Extract pure python code from a fenced block.
KVCOMM/agents/final_decision.py:57
↓ 1 callers
Function
_fix_a_slash_b
(string)
datasets/gsm8k_dataset.py:182
↓ 1 callers
Function
_fix_fracs
(string)
datasets/gsm8k_dataset.py:151
↓ 1 callers
Function
_fix_sqrt
(string)
datasets/gsm8k_dataset.py:123
↓ 1 callers
Method
_get_cached_anchor_weights
Look up cached anchor weights for a specific placeholder/message/signature.
KVCOMM/llm/kvcomm_engine.py:774
↓ 1 callers
Method
_get_request_state
Return or create a request-scoped state container under a lock.
KVCOMM/llm/kvcomm_engine.py:718
↓ 1 callers
Method
_initialize_shared_resources
Lazy-load shared tokenizer/model and shared KV memory storage.
KVCOMM/llm/gpt_chat.py:929
↓ 1 callers
Function
_install_dynamic_cache_extensions
Monkey-patch DynamicCache with convenience methods used by KVCOMM.
KVCOMM/llm/kvcomm_engine.py:505
↓ 1 callers
Method
_legacy_prompt_from_messages
Fallback prompt renderer when chat_template is unavailable.
KVCOMM/llm/gpt_chat.py:378
↓ 1 callers
Method
_load_data
( data_path: str, )
datasets/mmlu_dataset.py:23
↓ 1 callers
Function
_make_random_token_sequence
(length: int)
experiments/benchmark_TTFT.py:81
↓ 1 callers
Method
_normalise_messages
Convert mixed message representations into chat dicts.
KVCOMM/llm/gpt_chat.py:325
↓ 1 callers
Method
_placeholder_length
(cache: DynamicCache)
KVCOMM/llm/kvcomm_engine.py:702
↓ 1 callers
Method
_prepare_prefix_template
Normalise various prefix formats into a base messages template.
KVCOMM/llm/gpt_chat.py:276
↓ 1 callers
Method
_process_inputs
To be overriden by the descendant class
KVCOMM/graph/node.py:272
↓ 1 callers
Function
_remove_right_units
(string)
datasets/gsm8k_dataset.py:196
↓ 1 callers
Function
_replace_functional
Return a copy of cache with [start, end) replaced by `real`.
KVCOMM/llm/kvcomm_engine.py:367
↓ 1 callers
Function
_resolve_latency_path
(target: Optional[Union[str, Path]])
KVCOMM/llm/gpt_chat.py:54
↓ 1 callers
Method
_rotate_half
(x: torch.Tensor)
KVCOMM/llm/kvcomm_engine.py:1173
↓ 1 callers
Method
_select_anchor_indices
Pick anchors whose placeholder span covers the current placeholder length.
KVCOMM/llm/kvcomm_engine.py:806
↓ 1 callers
Function
_select_indices
Select positions by index tensor, preserving layout and metadata.
KVCOMM/llm/kvcomm_engine.py:373
↓ 1 callers
Method
_set_cached_anchor_weights
Store computed anchor weights for reuse within the same request.
KVCOMM/llm/kvcomm_engine.py:793
↓ 1 callers
Function
_slice_functional
Return a sliced copy of the KV cache.
KVCOMM/llm/kvcomm_engine.py:266
↓ 1 callers
Function
_split_cache
Split a cache into multiple segments by the given lengths (sum sizes).
KVCOMM/llm/kvcomm_engine.py:495
↓ 1 callers
Function
_split_cache_by_placeholders
Split a cache into placeholder and prefix segments per provided spans.
KVCOMM/llm/kvcomm_engine.py:410
↓ 1 callers
Function
_to_device
Move all tensors in the cache to the specified device.
KVCOMM/llm/kvcomm_engine.py:393
↓ 1 callers
Function
_write_per_agent_latency
(output_dir: str)
experiments/benchmark_TTFT.py:119
↓ 1 callers
Function
achat
Call an OpenAI-compatible chat endpoint asynchronously.
KVCOMM/llm/gpt_chat.py:106
↓ 1 callers
Method
add_node
(self, node: Node)
KVCOMM/graph/graph.py:128
↓ 1 callers
Method
agen_kvcomm_time_test
Core KV-aware generation entry. Builds merged prefix KV and token ids from stored segments and per-request placeholder caches, then r
KVCOMM/llm/gpt_chat.py:1467
↓ 1 callers
Method
anchor_signature
Create a lightweight fingerprint for the active anchors.
KVCOMM/llm/kvcomm_engine.py:770
↓ 1 callers
Method
clear_spatial_connection
Clear all the spatial connection of the nodes in the graph.
KVCOMM/graph/graph.py:156
↓ 1 callers
Method
clear_temporal_connection
Clear all the temporal connection of the nodes in the graph.
KVCOMM/graph/graph.py:167
↓ 1 callers
Function
dataloader
(data_list, batch_size, i_batch)
experiments/run_humaneval.py:42
↓ 1 callers
Function
dataloader
(data_list, batch_size, i_batch)
experiments/run_gsm8k.py:45
↓ 1 callers
Function
eval_loader
(batch_size: int)
experiments/evaluate_mmlu.py:35
↓ 1 callers
Function
evaluate
( graph: Graph, *, samples: int, output_dir: str, **kwargs )
experiments/benchmark_TTFT.py:86
↓ 1 callers
Function
evaluate
Evaluate a graph on the provided dataset.
experiments/evaluate_mmlu.py:17
↓ 1 callers
Method
execute
(self, func: str, tests: List[str], timeout: int = 5)
KVCOMM/tools/coding/executor_types.py:11
↓ 1 callers
Function
extract_answer_from_output
(completion)
KVCOMM/utils/utils.py:12
↓ 1 callers
Function
extract_dimensions
(url)
KVCOMM/tools/vgen/dalle3.py:37
↓ 1 callers
Method
extract_example
(self, prompt: str)
KVCOMM/agents/final_decision.py:526
↓ 1 callers
Function
fetch_summary
(session, title)
KVCOMM/tools/search/wiki.py:21
↓ 1 callers
Method
format_chat_segment
Render a single chat block for the given role and content.
KVCOMM/llm/gpt_chat.py:454
↓ 1 callers
Method
gen_video
(self, task: Optional[str] = None, video: Optional[str] = None)
KVCOMM/llm/visual_llm.py:13
↓ 1 callers
Function
generate_image
(prompt, api_key)
KVCOMM/tools/vgen/dalle3.py:23
↓ 1 callers
Function
generate_layered_graph
(n, layer_num=2)
experiments/run_humaneval.py:230
↓ 1 callers
Function
generate_layered_graph
(n, layer_num=2)
experiments/run_mmlu.py:153
↓ 1 callers
Function
generate_layered_graph
(n, layer_num=2)
experiments/benchmark_TTFT.py:197
↓ 1 callers
Function
generate_layered_graph
(n, layer_num=2)
experiments/run_gsm8k.py:247
↓ 1 callers
Function
generate_mesh_graph
(n)
experiments/run_mmlu.py:169
↓ 1 callers
Function
generate_mesh_graph
(n)
experiments/benchmark_TTFT.py:213
↓ 1 callers
Function
generate_star_graph
(n)
experiments/run_humaneval.py:246
↓ 1 callers
Function
generate_star_graph
(n)
experiments/run_mmlu.py:176
↓ 1 callers
Function
generate_star_graph
(n)
experiments/benchmark_TTFT.py:220
↓ 1 callers
Function
generate_star_graph
(n)
experiments/run_gsm8k.py:263
↓ 1 callers
Method
generate_with_dense_prefill
Generate with dense prefix prefill and optional anchor update.
KVCOMM/llm/gpt_chat.py:1092
↓ 1 callers
Method
generate_with_kv_reuse
Generate by reusing existing prefix KV (fast path).
KVCOMM/llm/gpt_chat.py:1122
↓ 1 callers
Method
get
(cls, name: str, *args, **kwargs)
KVCOMM/prompt/prompt_set_registry.py:18
↓ 1 callers
Function
get_call_str
(assert_statement: str)
KVCOMM/tools/coding/python_executor.py:12
↓ 1 callers
Function
get_kwargs
( mode: Union[ Literal["DirectAnswer"], Literal["FullConnected"], Literal["Random"
experiments/run_humaneval.py:214
↓ 1 callers
Function
get_kwargs
( mode: Union[ Literal["DirectAnswer"], Literal["FullConnected"], Literal["Random"
experiments/run_mmlu.py:136
↓ 1 callers
Function
get_kwargs
( mode: Union[ Literal["DirectAnswer"], Literal["FullConnected"], Literal["Random"
experiments/benchmark_TTFT.py:180
↓ 1 callers
Function
get_kwargs
( mode: Union[ Literal["DirectAnswer"], Literal["FullConnected"], Literal["Random"
experiments/run_gsm8k.py:231
← previous
next →
101–200 of 446, ranked by callers