MCPcopy Create free account

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

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

↓ 1 callersMethodcompress_prompt_llmlingua2
Compresses the given context, instruction and question. Args: context (List[str]): List of context strings that form
src/flashrag/refiner/llmlingua_compressor.py:825
↓ 1 callersFunctioncompute_advantage
(data: DataProto, adv_estimator, gamma=1.0, lam=1.0, num_repeat=1)
src/verl/trainer/ppo/ray_trainer.py:177
↓ 1 callersFunctioncompute_data_metrics
(batch: DataProto, use_critic: bool = True)
src/verl/trainer/ppo/metric_utils.py:48
↓ 1 callersFunctioncompute_device_flops
r"""Calculate the FLOPs of the device capability per second.
LLaMA-Factory/scripts/stat_utils/cal_mfu.py:86
↓ 1 callersMethodcompute_log_prob
(self, data: DataProto)
src/verl/workers/megatron_workers.py:455
↓ 1 callersMethodcompute_log_prob
(self, data: DataProto)
src/verl/workers/fsdp_workers.py:540
↓ 1 callersMethodcompute_log_prob
Compute logits given a batch of data. Args: data (DataProto): a batch of data represented by DataProto. It must contain key ``
src/verl/workers/actor/base.py:39
↓ 1 callersFunctioncompute_model_flops
r"""Calculate the FLOPs of model per forward/backward pass.
LLaMA-Factory/scripts/stat_utils/cal_mfu.py:29
↓ 1 callersMethodcompute_preference_loss
r"""Compute loss for preference learning.
LLaMA-Factory/src/llamafactory/train/dpo/trainer.py:179
↓ 1 callersMethodcompute_ref_log_prob
(self, data: DataProto)
src/verl/workers/fsdp_workers.py:574
↓ 1 callersMethodcompute_reference_log_probs
r"""Compute log probabilities of the reference model.
LLaMA-Factory/src/llamafactory/train/kto/trainer.py:187
↓ 1 callersMethodcompute_reference_log_probs
r"""Compute log probabilities of the reference model.
LLaMA-Factory/src/llamafactory/train/dpo/trainer.py:240
↓ 1 callersMethodcompute_reward
Computing reward given input_ids. The transformers should output a tensor with shape [batch_size, sequence_length], and the value at [EOS]
src/verl/workers/reward_model/base.py:29
↓ 1 callersMethodcompute_rm_score
(self, data: DataProto)
src/verl/workers/fsdp_workers.py:1156
↓ 1 callersFunctioncompute_score
(solution_str, ground_truth)
src/verl/utils/reward_score/math.py:17
↓ 1 callersFunctioncompute_throughout_metrics
(batch: DataProto, timing_raw: Dict[str, float], n_gpus: int)
src/verl/trainer/ppo/metric_utils.py:160
↓ 1 callersFunctioncompute_timing_metrics
(batch: DataProto, timing_raw: Dict[str, float])
src/verl/trainer/ppo/metric_utils.py:136
↓ 1 callersMethodcompute_values
(self, data: DataProto)
src/verl/workers/fsdp_workers.py:831
↓ 1 callersFunctionconcat_dict_to_str
(dict: Dict, step)
src/verl/utils/logger/aggregate_logger.py:21
↓ 1 callersMethodconcate_segment_info
( self, segment_info: List[List[tuple]], )
src/flashrag/refiner/llmlingua_compressor.py:2078
↓ 1 callersFunctionconfigure_attn_implementation
(config: "PretrainedConfig", model_args: "ModelArguments")
LLaMA-Factory/src/llamafactory/model/model_utils/attention.py:31
↓ 1 callersFunctionconfigure_kv_cache
(config: "PretrainedConfig", model_args: "ModelArguments", is_trainable: bool)
LLaMA-Factory/src/llamafactory/model/model_utils/kv_cache.py:29
↓ 1 callersFunctionconfigure_longlora
(config: "PretrainedConfig", model_args: "ModelArguments", is_trainable: bool)
LLaMA-Factory/src/llamafactory/model/model_utils/longlora.py:359
↓ 1 callersFunctionconfigure_moe
(config: "PretrainedConfig", model_args: "ModelArguments", is_trainable: bool)
LLaMA-Factory/src/llamafactory/model/model_utils/moe.py:141
↓ 1 callersFunctionconfigure_packing
(model_args: "ModelArguments", is_trainable: bool)
LLaMA-Factory/src/llamafactory/model/model_utils/packing.py:110
↓ 1 callersFunctionconfigure_quantization
r"""Priority: PTQ-quantized (train/infer) > AutoGPTQ (export) > On-the-fly quantization (train/infer).
LLaMA-Factory/src/llamafactory/model/model_utils/quantization.py:82
↓ 1 callersFunctionconfigure_rope
(config: "PretrainedConfig", model_args: "ModelArguments")
LLaMA-Factory/src/llamafactory/model/model_utils/rope.py:35
↓ 1 callersFunctionconfigure_visual_model
r"""Patch VLMs before loading them.
LLaMA-Factory/src/llamafactory/model/model_utils/visual.py:148
↓ 1 callersMethodcontrol_context_budget
( self, context: List[str], context_tokens_length: List[int], target_token
src/flashrag/refiner/llmlingua_compressor.py:1223
↓ 1 callersMethodcontrol_sentence_budget
( self, context: List[str], target_token: float, keep_first_sentence: int
src/flashrag/refiner/llmlingua_compressor.py:1288
↓ 1 callersMethodconvert_candidate_triples_to_choices
(self, candidates)
src/flashrag/refiner/kg_refiner.py:289
↓ 1 callersFunctionconvert_gate_up_shard
(full_tensor, gate_name, up_name)
src/verl/utils/megatron_utils.py:364
↓ 1 callersFunctionconvert_mca_to_hf
Convert megatron checkpoint to HuggingFace format. Args: checkpoint_path: Path to the checkpoint to convert output_path: Path to
LLaMA-Factory/scripts/megatron_merge.py:31
↓ 1 callersFunctionconvert_megatron_model_to_transformers_model
Convert megatron model to transformers model.
src/verl/utils/megatron_utils.py:307
↓ 1 callersFunctionconvert_numpy
(data: Any)
src/flashrag/dataset/utils.py:6
↓ 1 callersFunctionconvert_numpy
Recursively convert numpy objects in nested dictionaries or lists to native Python types.
src/flashrag/retriever/utils.py:11
↓ 1 callersFunctionconvert_pretrained_model_to_mod
( model: "PreTrainedModel", config: "PretrainedConfig", model_args: "ModelArguments" )
LLaMA-Factory/src/llamafactory/model/model_utils/mod.py:32
↓ 1 callersFunctionconvert_qkv_shard
(full_tensor, q_name, k_name, v_name)
src/verl/utils/megatron_utils.py:316
↓ 1 callersFunctionconvert_to_regular_types
Convert Hydra configs and other special types to regular Python types.
src/verl/trainer/fsdp_sft_trainer.py:67
↓ 1 callersFunctioncount_unknown_letters_in_expr
(expr: str)
src/verl/utils/reward_score/prime_math/__init__.py:216
↓ 1 callersFunctioncreate_chat_completion_response
( request: "ChatCompletionRequest", chat_model: "ChatModel" )
LLaMA-Factory/src/llamafactory/api/chat.py:190
↓ 1 callersFunctioncreate_colocated_worker_cls
This function should return a class instance that delegates the calls to every cls in cls_dict
src/verl/single_controller/ray/base.py:460
↓ 1 callersFunctioncreate_ds_config
r"""Create deepspeed config in the current directory.
LLaMA-Factory/src/llamafactory/webui/common.py:228
↓ 1 callersFunctioncreate_eval_tab
(engine: "Engine")
LLaMA-Factory/src/llamafactory/webui/components/eval.py:33
↓ 1 callersFunctioncreate_export_tab
(engine: "Engine")
LLaMA-Factory/src/llamafactory/webui/components/export.py:118
↓ 1 callersFunctioncreate_footer
()
LLaMA-Factory/src/llamafactory/webui/components/footer.py:39
↓ 1 callersFunctioncreate_fp8_kwargs
Create AORecipeKwargs for FP8 training with HuggingFace Accelerate. Args: model_args: Model arguments containing FP8 configuration R
LLaMA-Factory/src/llamafactory/train/fp8_utils.py:26
↓ 1 callersFunctioncreate_huggingface_actor
Args: model_name: override_config_kwargs: Returns:
src/verl/utils/model.py:75
↓ 1 callersFunctioncreate_infer_tab
(engine: "Engine")
LLaMA-Factory/src/llamafactory/webui/components/infer.py:32
↓ 1 callersMethodcreate_optimizer
( self, model: "AutoModelForCausalLMWithValueHead", training_args: "Seq2SeqTrainingArg
LLaMA-Factory/src/llamafactory/train/ppo/trainer.py:298
↓ 1 callersMethodcreate_resource_pool
(self)
src/verl/trainer/ppo/ray_trainer.py:88
↓ 1 callersFunctioncreate_reward_model
r"""Create reward model for PPO training.
LLaMA-Factory/src/llamafactory/train/trainer_utils.py:149
↓ 1 callersMethodcreate_scheduler
( self, training_args: "Seq2SeqTrainingArguments", num_training_steps: int, optimizer: "torch.optim.Op
LLaMA-Factory/src/llamafactory/train/ppo/trainer.py:325
↓ 1 callersFunctioncreate_score_evaluation_response
( request: "ScoreEvaluationRequest", chat_model: "ChatModel" )
LLaMA-Factory/src/llamafactory/api/chat.py:283
↓ 1 callersFunctioncreate_stream_chat_completion_response
( request: "ChatCompletionRequest", chat_model: "ChatModel" )
LLaMA-Factory/src/llamafactory/api/chat.py:244
↓ 1 callersFunctioncreate_top
()
LLaMA-Factory/src/llamafactory/webui/components/top.py:33
↓ 1 callersFunctioncreate_train_tab
(engine: "Engine")
LLaMA-Factory/src/llamafactory/webui/components/train.py:37
↓ 1 callersFunctioncreate_web_demo
()
LLaMA-Factory/src/llamafactory/webui/interface.py:73
↓ 1 callersFunctioncreate_worker_group_register_center
(name, info)
src/verl/single_controller/base/register_center/ray.py:28
↓ 1 callersFunctioncustom_compare_
(output, ground_truth)
src/verl/utils/reward_score/prime_code/testing_util.py:595
↓ 1 callersMethoddefault_tp_concat_fn
name: name of the parameter param: training parameters infer_params (Iterable[torch.Tensor]): a iterator towards list of p
src/verl/workers/sharding_manager/megatron_vllm.py:309
↓ 1 callersFunctiondetect_redundancy
(response)
src/verl/utils/reward_score/re_call.py:198
↓ 1 callersFunctiondetect_redundancy
(response)
src/verl/workers/rollout/vllm_rollout/generate_new_prompts.py:127
↓ 1 callersMethoddetect_redundancy
(self, data)
scripts/data_construction/detect_redundancy.py:45
↓ 1 callersFunctiondiscover_kernels
Discover and return all kernel classes registered for the current device. This function inspects the runtime environment (device type) and return
LLaMA-Factory/src/llamafactory/v1/plugins/model_plugins/kernels/registry.py:187
↓ 1 callersMethoddispatch_fn
(x, i, chunks)
src/verl/protocol.py:741
↓ 1 callersFunctiondispatch_megatron_compute
User passes in dp data. The data is dispatched to all tp/pp ranks with the same dp
src/verl/single_controller/base/decorator.py:74
↓ 1 callersFunctiondispatch_megatron_pp_as_dp
treat pp as dp.
src/verl/single_controller/base/decorator.py:161
↓ 1 callersFunctiondist_env
Set distributed environment variables.
LLaMA-Factory/src/llamafactory/v1/utils/pytest.py:20
↓ 1 callersFunctiondownload_files_distributed
(download_fn)
src/verl/utils/dataset/rm_dataset.py:27
↓ 1 callersFunctiondump_data
(data, name)
src/verl/utils/debug/trajectory_tracker.py:69
↓ 1 callersFunctiondump_layernorm
r"""Dump the layernorm parameters in the model. The model is already unwrapped (and gathered).
LLaMA-Factory/src/llamafactory/train/ppo/ppo_utils.py:65
↓ 1 callersMethoddynamic_preprocess
(self, image, min_num=1, max_num=12, image_size=448, use_thumbnail=False)
src/flashrag/generator/multimodal_generator.py:190
↓ 1 callersMethodencode
(self, query_list: List[str], batch_size=64, modal="image")
src/flashrag/retriever/encoder.py:193
↓ 1 callersMethodencode_all
(self)
src/flashrag/retriever/index_builder.py:232
↓ 1 callersMethodencode_all_clip
(self)
src/flashrag/retriever/index_builder.py:243
↓ 1 callersMethodencode_passages
(self, batch_text_passages: List[List[str]])
src/flashrag/generator/generator.py:86
↓ 1 callersFunctionevaluate_search
(question, response, golden_answer)
src/verl/utils/reward_score/re_call.py:152
↓ 1 callersFunctionevaluate_search
(question, response, ground_truth)
src/verl/workers/rollout/vllm_rollout/generate_new_prompts.py:24
↓ 1 callersMethodevaluate_search
(self, data)
scripts/data_construction/process_reward.py:28
↓ 1 callersFunctionexecute
(func, input_list_or_num_samples: Union[list, int], output_path: str, max_workers: int, logger: logging.Logger
scripts/evaluation/utils.py:10
↓ 1 callersMethodextract_document_triples
Extract triples from documents associated with each query, handling duplicates and generating prompts for LLM processing.
src/flashrag/refiner/kg_refiner.py:219
↓ 1 callersMethodextract_judge_score
(answer: str, split_str: str = "Total rating:")
src/flashrag/evaluator/metrics.py:552
↓ 1 callersMethodextract_last_assistant_response
(self, text: str)
src/flashrag/pipeline/active_pipeline.py:79
↓ 1 callersFunctionextract_solution
(solution_str, method='strict')
src/verl/utils/reward_score/gsm8k.py:18
↓ 1 callersFunctionfactory
(name_or_path)
src/flashrag/pipeline/replug_utils.py:232
↓ 1 callersFunctionfetch_search_results
(query)
src/re_call/inference/serper_test.py:7
↓ 1 callersFunctionfind_available_port
Find an available port on the local machine.
LLaMA-Factory/src/llamafactory/v1/utils/env.py:19
↓ 1 callersFunctionfind_available_port
r"""Find an available port on the local machine.
LLaMA-Factory/src/llamafactory/extras/misc.py:320
↓ 1 callersMethodfind_closest_aspect_ratio
(self, aspect_ratio, target_ratios, width, height, image_size)
src/flashrag/generator/multimodal_generator.py:175
↓ 1 callersFunctionfind_latest_ckpt_path
(path, directory_format="global_step_{}")
src/verl/utils/checkpoint/checkpoint_manager.py:124
↓ 1 callersMethodfit
(self)
src/verl/trainer/fsdp_sft_trainer.py:452
↓ 1 callersMethodfit
The training loop of PPO. The driver process only need to call the compute functions of the worker group through RPC to construct t
src/verl/trainer/ppo/ray_trainer.py:799
↓ 1 callersFunctionfix_a_slash_b
(string)
src/verl/utils/reward_score/math.py:125
↓ 1 callersFunctionfix_fracs
(string)
src/verl/utils/reward_score/math.py:93
↓ 1 callersFunctionfix_sqrt
(string)
src/verl/utils/reward_score/math.py:150
↓ 1 callersFunctionflash_attention_forward
Patches flash attention forward to handle 3D position ids in mrope. (3, batch_size, seq_length)
src/verl/models/transformers/qwen2_vl.py:150
↓ 1 callersMethodflush
(self)
src/verl/utils/logger/aggregate_logger.py:37
↓ 1 callersMethodformat_evidences
(self, evidences: List[str])
src/flashrag/pipeline/active_pipeline.py:1251
↓ 1 callersFunctionformat_intervals
(prediction)
src/verl/utils/reward_score/prime_math/grader.py:358
← previousnext →801–900 of 2,379, ranked by callers