MCPcopy Create free account

hub / github.com/BeastyZ/ConvSearch-R1 / functions

Functions1,207 in github.com/BeastyZ/ConvSearch-R1

↓ 221 callersMethodget
Return a tensor with the input `shape` as a view into the 1-D data starting at `start_index`.
verl/verl/utils/memory_buffer.py:43
↓ 153 callersMethodto
move the batch to device Args: device (torch.device, str): torch device Returns: DataProto: the current Data
verl/verl/protocol.py:324
↓ 59 callersMethodfrom_pretrained
(cls, save_directory: Union[str, os.PathLike], **kwargs)
verl/tests/e2e/envs/digit_completion/tokenizer.py:154
↓ 57 callersFunctionlog_gpu_memory_usage
(head: str, logger: logging.Logger = None, level=logging.DEBUG, rank: int = 0)
verl/verl/utils/debug/performance.py:20
↓ 47 callersMethodget
(self)
verl/verl/protocol.py:639
↓ 46 callersMethodupdate
(self, current_kl, n_steps)
verl/verl/trainer/ppo/core_algos.py:52
↓ 44 callersFunctionprint_rank_0
If distributed is initialized, print only on rank 0.
verl/verl/utils/megatron_utils.py:257
↓ 34 callersFunction_timer
(name: str, timing_raw: Dict[str, float])
verl/verl/trainer/ppo/ray_trainer.py:241
↓ 31 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
verl/verl/protocol.py:289
↓ 28 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
verl/verl/utils/fs.py:58
↓ 27 callersMethodpop
Pop a subset of the DataProto via `batch_keys` and `meta_info_keys` Args: batch_keys (list, optional): a list of strings indicati
verl/verl/protocol.py:373
↓ 26 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
verl/verl/protocol.py:489
↓ 21 callersFunctionhf_tokenizer
Create a huggingface pretrained tokenizer which correctness handles eos and pad tokens. Args: name (str): The name of the tokenizer.
verl/verl/utils/tokenizer.py:35
↓ 21 callersMethodinit
(self)
verl/tests/ray/test_rvdz.py:27
↓ 20 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.
verl/verl/protocol.py:522
↓ 19 callersMethodgetenv
(self, key)
verl/tests/ray/test_ray_local_envs.py:31
↓ 19 callersMethodstep
(self, optimizer)
index/dense/libs.py:263
↓ 19 callersMethodunion
Union with another DataProto. Union batch and meta_info separately. Throw an error if - there are conflict keys in batch and they are
verl/verl/protocol.py:431
↓ 18 callersFunctionoffload_fsdp_model_to_cpu
(model: FSDP, empty_cache: bool = True)
verl/verl/utils/fsdp_utils.py:115
↓ 17 callersMethoddecode
Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special tokens and clean up tokeniz
verl/verl/workers/rollout/tokenizer.py:86
↓ 17 callersMethodexecute_all_sync
(self, method_name: str, *args, **kwargs)
verl/verl/single_controller/ray/base.py:352
↓ 17 callersMethodselect
Select a subset of the DataProto via batch_keys and meta_info_keys Args: batch_keys (list, optional): a list of strings indicatin
verl/verl/protocol.py:338
↓ 16 callersFunctionconvert_config
(hf_config: PretrainedConfig, megatron_config)
verl/verl/utils/megatron_utils.py:154
↓ 16 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
verl/verl/utils/torch_functional.py:242
↓ 15 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
verl/verl/utils/ulysses.py:61
↓ 15 callersFunctionload_fsdp_model_to_gpu
(model: FSDP)
verl/verl/utils/fsdp_utils.py:136
↓ 15 callersMethodto_dtype
(precision)
verl/verl/utils/torch_dtypes.py:63
↓ 14 callersMethodeval
(self)
verl/verl/workers/sharding_manager/megatron_vllm.py:165
↓ 14 callersMethodlog
(self, data, step, backend=None)
verl/verl/utils/tracking.py:95
↓ 14 callersMethodnamed_parameters
(self)
verl/verl/utils/memory_buffer.py:208
↓ 13 callersMethodrepeat
Repeat the batch data a specified number of times. Args: repeat_times (int): Number of times to repeat the data.
verl/verl/protocol.py:554
↓ 12 callersFunctionget_ulysses_sequence_parallel_world_size
Get ulysses sequence parallel world size.
verl/verl/utils/ulysses.py:45
↓ 12 callersFunctionmasked_mean
Compute mean of tensor with a masked values.
verl/verl/utils/torch_functional.py:118
↓ 11 callersMethodbackward
(ctx: Any, grad_output: Tensor)
verl/verl/utils/ulysses.py:226
↓ 11 callersMethodopen
(self)
index/dense/utils.py:154
↓ 11 callersMethodpreprocess_data
(self, data: DataProto)
verl/verl/workers/sharding_manager/base.py:29
↓ 10 callersMethodpostprocess_data
(self, data: DataProto)
verl/verl/workers/sharding_manager/base.py:32
↓ 10 callersMethodtrain
(self)
verl/verl/workers/sharding_manager/megatron_vllm.py:169
↓ 10 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
verl/verl/utils/ulysses.py:252
↓ 9 callersFunctionappend_to_dict
(data: Dict, new_data: Dict)
verl/verl/utils/py_functional.py:41
↓ 9 callersMethodfrom_config
(cls, config: Dict)
verl/tests/e2e/envs/digit_completion/tokenizer.py:140
↓ 9 callersFunctiongather_outpus_and_unpad
(x: Tensor, gather_dim: int, unpad_dim: int = None,
verl/verl/utils/ulysses.py:233
↓ 9 callersMethodget_megatron_rank_info
(self)
verl/verl/single_controller/base/megatron/worker.py:31
↓ 9 callersMethodget_rng_state
()
verl/verl/utils/checkpoint/checkpoint_manager.py:97
↓ 9 callersFunctionget_ulysses_sequence_parallel_group
Get ulysses sequence parallel process group.
verl/verl/utils/ulysses.py:37
↓ 9 callersMethodmasked_mean
(self, t, mask)
src/eval/models.py:49
↓ 9 callersFunctionoffload_fsdp_optimizer
(optimizer)
verl/verl/utils/fsdp_utils.py:152
↓ 9 callersMethodsave_pretrained
(self, save_directory: Union[str, os.PathLike], **kwargs)
verl/tests/e2e/envs/digit_completion/tokenizer.py:147
↓ 8 callersMethodadd
(self, idx: int, val: int)
verl/verl/utils/seqlen_balancing.py:33
↓ 8 callersFunctioncompute_position_id_with_mask
(mask)
verl/verl/utils/model.py:194
↓ 8 callersMethodgenerate_sequences
Generate sequences
verl/verl/workers/rollout/base.py:35
↓ 8 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
verl/verl/utils/seqlen_balancing.py:224
↓ 8 callersMethodsub
(self, data: DataProto)
verl/tests/ray/test_colocated_workers.py:44
↓ 7 callersFunction_megatron_calc_global_rank
given TP,DP,PP rank to get the global rank.
verl/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.
verl/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:30
↓ 7 callersMethod_validate
(self)
verl/verl/trainer/ppo/ray_trainer.py:502
↓ 7 callersFunctionapply_monkey_patch
(config: PretrainedConfig, verbose=True)
verl/verl/models/transformers/monkey_patch.py:49
↓ 7 callersFunctionclean_traceback
(error_traceback)
verl/verl/utils/reward_score/prime_code/testing_util.py:101
↓ 7 callersMethoddump
(self, data: io.BytesIO, name)
verl/verl/utils/debug/trajectory_tracker.py:59
↓ 7 callersFunctionreduce_metrics
(metrics: Dict[str, List[Any]])
verl/verl/trainer/ppo/metric_utils.py:24
↓ 7 callersFunctionunwrap_model
(model, module_instances=ALL_MODULE_WRAPPER_CLASSNAMES)
verl/verl/utils/megatron_utils.py:136
↓ 6 callersFunction_broadcast_tensor
broadcast tensor from rank0 across mp_group
verl/verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:100
↓ 6 callersFunction_broadcast_tensor
broadcast tensor from rank0 across mp_group
verl/verl/models/llama/megatron/checkpoint_utils/llama_loader.py:104
↓ 6 callersFunctioncombined_int_check
(val)
verl/verl/utils/reward_score/prime_code/testing_util.py:97
↓ 6 callersFunctioncopy_local_path_from_hdfs
Deprecated. Please use copy_to_local instead.
verl/verl/utils/fs.py:72
↓ 6 callersFunctioncreate_random_mask
Create a random mask given input_ids. Support left padding and right padding. Process: - Sample valid token length - Sample left_padding l
verl/verl/utils/model.py:153
↓ 6 callersMethodget
Return a tensor with the input `shape` as a view into the 1-D data starting at `start_index`.
verl/verl/utils/megatron/memory.py:33
↓ 6 callersFunctionget_init_weight_context_manager
(use_meta_tensor=True, mesh: DeviceMesh = None)
verl/verl/utils/fsdp_utils.py:39
↓ 6 callersFunctionget_model
Build the model.
verl/verl/utils/megatron_utils.py:42
↓ 6 callersFunctioninitialize_global_process_group
(timeout_second=36000)
verl/verl/utils/distributed.py:18
↓ 6 callersFunctionlogprobs_from_logits
See: https://github.com/pytorch/pytorch/issues/563#issuecomment-330103591
verl/verl/utils/torch_functional.py:48
↓ 6 callersFunctionpstore
(x, path, high_protocol = False)
index/dense/utils.py:76
↓ 6 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
verl/verl/models/qwen2/megatron/layers/parallel_attention.py:131
↓ 6 callersFunctiontruncatefn
(s, length=300)
verl/verl/utils/reward_score/prime_code/testing_util.py:42
↓ 5 callersMethod__init__
(self, config: Qwen2Config, megatron_config: ModelParallelConfig)
verl/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:81
↓ 5 callersMethod__init__
(self, config: LlamaConfig, megatron_config: ModelParallelConfig)
verl/verl/models/llama/megatron/modeling_llama_megatron.py:82
↓ 5 callersFunction_hdfs_cmd
(cmd: str)
verl/verl/utils/hdfs_io.py:139
↓ 5 callersFunction_run_cmd
(cmd: str, timeout=None)
verl/verl/utils/hdfs_io.py:135
↓ 5 callersFunctionapply_rotary_pos_emb
(q, k, cos, sin, position_ids)
verl/verl/models/qwen2/megatron/layers/parallel_attention.py:123
↓ 5 callersFunctionbroadcast_dict_tensor
TODO: optimize this. Technically, we only need one broadcast
verl/verl/utils/torch_functional.py:179
↓ 5 callersFunctioncheck_model_support_rmpad
(model_type: str)
verl/verl/models/registry.py:25
↓ 5 callersMethodfrom_single_dict
(cls, data: Dict[str, Union[torch.Tensor, np.ndarray]], meta_info=None)
verl/verl/protocol.py:274
↓ 5 callersFunctionfunc
(*args, **kwargs)
verl/verl/single_controller/ray/base.py:38
↓ 5 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:
verl/verl/utils/ulysses.py:85
↓ 5 callersFunctionget_eos_mask
end of sentence token can be int or list: 1 or [1, 2] e.g. eos_token=1 response_id: [0, 0, 2, 42, 3, 5, 1, 0, 0] eos_mask: [1, 1,
verl/verl/utils/torch_functional.py:150
↓ 5 callersFunctionget_fsdp_wrap_policy
Get FSDP wrap policy for the module. Args: module: The module to get wrap policy for config: Configuration for wrap policy
verl/verl/utils/fsdp_utils.py:54
↓ 5 callersFunctionget_micro_data_parallel_world_size
()
verl/verl/workers/sharding_manager/megatron_vllm.py:439
↓ 5 callersMethodget_placement_groups
(self, strategy="STRICT_PACK", name=None)
verl/verl/single_controller/ray/base.py:84
↓ 5 callersFunctionget_reverse_idx
(idx_map)
verl/verl/utils/seqlen_balancing.py:259
↓ 5 callersMethodinit_model
(self)
verl/verl/workers/fsdp_workers.py:793
↓ 5 callersMethodinit_workers
Init resource pool and worker group
verl/verl/trainer/ppo/ray_trainer.py:591
↓ 5 callersFunctionis_non_local
(path)
verl/verl/utils/fs.py:32
↓ 5 callersFunctionis_transformers_version_in_range
(min_version: str, max_version: str)
verl/verl/models/transformers/monkey_patch.py:73
↓ 5 callersFunctionprint_model_size
(model: nn.Module, name: str = None)
verl/verl/utils/model.py:146
↓ 5 callersMethodsave
(self, dim=None)
index/dense/libs.py:77
↓ 5 callersFunctionupdate_model_config
(module_config, override_config_kwargs)
verl/verl/utils/model.py:42
↓ 5 callersFunctionvalidate_ulysses_config
(num_heads, ulysses_sequence_size)
verl/verl/utils/ulysses.py:291
↓ 4 callersFunction_broadcast_tensor
broadcast tensor across mp_group
verl/verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:123
↓ 4 callersFunction_broadcast_tensor
broadcast tensor across mp_group
verl/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:126
↓ 4 callersFunction_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:162
next →1–100 of 1,207, ranked by callers