MCPcopy Create free account

hub / github.com/EverMind-AI/MSA / functions

Functions265 in github.com/EverMind-AI/MSA

Methodget_bench_files
(self)
src/benchmarks.py:52
Methodget_current_usage
获取当前显存使用量(不停止监控)
src/utils/gpu_monitor.py:194
Functionget_data
(index)
src/utils/data_utils.py:72
Methodget_decoder
(self)
src/msa/model.py:329
Functionget_eval_response
(prompt)
src/evaluation/llm_judge.py:83
Methodget_kvcache
获取指定层的KV缓存(反量化后) Args: layer_idx: 层索引 Returns: Tuple[torch.Tensor, torch.Tensor]: (key_cache, value
src/utils/cache.py:208
Methodget_layer_length
(self)
src/utils/cache.py:43
Methodget_layer_length
(self)
src/utils/cache.py:199
Functionget_length
(index)
src/utils/data_utils.py:58
Functionget_local_rank
()
src/utils/misc.py:42
Methodget_padded_gather_list
(tensor, target_seqlen)
src/msa_service.py:1114
Methodget_peak_usage
获取当前记录的峰值显存使用量(不停止监控)
src/utils/gpu_monitor.py:198
Methodget_seq_length
返回缓存状态的序列长度 Args: layer_idx: 可选的层索引 Returns: int: 序列长度
src/utils/cache.py:282
Functionget_sequence_length
(dataset, num_worker=16)
src/utils/data_utils.py:61
Functionget_sha
()
src/utils/misc.py:51
Methodget_template_prefix_kvcaches
(self, layer_idx: int)
src/msa_service.py:261
Methodgpu_select
(self, scores, k, rk, v, pooled_doc_ids, total_docs)
src/msa_service.py:995
Methodis_running
检查监控是否在运行
src/utils/gpu_monitor.py:203
Functionis_transformers_version_equal_to_4_46
()
src/utils/data_utils.py:103
Functionis_transformers_version_greater_than
(content: str)
src/utils/data_utils.py:99
Functionmanual_deepcopy_kv_cache
Manually performs a deep copy of a custom KV cache object, avoiding the issues with quanto's __deepcopy__.
src/utils/cache.py:353
Methodmap_tensor_to_group_ids
(a: torch.Tensor)
src/msa/memory_sparse_attention.py:100
Methodmemory_path
(self)
src/benchmarks.py:49
Functionmonitor_gpu_memory_example
使用示例
src/utils/gpu_monitor.py:218
Methodnext_bucket
()
src/msa_service.py:1467
Methodnr_docs
(self)
src/msa_service.py:230
Methodon_log
(self, args, state, control, logs=None, **kwargs)
src/utils/callbacks.py:38
Methodon_log
(self, args, state, control, logs=None, **kwargs)
src/utils/callbacks.py:74
Methodon_step_begin
(self, args, state, control, **kwargs)
src/utils/callbacks.py:30
Methodon_step_begin
(self, args, state, control, **kwargs)
src/utils/callbacks.py:64
Methodon_step_end
(self, args, state, control, **kwargs)
src/utils/callbacks.py:34
Methodon_step_end
(self, args, state, control, **kwargs)
src/utils/callbacks.py:69
Methodon_step_end
(self, args, state, control, **kwargs)
src/utils/callbacks.py:109
Methodon_step_end
(self, args, state, control, **kwargs)
src/utils/callbacks.py:156
Methodon_step_end
(self, args, state, control, **kwargs)
src/utils/callbacks.py:171
Methodon_train_begin
(self, args, state, control, **kwargs)
src/utils/callbacks.py:27
Methodon_train_begin
(self, args, state, control, **kwargs)
src/utils/callbacks.py:60
Functionpad_sequence
(examples, cutoff_len, tokenizer)
src/utils/data_utils.py:177
Functionparse_match_result
(text)
src/evaluation/llm_judge.py:10
Functionpatch_cosine_with_warmup_schedule
(minimal_lr=0.0)
src/utils/misc.py:71
Functionpatch_torch_clip_grad_norm
()
src/utils/misc.py:174
Functionpatch_transformer_logging
()
src/utils/common.py:90
Methodprefill_stage2_1
(self, layer_idx: int, query_states: torch.Tensor, query_mask: torch.Tensor)
src/msa_service.py:830
Methodprefill_worker_main
(gpu_id: int, request_queue: mp.Queue, response_queue: mp.Queue, model_path: str,
src/prefill.py:112
Functionpreprocess_packed_supervised_dataset
(examples, tokenizer, cutoff_len)
src/utils/data_utils.py:136
Methodprint
(self)
src/utils/tools.py:110
Functionprint_trainable_params
(model: torch.nn.Module)
src/utils/common.py:14
Methodquery_path
(self)
src/benchmarks.py:45
Functionquick_monitor
快速启动监控的便捷函数 Args: gpu_index: GPU索引 interval: 监控间隔 unit: 单位 wait_for_input: 是否等待用户输入 Returns:
src/utils/gpu_monitor.py:310
Functionread_lmdb
(lmdb_path)
src/utils/data_utils.py:44
Methodreceive_request
(self)
src/msa_service.py:1579
Methodreceive_response
(self)
src/msa_service.py:1772
Methodrecord_kwargs
记录层的元数据信息 Args: layer_idx: 层索引 kwargs: 包含路由层信息的字典
src/utils/cache.py:186
Methodservice_main
(gpu_id: int, request_queue: mp.Queue, response_queue: mp.Queue,
src/msa_service.py:1591
Methodset_decoder
(self, decoder)
src/msa/model.py:326
Methodset_input_embeddings
(self, value)
src/msa/model.py:317
Methodset_output_embeddings
(self, new_embeddings)
src/msa/model.py:323
Functionsmart_tokenizer_and_embedding_resize
Resize tokenizer and embedding. Note: This is the unoptimized version that may make your embedding size not be divisible by 64.
src/utils/common.py:68
Functionsp_split
(examples, sequence_parallel_size, sequence_parallel_mode="ulysses")
src/utils/data_utils.py:222
Methodstop_all_and_get_max
停止所有监控并返回最大峰值
src/utils/gpu_monitor.py:299
Functiontorch_dataset_to_hf_dataset
(torch_dataset, num_worker=16)
src/utils/data_utils.py:77
Methodupdate
更新缓存 Args: key_states: 新的key状态 value_states: 新的value状态 layer_idx: 层索引 cache_kwargs:
src/utils/cache.py:222
Methodupdate_router_kcache
( self, key_states: torch.Tensor, layer_idx: int, )
src/utils/cache.py:165
Methodworld
(self)
src/config/memory_config.py:25
Functionwrite_lmdb
(output_dir, name)
src/utils/data_utils.py:21
← previous201–265 of 265, ranked by callers