MCPcopy Create free account

hub / github.com/RUC-NLPIR/SmartSearch / functions

Functions2,379 in github.com/RUC-NLPIR/SmartSearch

Functionmerge_megatron_ckpt_gptmodel
Merge sharded parameters of a Megatron module into a merged checkpoint. Args: wrapped_models (list of megatron.core.distributed.Distri
src/verl/models/mcore/saver.py:81
Functionmerge_megatron_ckpt_llama
Merge sharded parameters of a Megatron module into a merged checkpoint. Args: wrapped_models (list of megatron.core.distributed.Distri
src/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:68
Functionmerge_megatron_ckpt_qwen2
Merge sharded parameters of a Megatron module into a merged checkpoint. Args: wrapped_models (list of megatron.core.distributed.Distri
src/verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:68
Functionmerge_resource_pool
(rp1: RayResourcePool, rp2: RayResourcePool)
src/verl/single_controller/ray/base.py:135
Functionmeta_device_init
Create model parameters with meta device. Note buffers in model will still be initialized in default device (e.g., CPU), since the b
src/verl/utils/fsdp_utils.py:176
Methodmodel_mesh_dim_names
Model parallel mesh dimension names.
LLaMA-Factory/src/llamafactory/v1/accelerator/interface.py:90
Methodmodel_mesh_shape
Model parallel mesh shape.
LLaMA-Factory/src/llamafactory/v1/accelerator/interface.py:85
Functionmodule_filter_func
(module, layer_name)
LLaMA-Factory/src/llamafactory/train/fp8_utils.py:62
Methodmul_reduce
(a, b)
src/verl/utils/megatron/tensor_parallel.py:106
Methodmulti_gpu_encode
(self, query_list: Union[List[str], str], batch_size=None, is_query=True)
src/flashrag/retriever/encoder.py:128
Methodmulti_gpu_encode
(self, query_list: Union[List[str], str], batch_size=64, is_query=True)
src/flashrag/retriever/encoder.py:203
Functionnaive
(args, config_dict)
scripts/evaluation/run_eval.py:5
Methodnaive_run
(self, dataset, do_eval=True, pred_process_func=None)
src/flashrag/pipeline/mm_pipeline.py:47
Methodname
Plugin name.
LLaMA-Factory/src/llamafactory/v1/config/arg_utils.py:27
Functionnext_page
(page_index: int, total_num: int)
LLaMA-Factory/src/llamafactory/webui/components/data.py:38
Functionnormalize_answer
(answer: Optional[str])
src/verl/utils/reward_score/prime_math/math_normalize.py:43
Methodnpu_moe_experts_forward
( self, hidden_states: torch.Tensor, routing_weights: torch.Tensor, router_indices: torch.Tensor )
LLaMA-Factory/src/llamafactory/v1/plugins/model_plugins/kernels/mlp/npu_fused_moe.py:123
Methodnpu_moe_sparse_block_forward
(self, hidden_states: torch.Tensor)
LLaMA-Factory/src/llamafactory/v1/plugins/model_plugins/kernels/mlp/npu_fused_moe.py:140
Methodon_evaluate
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:258
Methodon_init_end
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:225
Methodon_predict
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:263
Methodon_prediction_step
( self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs )
LLaMA-Factory/src/llamafactory/train/callbacks.py:309
Methodon_save
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:102
Methodon_substep_end
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:246
Methodon_train_begin
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:132
Methodon_train_begin
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:356
Methodon_train_end
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:123
Methodon_train_end
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:144
Functionoperate_tensorlike
Operate tensorlike data on current accelerator.
LLaMA-Factory/src/llamafactory/v1/accelerator/helper.py:147
Functionoptimizer_hook
(param: "torch.nn.Parameter")
LLaMA-Factory/src/llamafactory/train/trainer_utils.py:262
Methodoutput
(self)
src/flashrag/dataset/dataset.py:164
Functionpad_packed_inputs
pad the tokens such that the total length is a multiple of size. This function is useful when applying sequence parallel and context parallel
src/verl/utils/model.py:331
Methodpad_token_id
`Optional[int]`: Id of the padding token in the vocabulary. Returns `None` if the token has not been set.
src/verl/workers/rollout/tokenizer.py:36
Functionpair_converter
Convert Pair sample to DPO sample. See raw example at: https://huggingface.co/datasets/HuggingFaceH4/orca_dpo_pairs Args: raw_sample
LLaMA-Factory/src/llamafactory/v1/plugins/data_plugins/converter.py:154
Functionparallel_init_module_fn
Generate a function to initialize sub-modules in the `module` with `shard_states` from huggingface checkpoint. Args: module
src/verl/utils/fsdp_utils.py:263
Functionparallel_load_safetensors
Parallel load safetensors from huggingface checkpoint Huggingface checkpoint contains: - config.json: a json file for model config
src/verl/utils/fsdp_utils.py:207
Functionparallel_put
(data_list, max_workers=None)
src/verl/utils/ray_utils.py:23
Methodparse_model_output
(triples_text: str)
src/flashrag/refiner/kg_refiner.py:184
Functionpost_init
(self: "AutoModelForCausalLMWithValueHead", state_dict: dict[str, "torch.Tensor"])
LLaMA-Factory/src/llamafactory/train/test_utils.py:110
Functionpost_process_logits
(input_ids, logits, temperature, top_k, top_p)
src/verl/utils/torch_functional.py:395
Methodpostprocess_data
Get chunk data of this tp rank since we do all gather in preprocess.
src/verl/workers/sharding_manager/fsdp_vllm.py:167
Methodpostprocess_data
(self, data: DataProto)
src/verl/workers/sharding_manager/fsdp_sglang.py:140
Methodpostprocess_data
Split the data to follow FSDP partition
src/verl/workers/sharding_manager/fsdp_ulysses.py:70
Methodpostprocess_data
(self, data: DataProto)
src/verl/workers/sharding_manager/megatron_vllm.py:459
Methodpp_group
(self)
src/verl/workers/sharding_manager/megatron_vllm.py:225
Methodpp_models
(self)
src/verl/workers/sharding_manager/megatron_vllm.py:229
Methodpp_rank
(self)
src/verl/workers/sharding_manager/megatron_vllm.py:221
Methodpp_size
(self)
src/verl/single_controller/base/megatron/worker_group.py:46
Methodpp_size
(self)
src/verl/workers/sharding_manager/megatron_vllm.py:217
Methodprediction_step
r"""Remove the prompt part in the generated tokens. Subclass and override to inject custom behavior.
LLaMA-Factory/src/llamafactory/train/sft/trainer.py:120
Functionprepare_decoder_attention_mask
(attention_mask, input_shape, inputs_embeds)
src/verl/utils/torch_functional.py:470
Methodpreprocess_data
All gather across tp group to make each rank has identical input.
src/verl/workers/sharding_manager/fsdp_vllm.py:153
Methodpreprocess_data
All gather across tp group to make each rank has identical input.
src/verl/workers/sharding_manager/fsdp_sglang.py:129
Methodpreprocess_data
AllGather data from sp region This is because the data is first sharded along the FSDP dimension as we utilize the DP_COMPUTE
src/verl/workers/sharding_manager/fsdp_ulysses.py:57
Methodpreprocess_data
(self, data: DataProto)
src/verl/workers/sharding_manager/megatron_vllm.py:450
Functionprev_page
(page_index: int)
LLaMA-Factory/src/llamafactory/webui/components/data.py:34
Methodpreview_eval
(self, data)
LLaMA-Factory/src/llamafactory/webui/runner.py:395
Methodpreview_train
(self, data)
LLaMA-Factory/src/llamafactory/webui/runner.py:392
Functionprint_hello
()
LLaMA-Factory/src/llamafactory/v1/utils/plugin.py:86
Methodprint_size
(self, prefix="")
src/verl/protocol.py:263
Functionprocess
(iter)
src/verl/utils/debug/trajectory_tracker.py:94
Functionprocess_image
(content_dict)
src/flashrag/generator/utils.py:91
Functionprocess_item
(reward_fn, data_source, response_lst, reward_data)
src/verl/trainer/main_eval.py:63
Methodprocess_retriever
(retriever)
src/flashrag/retriever/retriever.py:660
Methodproducer
()
LLaMA-Factory/src/llamafactory/chat/kt_engine.py:193
Functionput_data
(index, data)
src/verl/utils/ray_utils.py:25
Functionpytest_collection_modifyitems
Modify test collection based on markers and environment.
LLaMA-Factory/tests_v1/conftest.py:107
Functionpytest_collection_modifyitems
Modify test collection based on markers and environment.
LLaMA-Factory/tests/conftest.py:107
Functionpytest_configure
Register custom pytest markers.
LLaMA-Factory/tests_v1/conftest.py:33
Functionpytest_configure
Register custom pytest markers.
LLaMA-Factory/tests/conftest.py:33
Functionquantize_loftq
r"""Initialize LoRA weights with LoRA-fine-tuning-aware Quantization (LoftQ). Usage: python loftq_init.py --model_name_or_path path_to_model --ou
LLaMA-Factory/scripts/loftq_init.py:30
Functionquantize_pissa
r"""Initialize LoRA weights with Principal Singular values and Singular vectors Adaptation (PiSSA). Usage: python pissa_init.py --model_name_or_p
LLaMA-Factory/scripts/pissa_init.py:30
Methodquestion
(self)
src/flashrag/dataset/dataset.py:152
Functionqwen2_attn_forward
Adapted from transformers 4.49.0 to support Ulysses sequence parallelism for transformers >= 4.48.0. NOTE: This function has been tested
src/verl/models/transformers/qwen2.py:148
Functionqwen2_flash_attn_forward
Adapted from transformers 4.47.1 to support Ulysses sequence parallelism. NOTE: This function is only tested on transformers versions bet
src/verl/models/transformers/qwen2.py:29
Methodqwen3moe_sparse_moe_block_forward
(self, hidden_states: torch.Tensor)
LLaMA-Factory/src/llamafactory/v1/plugins/model_plugins/kernels/mlp/npu_fused_moe.py:155
Functionre_call
(args, config_dict)
scripts/evaluation/run_eval.py:74
Functionread_jsonl
(file_path)
src/flashrag/retriever/utils.py:137
Methodrecover
( self, original_prompt: str, compressed_prompt: str, response: str,
src/flashrag/refiner/llmlingua_compressor.py:1743
Functionregister
(dispatch_mode=Dispatch.ALL_TO_ALL, execute_mode=Execute.ALL, blocking=True, materialize_futures=True)
src/verl/single_controller/base/decorator.py:399
Functionregister_empty_parameter
(module, name, param)
src/verl/utils/fsdp_utils.py:188
Functionremove_boxed
(s)
src/verl/utils/reward_score/prime_math/__init__.py:323
Functionremove_handler
Remove a handler to the root logger.
LLaMA-Factory/src/llamafactory/v1/utils/logging.py:99
Functionremove_handler
r"""Remove a handler to the root logger.
LLaMA-Factory/src/llamafactory/extras/logging.py:135
Functionremove_pad_token
Remove the pad token. Args: input_ids shape: [bs, seq_length] attention_mask shape: [bs, seq_length] Returns:
src/verl/utils/torch_functional.py:305
Methodrename
Note that this function only rename the key in the batch
src/verl/protocol.py:516
Functionrequires_accelerator
Decorator to check if torch.accelerator is available. Note: this api requires torch>=2.7.0, otherwise it will raise an AttributeError or RuntimeE
LLaMA-Factory/src/llamafactory/v1/accelerator/helper.py:59
Functionrerank_manager
Decorator used for reranking retrieved documents.
src/flashrag/retriever/retriever.py:94
Methodresume
r"""Get the initial value of gradio components and restores training status if necessary.
LLaMA-Factory/src/llamafactory/webui/engine.py:49
Methodresume_dataset_state
(self)
src/verl/utils/dataset/rl_dataset.py:161
Functionretry
(max: int=10, sleep: int=1)
src/flashrag/generator/generator.py:276
Functionretry
(max: int=10, sleep: int=1)
src/flashrag/retriever/retriever.py:432
Functionretry
(max: int=10, sleep: int=1)
src/re_call/inference/re_call.py:8
Functionretry
(max: int=10, sleep: int=1, logger: logging.Logger=None)
scripts/evaluation/utils.py:28
Methodrun
(self, dataset, do_eval=True, pred_process_fun=None)
src/flashrag/pipeline/branching_pipeline.py:34
Methodrun
(self, dataset, do_eval=True, pred_process_fun=None)
src/flashrag/pipeline/branching_pipeline.py:172
Methodrun
The overall inference process of a RAG framework.
src/flashrag/pipeline/mm_pipeline.py:19
Methodrun
(self, dataset, do_eval=True, perform_modality_dict=PERFORM_MODALITY_DICT, pred_process_func=None)
src/flashrag/pipeline/mm_pipeline.py:61
Methodrun
(self, dataset, do_eval=True, pred_process_fun=None)
src/flashrag/pipeline/pipeline.py:181
Methodrun
(self, dataset, do_eval=True, pred_process_fun=None)
src/flashrag/pipeline/pipeline.py:251
← previousnext →2,101–2,200 of 2,379, ranked by callers