MCPcopy Create free account

hub / github.com/XiaoDu-flying/Interlat / functions

Functions1,013 in github.com/XiaoDu-flying/Interlat

↓ 2 callersFunction_is_global_rank0
()
compression_training/callbacks.py:24
↓ 2 callersMethod_safe_stats
(self, t)
core_training/callbacks.py:467
↓ 2 callersFunctionacquire_worker_semaphore
()
core_training/fastchat/serve/lightllm_worker.py:198
↓ 2 callersFunctionacquire_worker_semaphore
()
core_training/fastchat/serve/vllm_worker.py:182
↓ 2 callersFunctionacquire_worker_semaphore
()
core_training/fastchat/serve/sglang_worker.py:185
↓ 2 callersFunctionacquire_worker_semaphore
()
core_training/fastchat/serve/mlx_worker.py:175
↓ 2 callersMethodadd_item
(self, item_tag: ItemTag, amt: int)
eval/alfworld/eval_agent/envs/textcraft_env.py:468
↓ 2 callersMethodadd_sample
Add a collected sample to the storage
data_collection/base_data_collector.py:124
↓ 2 callersFunctionbot_response
( state, temperature, top_p, max_new_tokens, request: gr.Request, apply_rate_limit=Tru
core_training/fastchat/serve/gradio_web_server.py:360
↓ 2 callersFunctionbuild_single_model_ui
(models, add_promotion_links=False)
core_training/fastchat/serve/gradio_web_server.py:638
↓ 2 callersFunctionchat_completion_stream_generator
Event stream format: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#event_stream_format
core_training/fastchat/serve/openai_api_server.py:487
↓ 2 callersFunctioncompress
Simulate group-wise quantization.
core_training/fastchat/model/compression.py:226
↓ 2 callersFunctionconvert_to_hf_dataset
Convert collected data to a HuggingFace Dataset and save as Dataset and Parquet files
data_collection/alfworld_collection.py:60
↓ 2 callersFunctionconvert_to_hf_dataset
Convert collected data into a HuggingFace Dataset and output: 1) A single large Parquet file 2) Multiple size-limited Parquet shards
data_collection/math_collection.py:121
↓ 2 callersFunctioncreate_background_tasks
()
core_training/fastchat/serve/multi_model_worker.py:86
↓ 2 callersMethodcreate_default
Create default configuration
data_collection/config.py:100
↓ 2 callersFunctioncreate_openai_logprobs
Create OpenAI-style logprobs.
core_training/fastchat/serve/openai_api_server.py:255
↓ 2 callersFunctioncuda_sync
()
eval/alfworld/eval_agent/main.py:54
↓ 2 callersMethodextract_boxed_answer
Extract the LAST \\boxed{...} or \\fbox{...} from model output.
eval/math/math_evaluator.py:65
↓ 2 callersMethodfinalize
Finalize the collection process
data_collection/base_data_collector.py:662
↓ 2 callersMethodfinalize_storage
Convert all collected samples to final storage formats
data_collection/base_data_collector.py:250
↓ 2 callersFunctionfind_gptq_ckpt
(gptq_config: GptqConfig)
core_training/fastchat/modules/gptq.py:65
↓ 2 callersMethodgenerate
(self, params)
core_training/fastchat/serve/lightllm_worker.py:188
↓ 2 callersMethodgenerate
(self, params)
core_training/fastchat/serve/vllm_worker.py:172
↓ 2 callersFunctiongenerate_completion_stream
(payload: Dict[str, Any], worker_addr: str)
core_training/fastchat/serve/openai_api_server.py:681
↓ 2 callersMethodgenerate_gate
(self, params)
core_training/fastchat/serve/sglang_worker.py:175
↓ 2 callersMethodgenerate_stream
(self, params)
core_training/fastchat/serve/lightllm_worker.py:77
↓ 2 callersMethodgenerate_stream
(self, params)
core_training/fastchat/serve/vllm_worker.py:67
↓ 2 callersMethodgenerate_stream
(self, params)
core_training/fastchat/serve/mlx_worker.py:77
↓ 2 callersMethodgenerate_stream_gate
(self, params)
core_training/fastchat/serve/huggingface_api_worker.py:138
↓ 2 callersMethodgenerate_with_hidden_states
Generate text and extract hidden states Returns: Tuple of (generated_text, hidden_states_array)
data_collection/base_data_collector.py:470
↓ 2 callersFunctionget_generate_stream_function
Get the generate_stream function for inference.
core_training/fastchat/model/model_adapter.py:387
↓ 2 callersFunctionget_memory_size
(module, dtype=torch.float32)
compression_training/compress.py:1043
↓ 2 callersMethodget_min_depth
(self, item_tag: str)
eval/alfworld/eval_agent/envs/textcraft_env.py:330
↓ 2 callersMethodget_min_depth_recipes
(self, recipes)
eval/alfworld/eval_agent/envs/textcraft_env.py:343
↓ 2 callersMethodget_model_call_limit
(self, model: str)
core_training/fastchat/serve/call_monitor.py:66
↓ 2 callersFunctionget_sample_weight
(model)
core_training/fastchat/serve/gradio_block_arena_anony.py:431
↓ 2 callersMethodget_worker_address
(self, model_name: str)
core_training/fastchat/serve/controller.py:156
↓ 2 callersMethodinitialize
Initialize the pipeline - load models and datasets
data_collection/base_data_collector.py:599
↓ 2 callersMethodis_tag
(self, input: str)
eval/alfworld/eval_agent/envs/textcraft_env.py:281
↓ 2 callersFunctionlaunch_worker
(item)
core_training/fastchat/serve/launch_all_serve.py:235
↓ 2 callersFunctionload_image
(image_file)
core_training/fastchat/utils.py:362
↓ 2 callersFunctionnew_chat
()
core_training/fastchat/serve/inference.py:391
↓ 2 callersFunctionparse_gradio_auth_creds
Parse a username:password file for gradio authorization.
core_training/fastchat/utils.py:286
↓ 2 callersFunctionpreprocess_with_position_tracking
Preprocess data by tokenizing and tracking first human positions.
core_training/data_processor.py:123
↓ 2 callersFunctionprint_help
()
data_collection/collect_data.py:22
↓ 2 callersMethodprint_recipe
(self, recipe: Recipe)
eval/alfworld/eval_agent/envs/textcraft_env.py:297
↓ 2 callersMethodprocess_hidden_state
(self, hidden_state: torch.Tensor)
compression_training/compress.py:281
↓ 2 callersMethodprocess_hidden_states
处理隐藏状态的核心流程
eval/alfworld/eval_agent/agents/model_insert_hidden.py:760
↓ 2 callersMethodprocess_hidden_states
(self, x)
core_training/hidden_model/custom_model.py:136
↓ 2 callersMethodprocess_hidden_states_list
对一个list中的所有hidden states进行MHA处理
eval/alfworld/eval_agent/agents/model_insert_hidden.py:879
↓ 2 callersFunctionprocess_input
(model_name, inp)
core_training/fastchat/serve/openai_api_server.py:231
↓ 2 callersFunctionprocess_ob
(ob)
eval/alfworld/eval_agent/envs/alfworld_env.py:15
↓ 2 callersMethodprompt_for_output
Prompt for output from a role.
core_training/fastchat/serve/inference.py:325
↓ 2 callersMethodregister_to_controller
(self)
core_training/fastchat/serve/base_model_worker.py:89
↓ 2 callersMethodregister_worker
( self, worker_name: str, check_heart_beat: bool, worker_status: dict,
core_training/fastchat/serve/controller.py:75
↓ 2 callersFunctionrelease_worker_semaphore
()
core_training/fastchat/serve/base_model_worker.py:180
↓ 2 callersMethodremove_worker
(self, worker_name: str)
core_training/fastchat/serve/controller.py:117
↓ 2 callersMethodreset
(self)
eval/alfworld/eval_agent/envs/base.py:29
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
core_training/fastchat/model/monkey_patch_non_inplace.py:13
↓ 2 callersMethodrun_collection
Run the main data collection process
data_collection/base_data_collector.py:629
↓ 2 callersFunctionsafe_to_bfloat16
(model)
core_training/train.py:230
↓ 2 callersFunctionsample_cov_gauss_from_hidden
Resample hidden states according to CovGauss definition in paper: - use_mean = False -> CovGauss-0μ: H_new ~ N(0, Σ̂) - use_mean = True
eval/alfworld/eval_agent/main.py:177
↓ 2 callersFunctionset_global_vars
(controller_url_, enable_moderation_)
core_training/fastchat/serve/gradio_web_server.py:119
↓ 2 callersFunctionsplit_files
(model_path, tmp_path, split_size)
core_training/fastchat/model/apply_delta.py:25
↓ 2 callersMethodstep
(self, llm_output: str)
eval/alfworld/eval_agent/envs/base.py:25
↓ 2 callersMethodstep
(self, llm_output: str)
eval/alfworld/eval_agent/envs/alfworld_env.py:56
↓ 2 callersFunctionstr_to_torch_dtype
(dtype: str)
core_training/fastchat/utils.py:347
↓ 2 callersMethodto_dict
Convert configuration to dictionary
data_collection/config.py:130
↓ 2 callersMethodto_dict
Convert sample to dictionary format
data_collection/base_data_collector.py:90
↓ 2 callersMethodwrite_parquet_shard
Write a shard of samples to Parquet format
data_collection/base_data_collector.py:145
↓ 1 callersMethod__encode_base64
(self, embeddings: torch.Tensor)
core_training/fastchat/serve/model_worker.py:178
↓ 1 callersMethod__init__
(self, minecraft_dir)
eval/alfworld/eval_agent/envs/textcraft_env.py:389
↓ 1 callersMethod__init__
( self, task: AlfWorldTask, **kwargs, )
eval/alfworld/eval_agent/envs/alfworld_env.py:22
↓ 1 callersMethod__init__
(self, hidden_size)
eval/alfworld/eval_agent/agents/model_insert_hidden.py:649
↓ 1 callersMethod__init__
( self, config, MODEL: Optional[str] = None, )
eval/alfworld/eval_agent/agents/plan_agent.py:137
↓ 1 callersMethod__init__
(self, raw_data, tokenizer: transformers.PreTrainedTokenizer, model_path: str = None)
core_training/data_processor.py:372
↓ 1 callersMethod__init__
(self, hidden_size)
core_training/hidden_model/custom_model.py:19
↓ 1 callersFunction_attn_impl_for_device
(device: str)
eval/alfworld/eval_agent/agents/hidden_agent.py:44
↓ 1 callersMethod_build_window_masks
(self, labels_A: torch.Tensor, labels_B: torch.Tensor, human_end_positions: torch.Tensor, window_len: int)
compression_training/compress.py:327
↓ 1 callersMethod_compute_stats
(self)
compression_training/callbacks.py:121
↓ 1 callersFunction_detect_source_type
返回: - 'hf_export':目录下含 hidden_mha_state.pt(你自定义模块的权重单独导出) - 'trainer_ckpt':目录下 pytorch_model.bin 里包含 hidden_mha(wrapper 的完整 state_dic
eval/alfworld/eval_agent/agents/hidden_agent.py:61
↓ 1 callersFunction_device_and_dtype
()
eval/alfworld/eval_agent/agents/hidden_agent.py:38
↓ 1 callersFunction_ensure_special_tokens_and_resize
如果 tokenizer 缺少某些特殊 token,就添加并 resize 模型 embedding。
eval/alfworld/eval_agent/agents/hidden_agent.py:96
↓ 1 callersFunction_estimate_entry_bytes
Conservatively estimate the byte size of one sample for shard size control
data_collection/math_collection.py:70
↓ 1 callersFunction_extract_input_projector_from_mp
从 mp_rank_00_model_states.pt 的内容中提取 input_projector 的权重。 支持两种常见结构: 1) 顶层就有 key "input_projector",且对应的是子 state_dict 2) 顶层有 "module"/"m
eval/alfworld/eval_agent/agents/hidden_agent.py:266
↓ 1 callersMethod_get_model
(self, kwargs)
core_training/callbacks.py:435
↓ 1 callersMethod_init_mha_weights
初始化MHA层权重
eval/alfworld/eval_agent/agents/model_insert_hidden.py:741
↓ 1 callersMethod_init_mha_weights
Initialize MHA layer weights
core_training/hidden_model/custom_model.py:105
↓ 1 callersMethod_init_projection_weights
初始化输出投影层
eval/alfworld/eval_agent/agents/model_insert_hidden.py:749
↓ 1 callersMethod_init_weights
(self)
eval/alfworld/eval_agent/agents/model_insert_hidden.py:664
↓ 1 callersMethod_init_weights
(self)
core_training/hidden_model/custom_model.py:34
↓ 1 callersMethod_is_improved
(self, cur: float)
compression_training/callbacks.py:174
↓ 1 callersMethod_load_data
(self)
eval/alfworld/eval_agent/main.py:108
↓ 1 callersMethod_load_data
(self)
core_training/hidden_state_loader.py:20
↓ 1 callersMethod_load_data
(self)
compression_training/compress.py:561
↓ 1 callersMethod_load_recipes
(self, minecraft_dir)
eval/alfworld/eval_agent/envs/textcraft_env.py:116
↓ 1 callersFunction_load_tokenizer_fallback
优先从本地目录加载;不行则尝试从 config._name_or_path 回退;再不行抛错。
eval/alfworld/eval_agent/agents/hidden_agent.py:109
↓ 1 callersMethod_log_stats
记录训练统计信息
eval/alfworld/eval_agent/agents/model_insert_hidden.py:783
↓ 1 callersMethod_metric_key
(self, metrics: Dict[str, float])
compression_training/callbacks.py:168
← previousnext →101–200 of 1,013, ranked by callers