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
↓ 2 callers
Method
_validate
(self)
src/verl/trainer/ppo/ray_trainer.py:505
↓ 2 callers
Method
achat
r"""Asynchronously get a list of responses of the chat model.
LLaMA-Factory/src/llamafactory/chat/chat_model.py:107
↓ 2 callers
Method
aget_scores
r"""Asynchronously get a list of scores of the reward model.
LLaMA-Factory/src/llamafactory/chat/chat_model.py:164
↓ 2 callers
Function
all_to_all_tensor
( local_input: Tensor, scatter_dim: int, gather_dim: int, group: Optional[dist.ProcessGrou
src/verl/utils/ulysses.py:132
↓ 2 callers
Function
allgather_dict_tensors
TODO: optimize this. - We can use async ops - We can use only one allgather Args: tensors: size: group
src/verl/utils/torch_functional.py:191
↓ 2 callers
Function
apply_available_kernels
Apply all available kernels to the model.
LLaMA-Factory/src/llamafactory/v1/plugins/model_plugins/kernels/registry.py:253
↓ 2 callers
Method
astream_chat
r"""Asynchronously get the response token-by-token of the chat model.
LLaMA-Factory/src/llamafactory/chat/chat_model.py:139
↓ 2 callers
Method
batch_data_generator
(self)
LLaMA-Factory/src/llamafactory/v1/core/trainer_utils/data_loader.py:170
↓ 2 callers
Method
batch_run
(self, dataset, batch_size=None)
src/flashrag/judger/judger.py:33
↓ 2 callers
Function
bootstrap_metric
(data: list[Any], subset_size: int, reduce_fns: list[Callable[[np.
src/verl/trainer/ppo/metric_utils.py:173
↓ 2 callers
Method
cat_assistant_response
(self, curr_prompt, assistant_response)
src/re_call/inference/re_call.py:59
↓ 2 callers
Method
cat_tool_results
(self, curr_prompt, tool_calls, results)
src/re_call/inference/re_call.py:62
↓ 2 callers
Function
compute_bleu
Computes BLEU score of translated segments against one or more references. Args: reference_corpus: list of lists of references for each
src/flashrag/evaluator/_bleu.py:149
↓ 2 callers
Function
compute_policy_loss
Adapted from https://github.com/huggingface/trl/blob/main/trl/trainer/ppo_trainer.py#L1122 Args: old_log_prob: `(torch.Tensor)`
src/verl/trainer/ppo/core_algos.py:337
↓ 2 callers
Function
compute_response_mask
(data: DataProto)
src/verl/trainer/ppo/ray_trainer.py:170
↓ 2 callers
Method
concatenated_forward
( self, model: "PreTrainedModel", batch: dict[str, "torch.Tensor"] )
LLaMA-Factory/src/llamafactory/train/kto/trainer.py:169
↓ 2 callers
Method
concatenated_forward
r"""Compute the sum log probabilities of the labels under given logits if loss_type is not IPO, ORPO or SimPO. Otherwise the average log prob
LLaMA-Factory/src/llamafactory/train/dpo/trainer.py:211
↓ 2 callers
Function
configure_fp8_environment
Configure FP8 environment for HuggingFace Accelerate. FP8 training is handled entirely through HuggingFace Accelerate, regardless of whether
LLaMA-Factory/src/llamafactory/train/fp8_utils.py:107
↓ 2 callers
Method
convert_ids_to_tokens
Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and added tokens.
src/verl/workers/rollout/tokenizer.py:116
↓ 2 callers
Function
copy_local_path_from_hdfs
Deprecated. Please use copy_to_local instead.
src/verl/utils/fs.py:72
↓ 2 callers
Function
count_parameters
r"""Return the number of trainable parameters and number of all parameters in the model.
LLaMA-Factory/src/llamafactory/extras/misc.py:117
↓ 2 callers
Function
create_and_sync_state
(param_name, state, is_param)
src/verl/utils/fsdp_utils.py:285
↓ 2 callers
Function
create_app
(chat_model: "ChatModel")
LLaMA-Factory/src/llamafactory/api/app.py:69
↓ 2 callers
Function
create_chat_box
( engine: "Engine", visible: bool = False )
LLaMA-Factory/src/llamafactory/webui/components/chatbot.py:49
↓ 2 callers
Function
create_preview_box
(dataset_dir: "gr.Textbox", dataset: "gr.Dropdown")
LLaMA-Factory/src/llamafactory/webui/components/data.py:86
↓ 2 callers
Function
create_real_dataset
Create a real dataset using DataEngine.
LLaMA-Factory/tests_v1/core/test_data_loader.py:91
↓ 2 callers
Function
create_ui
(demo_mode: bool = False)
LLaMA-Factory/src/llamafactory/webui/interface.py:38
↓ 2 callers
Method
critic_preds
Evaluate predictions using different retrieval docs
src/flashrag/pipeline/active_pipeline.py:346
↓ 2 callers
Function
dictify
(data: "BaseModel")
LLaMA-Factory/src/llamafactory/api/common.py:38
↓ 2 callers
Method
empty
(self)
LLaMA-Factory/src/llamafactory/v1/utils/batching_queue.py:219
↓ 2 callers
Method
encode_messages
Encode one message.
LLaMA-Factory/src/llamafactory/v1/plugins/data_plugins/template.py:61
↓ 2 callers
Method
evaluate
The evaluation process after finishing overall generation
src/flashrag/pipeline/mm_pipeline.py:23
↓ 2 callers
Method
execute_all_async
(self, method_name: str, *args, **kwargs)
src/verl/single_controller/ray/base.py:375
↓ 2 callers
Method
execute_tool_calls
(self, env: str, tool_calls: List[str])
src/re_call/inference/re_call.py:79
↓ 2 callers
Method
extract_tool_calls
(self, output_str)
src/re_call/inference/re_call.py:141
↓ 2 callers
Method
extract_tool_calls
(self, output_str)
src/verl/workers/rollout/vllm_rollout/vllm_rollout_spmd.py:346
↓ 2 callers
Function
find_expanded_modules
r"""Find the modules in the expanded blocks to apply lora.
LLaMA-Factory/src/llamafactory/model/model_utils/misc.py:55
↓ 2 callers
Method
fit
(self)
LLaMA-Factory/src/llamafactory/v1/core/base_trainer.py:57
↓ 2 callers
Method
flush
(self)
LLaMA-Factory/src/llamafactory/v1/utils/batching_queue.py:92
↓ 2 callers
Method
forward
(self, input_ids=None, attention_mask=None, **kwargs)
src/flashrag/generator/fid.py:32
↓ 2 callers
Method
forward
Args: input_ids: input ids. shape (batch_size, seq_length) attention_mask: attention_mask. shape (batch_size, se
src/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:121
↓ 2 callers
Method
forward
Args: input_ids: input ids. shape (batch_size, seq_length) attention_mask: attention_mask. shape (batch_size, se
src/verl/models/llama/megatron/modeling_llama_megatron.py:121
↓ 2 callers
Method
forward
r"""Run forward pass and computes the log probabilities.
LLaMA-Factory/src/llamafactory/train/kto/trainer.py:134
↓ 2 callers
Method
forward_backward_batch
(self, data: DataProto, forward_only=False)
src/verl/workers/critic/megatron_critic.py:116
↓ 2 callers
Method
forward_backward_batch
We assume: - The model takes input: (input_ids, attention_mask, position_ids). No rmpad for the input - The communication
src/verl/workers/actor/megatron_actor.py:240
↓ 2 callers
Method
from_single_dict
(cls, data: Dict[str, Union[torch.Tensor, np.ndarray]], meta_info=None)
src/verl/protocol.py:304
↓ 2 callers
Function
generate_response
(curr_prompt)
src/verl/workers/rollout/vllm_rollout/generate_new_prompts.py:9
↓ 2 callers
Method
get_checkpoint_name
Determine the directory name for this rank's checkpoint.
src/verl/utils/checkpoint/megatron_checkpoint_manager.py:125
↓ 2 callers
Function
get_common_default_kwargs_for_parallel_linear
()
src/verl/utils/megatron/tensor_parallel.py:47
↓ 2 callers
Method
get_condition_ppl
( self, text: str, question: str, condition_in_question: str = "none",
src/flashrag/refiner/llmlingua_compressor.py:1070
↓ 2 callers
Function
get_constant_schedule_with_warmup
( optimizer: Optimizer, num_warmup_steps: int, last_epoch: int = -1, )
src/verl/utils/torch_functional.py:458
↓ 2 callers
Method
get_estimate_threshold_base_distribution
(self, ppl, ratio: float, condition_flag: bool = False)
src/flashrag/refiner/llmlingua_compressor.py:1533
↓ 2 callers
Function
get_generation_config
( model: str, trust_remote_code: bool = False, )
src/verl/utils/model.py:58
↓ 2 callers
Function
get_hf_model_checkpoint_path
(checkpoint_path)
src/verl/utils/megatron_utils.py:277
↓ 2 callers
Function
get_huggingface_actor_config
(model_name: str, override_config_kwargs=None, trust_remote_code=False)
src/verl/utils/model.py:47
↓ 2 callers
Function
get_judger
(config)
src/flashrag/utils/utils.py:114
↓ 2 callers
Function
get_local_rank
Get local rank.
LLaMA-Factory/src/llamafactory/v1/accelerator/helper.py:90
↓ 2 callers
Method
get_local_world_size
Get parallel local world size.
LLaMA-Factory/src/llamafactory/v1/accelerator/interface.py:208
↓ 2 callers
Function
get_logger
Return a logger with the specified name. It it not supposed to be accessed externally.
LLaMA-Factory/src/llamafactory/v1/utils/logging.py:84
↓ 2 callers
Function
get_megatron_optimizer
( model, config: OptimizerConfig, no_weight_decay_cond=None, scale_lr_cond
src/verl/utils/megatron/optimizer.py:27
↓ 2 callers
Method
get_micro_batch
(self, step: int)
LLaMA-Factory/src/llamafactory/v1/utils/batching_queue.py:118
↓ 2 callers
Method
get_micro_batch
Get a micro batch from the buffer according to the current step. Args: step: the current step. Returns: data
LLaMA-Factory/src/llamafactory/v1/utils/batching_queue.py:194
↓ 2 callers
Function
get_model_checkpoint_path
(checkpoint_path)
src/verl/utils/megatron_utils.py:272
↓ 2 callers
Function
get_model_config
(model)
src/verl/utils/megatron_utils.py:38
↓ 2 callers
Method
get_next_sentence
(self, output, scores)
src/flashrag/pipeline/active_pipeline.py:845
↓ 2 callers
Function
get_optimizer_checkpoint_path
(checkpoint_path, use_distributed_optimizer=True)
src/verl/utils/megatron_utils.py:282
↓ 2 callers
Function
get_parallel_gptmodel_from_config
(tfconfig, hf_config, pre_proces
src/verl/utils/model.py:426
↓ 2 callers
Function
get_pure_token
(token, model_name)
src/flashrag/refiner/llmlingua_compressor.py:100
↓ 2 callers
Method
get_rank_results
( self, context: list, question: str, rank_method: str, condition
src/flashrag/refiner/llmlingua_compressor.py:1801
↓ 2 callers
Function
get_reranker
(config)
src/flashrag/utils/utils.py:103
↓ 2 callers
Function
get_rng_states_checkpoint_path
(checkpoint_path, only_rank0_save=True)
src/verl/utils/megatron_utils.py:294
↓ 2 callers
Function
get_seqlen_balanced_partitions
get order of seq lengths to make partitions balanced, this is used in balacing sum of seqlength across dp ranks and microbatches Parame
src/verl/utils/seqlen_balancing.py:152
↓ 2 callers
Function
get_seqlens_in_batch
r"""Get the sequence lengths in the current batch. e.g. ```python # input [ [1, 1, 2, 2, 2, 0], [1, 2, 2, 3, 3, 3],
LLaMA-Factory/src/llamafactory/model/model_utils/packing.py:55
↓ 2 callers
Method
get_string_with_varying_examplars
Select the maximum number of examplars that can be placed in the prompt
src/flashrag/prompt/base_prompt.py:142
↓ 2 callers
Function
get_token_params
Extract max_tokens and max_new_tokens from a parameter dictionary.
src/flashrag/generator/utils.py:18
↓ 2 callers
Function
get_trajectory_tracker
()
src/verl/utils/debug/trajectory_tracker.py:79
↓ 2 callers
Function
get_version
(pkg)
src/verl/workers/rollout/vllm_rollout/__init__.py:23
↓ 2 callers
Function
get_weight_buffer_meta_from_module
Return a dictionary containing name to a shape and dtype.
src/verl/utils/memory_buffer.py:61
↓ 2 callers
Function
get_world_size
Get world size.
LLaMA-Factory/src/llamafactory/v1/accelerator/helper.py:85
↓ 2 callers
Function
gptmodel_forward
(model, input_ids, attention_mask, position_
src/verl/models/mcore/gpt_model.py:24
↓ 2 callers
Function
grade_answer
The answer will be considered correct if: (a) it normalizes to the same string as the ground truth answer OR (b) sympy can simpli
src/verl/utils/reward_score/prime_math/__init__.py:269
↓ 2 callers
Function
infer_optim_dtype
r"""Infer the optimal dtype according to the model_dtype and device compatibility.
LLaMA-Factory/src/llamafactory/extras/misc.py:214
↓ 2 callers
Method
info_rank0
(self, *args, **kwargs)
LLaMA-Factory/src/llamafactory/v1/utils/logging.py:34
↓ 2 callers
Function
init_megatron_optim_config
(optim_config: Dict)
src/verl/utils/megatron_utils.py:203
↓ 2 callers
Function
is_env_enabled
Check if the environment variable is enabled.
LLaMA-Factory/src/llamafactory/v1/utils/env.py:28
↓ 2 callers
Function
is_matplotlib_available
()
LLaMA-Factory/src/llamafactory/extras/packages.py:69
↓ 2 callers
Function
is_requests_available
()
LLaMA-Factory/src/llamafactory/extras/packages.py:89
↓ 2 callers
Function
is_sglang_available
()
LLaMA-Factory/src/llamafactory/extras/packages.py:101
↓ 2 callers
Function
is_tensor_parallel_param
(param)
src/verl/utils/megatron/tensor_parallel.py:86
↓ 2 callers
Function
is_vllm_available
()
src/verl/utils/import_utils.py:34
↓ 2 callers
Function
is_vllm_available
()
LLaMA-Factory/src/llamafactory/extras/packages.py:123
↓ 2 callers
Method
judge
(self, dataset)
src/flashrag/judger/judger.py:87
↓ 2 callers
Function
judge_image
(x)
src/flashrag/retriever/utils.py:167
↓ 2 callers
Method
judge_retrieve
Calculate whether a retrieve is required based on the output probability of the special token in the model
src/flashrag/pipeline/active_pipeline.py:302
↓ 2 callers
Function
kl_penalty
Compute KL divergence given logprob and ref_logprob. Copied from https://github.com/huggingface/trl/blob/main/trl/trainer/ppo_trainer.py#L1104
src/verl/trainer/ppo/core_algos.py:450
↓ 2 callers
Function
last_boxed_only_string
(string)
src/verl/utils/reward_score/re_call.py:20
↓ 2 callers
Function
last_boxed_only_string
Extract the last LaTeX boxed expression from a string. Args: string: Input string containing LaTeX code Returns:
src/verl/utils/reward_score/math_dapo.py:21
↓ 2 callers
Function
list_of_dict_to_dict_of_list
(list_of_dict: list[dict])
src/verl/protocol.py:101
↓ 2 callers
Function
load_args
r"""Load the training configuration from config path.
LLaMA-Factory/src/llamafactory/webui/common.py:154
↓ 2 callers
Function
load_extern_type
Load a external data type based on the file path and type name
src/verl/utils/import_utils.py:61
← previous
next →
401–500 of 2,379, ranked by callers