MCPcopy Create free account

hub / github.com/Agent-RL/ReCall / functions

Functions1,539 in github.com/Agent-RL/ReCall

↓ 236 callersMethodget
Return a tensor with the input `shape` as a view into the 1-D data starting at `start_index`.
src/verl/utils/memory_buffer.py:43
↓ 157 callersMethodto
move the batch to device Args: device (torch.device, str): torch device Returns: DataProto: the current Data
src/verl/protocol.py:354
↓ 84 callersFunctionprint_rank_0
If distributed is initialized, print only on rank 0.
src/verl/utils/megatron_utils.py:263
↓ 70 callersMethodget
(self)
src/verl/protocol.py:750
↓ 64 callersMethodupdate_output
Update the output dict and keep a key in self.output can be used as an attribute.
src/flashrag/dataset/dataset.py:24
↓ 61 callersFunctionlog_gpu_memory_usage
(head: str, logger: logging.Logger = None, level=logging.DEBUG, rank: int = 0)
src/verl/utils/debug/performance.py:20
↓ 46 callersMethodchunk
Split the batch among dim=0 into chunks. The meta_info is passed to each DataProto after split. Args: chunks (int): the number of
src/verl/protocol.py:600
↓ 45 callersMethodupdate
(self, current_kl, n_steps)
src/verl/trainer/ppo/core_algos.py:52
↓ 42 callersMethodpop
Pop a subset of the DataProto via `batch_keys` and `meta_info_keys` Args: batch_keys (list, optional): a list of strings indicati
src/verl/protocol.py:484
↓ 34 callersMethoddecode
Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special tokens and clean up tokeniz
src/verl/workers/rollout/tokenizer.py:86
↓ 33 callersMethodencode
(self, query_list: List[str], batch_size=64, is_query=True)
src/flashrag/retriever/encoder.py:68
↓ 29 callersMethodgenerate
(self, input_ids, attention_mask, **kwargs)
src/flashrag/generator/fid.py:48
↓ 28 callersMethodget
Return a tensor with the input `shape` as a view into the 1-D data starting at `start_index`.
src/verl/utils/megatron/memory.py:33
↓ 24 callersFunctioncopy_to_local
Copy src from hdfs to local if src is on hdfs or directly return src. If cache_dir is None, we will use the default cache dir of the system. Note
src/verl/utils/fs.py:58
↓ 22 callersMethodconcat
Concat a list of DataProto. The batch is concatenated among dim=0. The meta_info is assumed to be identical and will use the first one.
src/verl/protocol.py:633
↓ 22 callersMethodeval
(self)
src/verl/workers/sharding_manager/megatron_vllm.py:171
↓ 21 callersMethodsearch
(self, *args, **kwargs)
src/flashrag/retriever/retriever.py:187
↓ 19 callersMethodget_string
(self, question=None, retrieval_result=None, formatted_reference=None, previous_gen=None, messages=None, **par
src/flashrag/prompt/base_prompt.py:96
↓ 18 callersMethod__init__
(self, config)
src/flashrag/evaluator/metrics.py:465
↓ 18 callersFunctionconvert_config
(hf_config: PretrainedConfig, megatron_config)
src/verl/utils/megatron_utils.py:157
↓ 18 callersFunctiongather_seq_scatter_heads
A func to sync embedding input with alltoall in sequence parallel gather sequence dimension and scatter head dim: e.g. seq_dim: 1, head_d
src/verl/utils/ulysses.py:61
↓ 16 callersMethodget_token_length
( self, text: str, add_special_tokens: bool = True, use_oai_tokenizer: bool =
src/flashrag/refiner/llmlingua_compressor.py:1049
↓ 15 callersFunctionget_retriever
r"""Automatically select retriever class based on config's retrieval method Args: config (dict): configuration with 'retrieval_method' ke
src/flashrag/utils/utils.py:73
↓ 15 callersFunctionhf_tokenizer
Create a huggingface pretrained tokenizer which correctness handles eos and pad tokens. Args: name (str): The name of the tokenizer.
src/verl/utils/tokenizer.py:35
↓ 14 callersMethodencode
(self, contents: list)
src/flashrag/judger/judger.py:67
↓ 14 callersMethodget_dataset_answer
(self, data)
src/flashrag/evaluator/metrics.py:33
↓ 14 callersFunctionget_generator
Automatically select generator class based on config.
src/flashrag/utils/utils.py:40
↓ 14 callersMethodselect
Select a subset of the DataProto via batch_keys and meta_info_keys Args: batch_keys (list, optional): a list of strings indicatin
src/verl/protocol.py:368
↓ 13 callersMethodevaluate
The evaluation process after finishing overall generation
src/flashrag/pipeline/pipeline.py:28
↓ 13 callersFunctionunwrap_model
(model, module_instances=ALL_MODULE_WRAPPER_CLASSNAMES)
src/verl/utils/megatron_utils.py:139
↓ 12 callersMethodadd
(self, idx: int, val: int)
src/verl/utils/seqlen_balancing.py:33
↓ 12 callersMethodbatch_search
(self, *args, **kwargs)
src/flashrag/retriever/retriever.py:190
↓ 12 callersFunctionfunc
(*args, **kwargs)
src/verl/single_controller/ray/base.py:39
↓ 12 callersMethodto_dtype
(precision)
src/verl/utils/torch_dtypes.py:63
↓ 11 callersFunction_timer
(name: str, timing_raw: Dict[str, float])
src/verl/trainer/ppo/ray_trainer.py:235
↓ 11 callersMethodfrom_dict
Create a DataProto from a dict of tensors. This assumes that 1. All the tensor in tensors have the same dim0 2. Only dim0 is the batch
src/verl/protocol.py:319
↓ 11 callersMethodget_megatron_rank_info
(self)
src/verl/single_controller/base/megatron/worker.py:32
↓ 11 callersFunctionget_ulysses_sequence_parallel_world_size
Get ulysses sequence parallel world size.
src/verl/utils/ulysses.py:45
↓ 11 callersMethodnamed_parameters
(self)
src/verl/utils/memory_buffer.py:208
↓ 11 callersMethodsave
Save the dataset into the original format.
src/flashrag/dataset/dataset.py:186
↓ 10 callersFunctionget_ulysses_sequence_parallel_group
Get ulysses sequence parallel process group.
src/verl/utils/ulysses.py:37
↓ 10 callersMethodlog
(self, data, step, backend=None)
src/verl/utils/tracking.py:104
↓ 10 callersFunctionnormalize_answer
(s)
src/flashrag/evaluator/utils.py:5
↓ 10 callersFunctionoffload_fsdp_model_to_cpu
(model: FSDP, empty_cache: bool = True)
src/verl/utils/fsdp_utils.py:115
↓ 10 callersFunctionpad_sequence_to_length
pad a 2D tensors (e.g. responses, logprobs) in the last dim to max_seq_length. input shape: [bs, seq_length] output shape: [bs, max_seq_l
src/verl/utils/torch_functional.py:245
↓ 10 callersMethodrepeat
Repeat the batch data a specified number of times. Args: repeat_times (int): Number of times to repeat the data.
src/verl/protocol.py:665
↓ 10 callersMethodtrain
(self)
src/verl/workers/sharding_manager/megatron_vllm.py:175
↓ 9 callersMethodget_rng_state
()
src/verl/utils/checkpoint/checkpoint_manager.py:107
↓ 9 callersFunctionload_fsdp_model_to_gpu
(model: FSDP)
src/verl/utils/fsdp_utils.py:136
↓ 9 callersMethodpreprocess_data
(self, data: DataProto)
src/verl/workers/sharding_manager/base.py:29
↓ 8 callersFunction_megatron_calc_global_rank
Calculate global rank with support for CP/EP parallelism
src/verl/models/mcore/saver.py:28
↓ 8 callersMethoddump
(self, data: io.BytesIO, name)
src/verl/utils/debug/trajectory_tracker.py:59
↓ 8 callersFunctionload_corpus
(corpus_path: str)
src/flashrag/retriever/utils.py:121
↓ 8 callersMethodpostprocess_data
(self, data: DataProto)
src/verl/workers/sharding_manager/base.py:32
↓ 8 callersMethodrank
(self)
src/verl/single_controller/base/worker.py:208
↓ 7 callersFunction_megatron_calc_global_rank
given TP,DP,PP rank to get the global rank.
src/verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:27
↓ 7 callersFunction_megatron_calc_global_rank
given TP,DP,PP rank to get the global rank.
src/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:27
↓ 7 callersFunctionappend_to_dict
(data: Dict, new_data: Dict)
src/verl/utils/py_functional.py:41
↓ 7 callersFunctionclean_traceback
(error_traceback)
src/verl/utils/reward_score/prime_code/testing_util.py:101
↓ 7 callersFunctionoffload_fsdp_optimizer
(optimizer)
src/verl/utils/fsdp_utils.py:152
↓ 7 callersMethodunion
Union with another DataProto. Union batch and meta_info separately. Throw an error if - there are conflict keys in batch and they are
src/verl/protocol.py:542
↓ 6 callersMethod__init__
( self, config, threshold=0.2, look_ahead_steps=64, max_generation_len
src/flashrag/pipeline/active_pipeline.py:803
↓ 6 callersFunction_broadcast_tensor
broadcast tensor from rank0 across mp_group
src/verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader_depracated.py:100
↓ 6 callersFunction_broadcast_tensor
broadcast tensor from rank0 across mp_group
src/verl/models/mcore/loader.py:100
↓ 6 callersFunction_broadcast_tensor
broadcast tensor from rank0 across mp_group
src/verl/models/llama/megatron/checkpoint_utils/llama_loader_depracated.py:104
↓ 6 callersFunction_fetch_tensor
fetch tensor
src/verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:100
↓ 6 callersFunction_fetch_tensor
fetch tensor
src/verl/models/llama/megatron/checkpoint_utils/llama_loader.py:104
↓ 6 callersMethodcalculate_rouge
(self, pred, golden_answers)
src/flashrag/evaluator/metrics.py:293
↓ 6 callersFunctioncombined_int_check
(val)
src/verl/utils/reward_score/prime_code/testing_util.py:97
↓ 6 callersFunctiongather_heads_scatter_seq
A func to sync attention result with alltoall in sequence parallel gather head dimension and scatter seq dim: e.g. seq_dim: 1, head_dim:
src/verl/utils/ulysses.py:85
↓ 6 callersFunctionis_non_local
(path)
src/verl/utils/fs.py:32
↓ 6 callersFunctionjudge_zh
(input_str: str)
src/flashrag/retriever/utils.py:27
↓ 6 callersFunctionlogprobs_from_logits
See: https://github.com/pytorch/pytorch/issues/563#issuecomment-330103591
src/verl/utils/torch_functional.py:48
↓ 6 callersFunctionmasked_mean
Compute mean of tensor with a masked values.
src/verl/utils/torch_functional.py:118
↓ 6 callersMethodpostprocess_prediction
(self, pred)
src/flashrag/pipeline/active_pipeline.py:462
↓ 6 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=2, repeats=n_rep). The hidden states go from (batch, seqlen, num_key_value_heads, he
src/verl/models/transformers/monkey_patch.py:32
↓ 6 callersFunctiontruncatefn
(s, length=300)
src/verl/utils/reward_score/prime_code/testing_util.py:42
↓ 6 callersFunctionulysses_pad_and_slice_inputs
Pad and slice input_ids to be divisible by sp_size Pad position_ids to be divisible by sp_size. Note both input_ids_rmpad and position_i
src/verl/utils/ulysses.py:252
↓ 5 callersMethod__init__
(self, config)
src/flashrag/generator/generator.py:22
↓ 5 callersMethod__init__
(self, config)
src/flashrag/retriever/retriever.py:118
↓ 5 callersMethod__init__
(self, config: Qwen2Config, megatron_config: ModelParallelConfig)
src/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:83
↓ 5 callersMethod__init__
(self, config: LlamaConfig, megatron_config: ModelParallelConfig)
src/verl/models/llama/megatron/modeling_llama_megatron.py:83
↓ 5 callersFunction_broadcast_tensor
broadcast tensor across mp_group
src/verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:123
↓ 5 callersFunction_broadcast_tensor
broadcast tensor across mp_group
src/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:123
↓ 5 callersFunction_hdfs_cmd
(cmd: str)
src/verl/utils/hdfs_io.py:139
↓ 5 callersFunction_run_cmd
(cmd: str, timeout=None)
src/verl/utils/hdfs_io.py:135
↓ 5 callersMethod_search_or_batch_search
(self, query: Union[str, list], target_modal, num, return_score, method, retriever_list)
src/flashrag/retriever/retriever.py:653
↓ 5 callersFunctionagg_loss
Aggregate the loss matrix into a scalar. Args: loss_mat: `(torch.Tensor)` shape: (bs, response_length) loss_mask:
src/verl/trainer/ppo/core_algos.py:309
↓ 5 callersFunctionapply_rotary_pos_emb
(q, k, cos, sin, position_ids)
src/verl/models/qwen2/megatron/layers/parallel_attention.py:123
↓ 5 callersMethodencode
Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary. Args: text (`str`, `List[str]` or
src/verl/workers/rollout/tokenizer.py:70
↓ 5 callersFunctiongather_outpus_and_unpad
(x: Tensor, gather_dim: int, unpad_dim: int = None,
src/verl/utils/ulysses.py:233
↓ 5 callersMethodgenerate
Get responses from the generater. Args: input_list: it contains input texts, each item represents a sample. Returns:
src/flashrag/generator/generator.py:51
↓ 5 callersFunctionget_dataset
Load dataset from config.
src/flashrag/utils/utils.py:8
↓ 5 callersFunctionget_init_weight_context_manager
(use_meta_tensor=True, mesh: DeviceMesh = None)
src/verl/utils/fsdp_utils.py:39
↓ 5 callersFunctionget_model
Build the model.
src/verl/utils/megatron_utils.py:42
↓ 5 callersMethodget_ppl
( self, text: str, granularity: str = "sentence", input_ids=None, atte
src/flashrag/refiner/llmlingua_compressor.py:303
↓ 5 callersFunctionget_response_mask
end of sentence token can be int or list: 1 or [1, 2] e.g. response_id = torch.tensor([[20, 10, 34, 1, 0, 0, 0],
src/verl/utils/torch_functional.py:150
↓ 5 callersMethodinit_model
(self)
src/verl/workers/fsdp_workers.py:805
↓ 5 callersFunctionload_docs
(corpus, doc_idxs: List[int])
src/flashrag/retriever/utils.py:148
↓ 5 callersFunctionrearrange_micro_batches
Split the batch into a list of micro_batches, where the max_token_len is smaller than max_token_len and the number of valid tokens in each micro b
src/verl/utils/seqlen_balancing.py:224
next →1–100 of 1,539, ranked by callers