Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RUC-NLPIR/SmartSearch
/ functions
Functions
2,379 in github.com/RUC-NLPIR/SmartSearch
⨍
Functions
2,379
◇
Types & classes
411
↳
Endpoints
33
Function
merge_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
Function
merge_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
Function
merge_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
Function
merge_resource_pool
(rp1: RayResourcePool, rp2: RayResourcePool)
src/verl/single_controller/ray/base.py:135
Function
meta_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
Method
model_mesh_dim_names
Model parallel mesh dimension names.
LLaMA-Factory/src/llamafactory/v1/accelerator/interface.py:90
Method
model_mesh_shape
Model parallel mesh shape.
LLaMA-Factory/src/llamafactory/v1/accelerator/interface.py:85
Function
module_filter_func
(module, layer_name)
LLaMA-Factory/src/llamafactory/train/fp8_utils.py:62
Method
mul_reduce
(a, b)
src/verl/utils/megatron/tensor_parallel.py:106
Method
multi_gpu_encode
(self, query_list: Union[List[str], str], batch_size=None, is_query=True)
src/flashrag/retriever/encoder.py:128
Method
multi_gpu_encode
(self, query_list: Union[List[str], str], batch_size=64, is_query=True)
src/flashrag/retriever/encoder.py:203
Function
naive
(args, config_dict)
scripts/evaluation/run_eval.py:5
Method
naive_run
(self, dataset, do_eval=True, pred_process_func=None)
src/flashrag/pipeline/mm_pipeline.py:47
Method
name
Plugin name.
LLaMA-Factory/src/llamafactory/v1/config/arg_utils.py:27
Function
next_page
(page_index: int, total_num: int)
LLaMA-Factory/src/llamafactory/webui/components/data.py:38
Function
normalize_answer
(answer: Optional[str])
src/verl/utils/reward_score/prime_math/math_normalize.py:43
Method
npu_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
Method
npu_moe_sparse_block_forward
(self, hidden_states: torch.Tensor)
LLaMA-Factory/src/llamafactory/v1/plugins/model_plugins/kernels/mlp/npu_fused_moe.py:140
Method
on_evaluate
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:258
Method
on_init_end
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:225
Method
on_predict
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:263
Method
on_prediction_step
( self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs )
LLaMA-Factory/src/llamafactory/train/callbacks.py:309
Method
on_save
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:102
Method
on_substep_end
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:246
Method
on_train_begin
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:132
Method
on_train_begin
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:356
Method
on_train_end
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:123
Method
on_train_end
(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs)
LLaMA-Factory/src/llamafactory/train/callbacks.py:144
Function
operate_tensorlike
Operate tensorlike data on current accelerator.
LLaMA-Factory/src/llamafactory/v1/accelerator/helper.py:147
Function
optimizer_hook
(param: "torch.nn.Parameter")
LLaMA-Factory/src/llamafactory/train/trainer_utils.py:262
Method
output
(self)
src/flashrag/dataset/dataset.py:164
Function
pad_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
Method
pad_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
Function
pair_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
Function
parallel_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
Function
parallel_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
Function
parallel_put
(data_list, max_workers=None)
src/verl/utils/ray_utils.py:23
Method
parse_model_output
(triples_text: str)
src/flashrag/refiner/kg_refiner.py:184
Function
post_init
(self: "AutoModelForCausalLMWithValueHead", state_dict: dict[str, "torch.Tensor"])
LLaMA-Factory/src/llamafactory/train/test_utils.py:110
Function
post_process_logits
(input_ids, logits, temperature, top_k, top_p)
src/verl/utils/torch_functional.py:395
Method
postprocess_data
Get chunk data of this tp rank since we do all gather in preprocess.
src/verl/workers/sharding_manager/fsdp_vllm.py:167
Method
postprocess_data
(self, data: DataProto)
src/verl/workers/sharding_manager/fsdp_sglang.py:140
Method
postprocess_data
Split the data to follow FSDP partition
src/verl/workers/sharding_manager/fsdp_ulysses.py:70
Method
postprocess_data
(self, data: DataProto)
src/verl/workers/sharding_manager/megatron_vllm.py:459
Method
pp_group
(self)
src/verl/workers/sharding_manager/megatron_vllm.py:225
Method
pp_models
(self)
src/verl/workers/sharding_manager/megatron_vllm.py:229
Method
pp_rank
(self)
src/verl/workers/sharding_manager/megatron_vllm.py:221
Method
pp_size
(self)
src/verl/single_controller/base/megatron/worker_group.py:46
Method
pp_size
(self)
src/verl/workers/sharding_manager/megatron_vllm.py:217
Method
prediction_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
Function
prepare_decoder_attention_mask
(attention_mask, input_shape, inputs_embeds)
src/verl/utils/torch_functional.py:470
Method
preprocess_data
All gather across tp group to make each rank has identical input.
src/verl/workers/sharding_manager/fsdp_vllm.py:153
Method
preprocess_data
All gather across tp group to make each rank has identical input.
src/verl/workers/sharding_manager/fsdp_sglang.py:129
Method
preprocess_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
Method
preprocess_data
(self, data: DataProto)
src/verl/workers/sharding_manager/megatron_vllm.py:450
Function
prev_page
(page_index: int)
LLaMA-Factory/src/llamafactory/webui/components/data.py:34
Method
preview_eval
(self, data)
LLaMA-Factory/src/llamafactory/webui/runner.py:395
Method
preview_train
(self, data)
LLaMA-Factory/src/llamafactory/webui/runner.py:392
Function
print_hello
()
LLaMA-Factory/src/llamafactory/v1/utils/plugin.py:86
Method
print_size
(self, prefix="")
src/verl/protocol.py:263
Function
process
(iter)
src/verl/utils/debug/trajectory_tracker.py:94
Function
process_image
(content_dict)
src/flashrag/generator/utils.py:91
Function
process_item
(reward_fn, data_source, response_lst, reward_data)
src/verl/trainer/main_eval.py:63
Method
process_retriever
(retriever)
src/flashrag/retriever/retriever.py:660
Method
producer
()
LLaMA-Factory/src/llamafactory/chat/kt_engine.py:193
Function
put_data
(index, data)
src/verl/utils/ray_utils.py:25
Function
pytest_collection_modifyitems
Modify test collection based on markers and environment.
LLaMA-Factory/tests_v1/conftest.py:107
Function
pytest_collection_modifyitems
Modify test collection based on markers and environment.
LLaMA-Factory/tests/conftest.py:107
Function
pytest_configure
Register custom pytest markers.
LLaMA-Factory/tests_v1/conftest.py:33
Function
pytest_configure
Register custom pytest markers.
LLaMA-Factory/tests/conftest.py:33
Function
quantize_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
Function
quantize_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
Method
question
(self)
src/flashrag/dataset/dataset.py:152
Function
qwen2_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
Function
qwen2_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
Method
qwen3moe_sparse_moe_block_forward
(self, hidden_states: torch.Tensor)
LLaMA-Factory/src/llamafactory/v1/plugins/model_plugins/kernels/mlp/npu_fused_moe.py:155
Function
re_call
(args, config_dict)
scripts/evaluation/run_eval.py:74
Function
read_jsonl
(file_path)
src/flashrag/retriever/utils.py:137
Method
recover
( self, original_prompt: str, compressed_prompt: str, response: str,
src/flashrag/refiner/llmlingua_compressor.py:1743
Function
register
(dispatch_mode=Dispatch.ALL_TO_ALL, execute_mode=Execute.ALL, blocking=True, materialize_futures=True)
src/verl/single_controller/base/decorator.py:399
Function
register_empty_parameter
(module, name, param)
src/verl/utils/fsdp_utils.py:188
Function
remove_boxed
(s)
src/verl/utils/reward_score/prime_math/__init__.py:323
Function
remove_handler
Remove a handler to the root logger.
LLaMA-Factory/src/llamafactory/v1/utils/logging.py:99
Function
remove_handler
r"""Remove a handler to the root logger.
LLaMA-Factory/src/llamafactory/extras/logging.py:135
Function
remove_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
Method
rename
Note that this function only rename the key in the batch
src/verl/protocol.py:516
Function
requires_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
Function
rerank_manager
Decorator used for reranking retrieved documents.
src/flashrag/retriever/retriever.py:94
Method
resume
r"""Get the initial value of gradio components and restores training status if necessary.
LLaMA-Factory/src/llamafactory/webui/engine.py:49
Method
resume_dataset_state
(self)
src/verl/utils/dataset/rl_dataset.py:161
Function
retry
(max: int=10, sleep: int=1)
src/flashrag/generator/generator.py:276
Function
retry
(max: int=10, sleep: int=1)
src/flashrag/retriever/retriever.py:432
Function
retry
(max: int=10, sleep: int=1)
src/re_call/inference/re_call.py:8
Function
retry
(max: int=10, sleep: int=1, logger: logging.Logger=None)
scripts/evaluation/utils.py:28
Method
run
(self, dataset, do_eval=True, pred_process_fun=None)
src/flashrag/pipeline/branching_pipeline.py:34
Method
run
(self, dataset, do_eval=True, pred_process_fun=None)
src/flashrag/pipeline/branching_pipeline.py:172
Method
run
The overall inference process of a RAG framework.
src/flashrag/pipeline/mm_pipeline.py:19
Method
run
(self, dataset, do_eval=True, perform_modality_dict=PERFORM_MODALITY_DICT, pred_process_func=None)
src/flashrag/pipeline/mm_pipeline.py:61
Method
run
(self, dataset, do_eval=True, pred_process_fun=None)
src/flashrag/pipeline/pipeline.py:181
Method
run
(self, dataset, do_eval=True, pred_process_fun=None)
src/flashrag/pipeline/pipeline.py:251
← previous
next →
2,101–2,200 of 2,379, ranked by callers