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
↓ 4 callers
Method
_update_dict
(old_dict: dict, new_dict: dict)
src/flashrag/config/config.py:56
↓ 4 callers
Function
apply_kernel
Call the MetaKernel's `apply` to perform the replacement. Corresponding replacement logic is maintained inside each kernel; the only requirem
LLaMA-Factory/src/llamafactory/v1/plugins/model_plugins/kernels/registry.py:232
↓ 4 callers
Function
apply_monkey_patch
Replace _flash_attention_forward to _ulysses_flash_attention_forward
src/verl/models/transformers/monkey_patch.py:110
↓ 4 callers
Function
broadcast_dict_tensor
TODO: optimize this. Technically, we only need one broadcast
src/verl/utils/torch_functional.py:182
↓ 4 callers
Function
build_memory_reference_from_module
(module: torch.nn.Module, memory_buffers: Dict[torch.dtype, MemoryBuff
src/verl/utils/memory_buffer.py:100
↓ 4 callers
Function
calculate_pixels
r"""Calculate the number of pixels from the expression.
LLaMA-Factory/src/llamafactory/webui/common.py:220
↓ 4 callers
Method
chat
r"""Get a list of responses of the chat model.
LLaMA-Factory/src/llamafactory/chat/chat_model.py:91
↓ 4 callers
Method
compress_prompt
Compresses the given context. Args: context (List[str]): List of context strings that form the basis of the prompt.
src/flashrag/refiner/llmlingua_compressor.py:552
↓ 4 callers
Function
compute_position_id_with_mask
(mask)
src/verl/utils/model.py:194
↓ 4 callers
Method
estimate_flops
Estimate the FLOPS based on the number of valid tokens in the current batch and the time taken. Args: batch_seqlens
src/verl/utils/flops_counter.py:164
↓ 4 callers
Method
execute_rank_zero_async
(self, method_name: str, *args, **kwargs)
src/verl/single_controller/ray/base.py:362
↓ 4 callers
Method
finish
(self)
src/verl/utils/tracking.py:134
↓ 4 callers
Method
generate
(self)
LLaMA-Factory/src/llamafactory/v1/core/chat_sampler.py:26
↓ 4 callers
Method
generate_sequences
Generate sequences
src/verl/workers/rollout/base.py:35
↓ 4 callers
Function
get_args
Parse arguments from command line or config file.
LLaMA-Factory/src/llamafactory/v1/config/arg_parser.py:48
↓ 4 callers
Method
get_elem_list
r"""Return the list of all elements.
LLaMA-Factory/src/llamafactory/webui/manager.py:37
↓ 4 callers
Function
get_fsdp_wrap_policy
Get FSDP wrap policy for the module. Args: module: The module to get wrap policy for config: Configuration for wrap polic
src/verl/utils/fsdp_utils.py:54
↓ 4 callers
Function
get_infer_args
(args: dict[str, Any] | list[str] | None = None)
LLaMA-Factory/src/llamafactory/hparams/parser.py:476
↓ 4 callers
Function
get_micro_data_parallel_group
()
src/verl/workers/sharding_manager/megatron_vllm.py:476
↓ 4 callers
Method
get_placement_groups
(self, strategy="STRICT_PACK", name=None)
src/verl/single_controller/ray/base.py:85
↓ 4 callers
Function
get_plugin_config
Get the plugin configuration from the argument value. Args: config: The argument value to get the plugin configuration from. Returns
LLaMA-Factory/src/llamafactory/v1/config/arg_utils.py:76
↓ 4 callers
Method
get_resource_pool
Get the resource pool of the worker_cls
src/verl/trainer/ppo/ray_trainer.py:101
↓ 4 callers
Function
init_adapter
r"""Initialize the adapters. Support full-parameter, freeze and LoRA training. Note that the trainable parameters must be cast to float32.
LLaMA-Factory/src/llamafactory/model/adapter.py:321
↓ 4 callers
Function
is_digit
(s)
src/verl/utils/reward_score/prime_math/grader.py:107
↓ 4 callers
Function
is_mcore_adapter_available
()
LLaMA-Factory/src/llamafactory/extras/packages.py:73
↓ 4 callers
Function
print_model_size
(model: nn.Module, name: str = None)
src/verl/utils/model.py:146
↓ 4 callers
Function
resolve_max_tokens
Resolve and validate max_tokens parameters from both params and generation_params. Args: params: Dictionary containing user-prov
src/flashrag/generator/utils.py:4
↓ 4 callers
Function
rotate_half
Rotates half the hidden dims of the input.
src/verl/models/qwen2/megatron/layers/parallel_attention.py:116
↓ 4 callers
Function
rotate_half
Rotates half the hidden dims of the input.
src/verl/models/llama/megatron/layers/parallel_attention.py:148
↓ 4 callers
Method
save_checkpoint
(self, step)
src/verl/trainer/fsdp_sft_trainer.py:434
↓ 4 callers
Method
save_faiss_index
( self, all_embeddings, faiss_type, index_save_path, )
src/flashrag/retriever/index_builder.py:336
↓ 4 callers
Method
shared_embedding_or_output_weight
(self)
src/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:603
↓ 4 callers
Function
use_modelscope
()
LLaMA-Factory/src/llamafactory/extras/misc.py:304
↓ 4 callers
Function
use_openmind
()
LLaMA-Factory/src/llamafactory/extras/misc.py:308
↓ 3 callers
Method
__init__
(self, config)
src/flashrag/generator/fid.py:13
↓ 3 callers
Method
__init__
(self, config, prompt_template=None)
src/flashrag/pipeline/pipeline.py:14
↓ 3 callers
Method
__init__
(self)
src/verl/single_controller/ray/base.py:482
↓ 3 callers
Method
__init__
(self, dim, max_position_embeddings=2048, base=10000, device=None)
src/verl/models/qwen2/megatron/layers/parallel_attention.py:37
↓ 3 callers
Method
_batch_search
(self, query, num, return_score)
src/flashrag/retriever/retriever.py:184
↓ 3 callers
Function
_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
src/verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader_depracated.py:181
↓ 3 callers
Function
_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
src/verl/models/mcore/loader.py:181
↓ 3 callers
Function
_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
src/verl/models/llama/megatron/checkpoint_utils/llama_loader_depracated.py:185
↓ 3 callers
Method
_build_param_references
(self, pp_rank, maintain_weight=False)
src/verl/workers/sharding_manager/megatron_vllm.py:107
↓ 3 callers
Function
_check_extra_dependencies
( model_args: "ModelArguments", finetuning_args: "FinetuningArguments", training_args: Optional["T
LLaMA-Factory/src/llamafactory/hparams/parser.py:154
↓ 3 callers
Function
_check_model_support
(model_args: ModelArguments)
LLaMA-Factory/src/llamafactory/train/mca/workflow.py:79
↓ 3 callers
Method
_close_thread_pool
(self)
LLaMA-Factory/src/llamafactory/train/callbacks.py:219
↓ 3 callers
Function
_concat_data_proto_or_future
(output: List)
src/verl/single_controller/base/decorator.py:129
↓ 3 callers
Function
_configure_library_root_logger
Configure root logger using a stdout stream handler with an explicit format.
LLaMA-Factory/src/llamafactory/v1/utils/logging.py:64
↓ 3 callers
Function
_configure_library_root_logger
r"""Configure root logger using a stdout stream handler with an explicit format.
LLaMA-Factory/src/llamafactory/extras/logging.py:100
↓ 3 callers
Method
_convert_data_sample
Convert dataset sample. Args: raw_sample (dict[str, Any]): Raw dataset sample. dataset_name (str): Dataset name.
LLaMA-Factory/src/llamafactory/v1/core/data_engine.py:108
↓ 3 callers
Function
_create_stream_chat_completion_chunk
( completion_id: str, model: str, delta: "ChatCompletionMessage", index: Optional[int] = 0,
LLaMA-Factory/src/llamafactory/api/chat.py:178
↓ 3 callers
Function
_data_collator_wrapper
(data_collator: Any)
LLaMA-Factory/src/llamafactory/train/mca/workflow.py:59
↓ 3 callers
Function
_fetch_tp_shard_tensor
fetch tensor in tp shards
src/verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:122
↓ 3 callers
Function
_fetch_tp_shard_tensor
fetch tensor in tp shards
src/verl/models/llama/megatron/checkpoint_utils/llama_loader.py:126
↓ 3 callers
Function
_get_gpt_model
(model)
src/verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:85
↓ 3 callers
Function
_get_gpt_model
(model)
src/verl/models/mcore/saver.py:98
↓ 3 callers
Function
_get_gpt_model
(model)
src/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:85
↓ 3 callers
Function
_get_init_kwargs
r"""Get arguments to load config/tokenizer/model. Note: including inplace operation of model_args.
LLaMA-Factory/src/llamafactory/model/loader.py:56
↓ 3 callers
Function
_get_library_root_logger
()
LLaMA-Factory/src/llamafactory/v1/utils/logging.py:60
↓ 3 callers
Function
_get_library_root_logger
()
LLaMA-Factory/src/llamafactory/extras/logging.py:96
↓ 3 callers
Method
_initialize
r"""Validate the configuration.
LLaMA-Factory/src/llamafactory/webui/runner.py:74
↓ 3 callers
Method
_judge_input_modal
(self, query)
src/flashrag/retriever/retriever.py:498
↓ 3 callers
Method
_search
r"""Retrieve topk relevant documents in corpus. Return: list: contains information related to the document, including:
src/flashrag/retriever/retriever.py:171
↓ 3 callers
Method
_set_cos_sin_cache
(self, seq_len, device, dtype)
src/verl/models/llama/megatron/layers/parallel_attention.py:51
↓ 3 callers
Function
_set_env_vars
()
LLaMA-Factory/src/llamafactory/hparams/parser.py:109
↓ 3 callers
Function
_set_transformers_logging
()
LLaMA-Factory/src/llamafactory/hparams/parser.py:102
↓ 3 callers
Function
_str_is_int
(x: str)
src/verl/utils/reward_score/prime_math/__init__.py:111
↓ 3 callers
Method
_update_component
r"""Update gradio components according to the (elem_id, properties) mapping.
LLaMA-Factory/src/llamafactory/webui/engine.py:40
↓ 3 callers
Function
_verify_model_args
( model_args: "ModelArguments", data_args: "DataArguments", finetuning_args: "FinetuningArguments"
LLaMA-Factory/src/llamafactory/hparams/parser.py:117
↓ 3 callers
Function
all_gather_data_proto
(data: DataProto, process_group)
src/verl/protocol.py:764
↓ 3 callers
Method
backward
(ctx: Any, grad_output: Tensor)
src/verl/utils/ulysses.py:226
↓ 3 callers
Function
build_memory_buffer
Build the memory buffer given weight_buffer_meta Args: weight_buffer_meta: contains mapping from name to a dictionary containing shape
src/verl/utils/memory_buffer.py:71
↓ 3 callers
Function
calc_padded_numel
for cuda memory alignment, make sure alignment by 128-bits
src/verl/utils/memory_buffer.py:54
↓ 3 callers
Function
calculate_tps
r"""Calculate effective tokens per second.
LLaMA-Factory/src/llamafactory/extras/misc.py:104
↓ 3 callers
Function
change_name
(name: str, old_index: int, new_index: int)
LLaMA-Factory/scripts/llama_pro.py:36
↓ 3 callers
Function
check_lfi_path
Checks if a given path is vulnerable to LFI. Raises HTTPException if unsafe.
LLaMA-Factory/src/llamafactory/api/common.py:52
↓ 3 callers
Function
check_lora_model
(model: "LoraModel")
LLaMA-Factory/src/llamafactory/train/test_utils.py:45
↓ 3 callers
Function
check_ssrf_url
Checks if a given URL is vulnerable to SSRF. Raises HTTPException if unsafe.
LLaMA-Factory/src/llamafactory/api/common.py:70
↓ 3 callers
Function
compute_transformers_input_shapes
(batches, meta_info)
src/verl/utils/megatron/pipeline_parallel.py:22
↓ 3 callers
Function
convert_image_to_base64
(image)
src/flashrag/generator/utils.py:70
↓ 3 callers
Method
convert_tokens_to_string
Converts a sequence of tokens in a single string. The most simple way to do it is `" ".join(tokens)` but we often want to remove su
src/verl/workers/rollout/tokenizer.py:147
↓ 3 callers
Function
copy
r"""Works like shutil.copy() for file, and shutil.copytree for dir, and supports hdfs. Copy data and mode bits ("cp src dst"). Return the file'
src/verl/utils/hdfs_io.py:84
↓ 3 callers
Method
copyfrom
(cls, source: "Self", **kwargs)
LLaMA-Factory/src/llamafactory/hparams/model_args.py:570
↓ 3 callers
Function
create_device_mesh
(world_size, fsdp_size)
src/verl/workers/fsdp_workers.py:49
↓ 3 callers
Function
create_ref_model
r"""Create reference model for PPO/DPO training. Evaluation mode is not supported. The valuehead parameter is randomly initialized since it is us
LLaMA-Factory/src/llamafactory/train/trainer_utils.py:114
↓ 3 callers
Method
execute_all_sync
(self, method_name: str, *args, **kwargs)
src/verl/single_controller/ray/base.py:372
↓ 3 callers
Function
export_model
(args: Optional[dict[str, Any]] = None)
LLaMA-Factory/src/llamafactory/train/tuner.py:129
↓ 3 callers
Function
find_all_linear_modules
r"""Find all available modules to apply LoRA, GaLore or APOLLO.
LLaMA-Factory/src/llamafactory/model/model_utils/misc.py:28
↓ 3 callers
Function
fix_proxy
r"""Fix proxy settings for gradio ui.
LLaMA-Factory/src/llamafactory/extras/misc.py:329
↓ 3 callers
Function
fix_valuehead_checkpoint
r"""Fix the valuehead checkpoint files. The model is already unwrapped. There are three cases: 1. full tuning without ds_zero3: state_di
LLaMA-Factory/src/llamafactory/train/callbacks.py:53
↓ 3 callers
Method
format_example
r"""Convert dataset examples to messages.
LLaMA-Factory/src/llamafactory/eval/template.py:36
↓ 3 callers
Method
format_reference
(self, retrieval_result)
src/flashrag/pipeline/active_pipeline.py:958
↓ 3 callers
Method
generate
(self, input_list: list, batch_size=None, **params)
src/flashrag/generator/multimodal_generator.py:75
↓ 3 callers
Method
generate_sequence
(self, prompts: DataProto, **kwargs)
src/verl/workers/rollout/vllm_rollout/vllm_rollout_spmd.py:412
↓ 3 callers
Method
get_base_elems
r"""Get the base elements that are commonly used.
LLaMA-Factory/src/llamafactory/webui/manager.py:57
↓ 3 callers
Function
get_batch_logps
r"""Compute the log probabilities of the given labels under the given logits. Returns: logps: A tensor of shape (batch_size,) containing
LLaMA-Factory/src/llamafactory/train/trainer_utils.py:590
↓ 3 callers
Function
get_cosine_schedule_with_warmup
Create a schedule with a learning rate that decreases following the values of the cosine function between the initial lr set in the optimiz
src/verl/utils/torch_functional.py:415
↓ 3 callers
Function
get_default_kwargs_for_model_parallel_config
()
src/verl/utils/megatron/tensor_parallel.py:32
↓ 3 callers
Method
get_device_mesh
Get device mesh for specified dimension.
LLaMA-Factory/src/llamafactory/v1/accelerator/interface.py:168
↓ 3 callers
Function
get_eval_template
(name: str)
LLaMA-Factory/src/llamafactory/eval/template.py:60
← previous
next →
201–300 of 2,379, ranked by callers