MCPcopy Create free account

hub / github.com/Franklin-Zhang0/ReasonGen-R1 / functions

Functions1,182 in github.com/Franklin-Zhang0/ReasonGen-R1

↓ 2 callersFunctionall_to_all_tensor
( local_input: Tensor, scatter_dim: int, gather_dim: int, group: Optional[dist.ProcessGroup] =
verl/utils/ulysses.py:132
↓ 2 callersMethodallgather_params
allgather params of all pp ranks. Return a list of handles
verl/workers/sharding_manager/megatron_vllm.py:135
↓ 2 callersFunctioncompute_response_mask
(data: DataProto)
verl/trainer/ppo/ray_trainer.py:173
↓ 2 callersMethodcompute_rm_score
(self, data: DataProto)
verl/workers/fsdp_workers.py:1272
↓ 2 callersFunctioncreate_and_sync_state
(param_name, state, is_param)
verl/utils/fsdp_utils.py:285
↓ 2 callersMethodexecute_all_async
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:355
↓ 2 callersMethodfit
The training loop of PPO. The driver process only need to call the compute functions of the worker group through RPC to construct the
verl/trainer/ppo/ray_trainer.py:794
↓ 2 callersMethodforward
Args: input_ids: input ids. shape (batch_size, seq_length) attention_mask: attention_mask. shape (batch_size, seq_le
verl/models/qwen2/megatron/modeling_qwen2_megatron.py:119
↓ 2 callersMethodforward
Args: input_ids: input ids. shape (batch_size, seq_length) attention_mask: attention_mask. shape (batch_size, seq_le
verl/models/llama/megatron/modeling_llama_megatron.py:120
↓ 2 callersMethodforward_backward_batch
(self, data: DataProto, forward_only=False)
verl/workers/critic/megatron_critic.py:119
↓ 2 callersMethodforward_backward_batch
We assume: - The model takes input: (input_ids, attention_mask, position_ids). No rmpad for the input - The communication sha
verl/workers/actor/megatron_actor.py:233
↓ 2 callersMethodfrom_single_dict
(cls, data: Dict[str, Union[torch.Tensor, np.ndarray]], meta_info=None)
verl/protocol.py:275
↓ 2 callersMethodget_all_params
Get all the parameters of the models in all pp ranks Returns: params: List[List[Dict[str, Tensor]]]: a list of parameters in all
verl/workers/sharding_manager/megatron_vllm.py:181
↓ 2 callersMethodget_checkpoint_name
Determine the directory name for this rank's checkpoint.
verl/utils/checkpoint/megatron_checkpoint_manager.py:121
↓ 2 callersFunctionget_common_default_kwargs_for_parallel_linear
()
verl/utils/megatron/tensor_parallel.py:47
↓ 2 callersFunctionget_constant_schedule_with_warmup
( optimizer: Optimizer, num_warmup_steps: int, last_epoch: int = -1, )
verl/utils/torch_functional.py:455
↓ 2 callersFunctionget_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 optimizer
verl/utils/torch_functional.py:412
↓ 2 callersFunctionget_hf_model_checkpoint_path
(checkpoint_path)
verl/utils/megatron_utils.py:264
↓ 2 callersFunctionget_huggingface_actor_config
(model_name: str, override_config_kwargs=None, trust_remote_code=False)
verl/utils/model.py:47
↓ 2 callersFunctionget_megatron_optimizer
( model, config: OptimizerConfig, no_weight_decay_cond=None, scale_lr_cond=Non
verl/utils/megatron/optimizer.py:27
↓ 2 callersFunctionget_model_checkpoint_path
(checkpoint_path)
verl/utils/megatron_utils.py:259
↓ 2 callersFunctionget_model_config
(model)
verl/utils/megatron_utils.py:37
↓ 2 callersFunctionget_optimizer_checkpoint_path
(checkpoint_path, use_distributed_optimizer=True)
verl/utils/megatron_utils.py:269
↓ 2 callersFunctionget_reverse_idx
(idx_map)
verl/utils/seqlen_balancing.py:259
↓ 2 callersFunctionget_rng_states_checkpoint_path
(checkpoint_path, data_parallel_random_init=False)
verl/utils/megatron_utils.py:279
↓ 2 callersFunctionget_rope_index
Gets the position ids for Qwen2-VL, it should be generated before sharding the sequence. The batch dim has been removed and the input_ids sho
verl/models/transformers/qwen2_vl.py:32
↓ 2 callersFunctionget_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 Paramete
verl/utils/seqlen_balancing.py:152
↓ 2 callersFunctionget_trajectory_tracker
()
verl/utils/debug/trajectory_tracker.py:79
↓ 2 callersFunctionget_version
(pkg)
verl/workers/rollout/vllm_rollout/__init__.py:23
↓ 2 callersFunctionget_weight_buffer_meta_from_module
Return a dictionary containing name to a shape and dtype.
verl/utils/memory_buffer.py:61
↓ 2 callersFunctionget_weight_loader
(arch: str)
verl/models/weight_loader_registry.py:16
↓ 2 callersFunctiongrade_answer
The answer will be considered correct if: (a) it normalizes to the same string as the ground truth answer OR (b) sympy can simplify t
verl/utils/reward_score/prime_math/__init__.py:269
↓ 2 callersFunctioninit_megatron_optim_config
(optim_config: Dict)
verl/utils/megatron_utils.py:193
↓ 2 callersMethodinit_weights
(self, mode: Literal["jax", "jax_nlhb", "moco", ""] = "")
Janus/janus/janusflow/models/siglip_vit.py:434
↓ 2 callersMethodinit_weights
(self, mode: Literal["jax", "jax_nlhb", "moco", ""] = "")
Janus/janus/models/siglip_vit.py:434
↓ 2 callersMethodinit_workers
Init resource pool and worker group
verl/trainer/ppo/ray_trainer.py:611
↓ 2 callersFunctioninitialize_global_process_group
(timeout_second=36000)
verl/utils/distributed.py:18
↓ 2 callersFunctionis_tensor_parallel_param
(param)
verl/utils/megatron/tensor_parallel.py:86
↓ 2 callersFunctionis_vllm_available
()
verl/utils/import_utils.py:33
↓ 2 callersMethodkeys
(self)
Janus/janus/janusflow/models/processing_vlm.py:33
↓ 2 callersFunctionlist_of_dict_to_dict_of_list
(list_of_dict: list[dict])
verl/protocol.py:100
↓ 2 callersMethodload_dataset
(self, path)
verl/utils/dataset/sft_dataset.py:444
↓ 2 callersFunctionload_fsdp_optimizer
(optimizer, device_id)
verl/utils/fsdp_utils.py:164
↓ 2 callersMethodload_params_to_cuda
load all model params to cuda
verl/workers/sharding_manager/megatron_vllm.py:129
↓ 2 callersMethodlocal_mkdir
(path)
verl/utils/checkpoint/checkpoint_manager.py:86
↓ 2 callersMethodlog
(self, data, step)
verl/utils/logger/aggregate_logger.py:40
↓ 2 callersMethodmake_iterator
r"""Make an iterator from the DataProto. This is built upon that TensorDict can be used as a normal Pytorch dataset. See https://pytorch.org/t
verl/protocol.py:453
↓ 2 callersMethodmake_minibatch_iterator
Make minibatch iterator for updating the actor Args: data (DataProto): a DataProto containing keys ``input_ids``
verl/workers/actor/megatron_actor.py:203
↓ 2 callersFunctionmakedirs
r"""Works like os.makedirs() but supports hdfs. Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except tha
verl/utils/hdfs_io.py:50
↓ 2 callersFunctionmath_equal
Exact match of math if and only if: 1. numerical equal: both can convert to float and are equal 2. symbolic equal: both can convert to sy
verl/utils/reward_score/prime_math/grader.py:174
↓ 2 callersFunctionmd5_encode
(path: str)
verl/utils/fs.py:36
↓ 2 callersMethodmerge
(self, other)
verl/utils/seqlen_balancing.py:37
↓ 2 callersFunctionnorm_cdf
(x)
Janus/janus/janusflow/models/siglip_vit.py:57
↓ 2 callersFunctionnorm_cdf
(x)
Janus/janus/models/siglip_vit.py:57
↓ 2 callersFunctionnormalize
(answer, pi)
verl/utils/reward_score/prime_math/grader.py:119
↓ 2 callersFunctionnormalize_pp_vpp_params
Normalize the pp vpp params into a complete named parameters. This is useful when gather parameters from pp ranks and passed to a model witho
verl/utils/model.py:198
↓ 2 callersMethodoffload_params_to_cpu
(self)
verl/workers/reward_model/megatron/reward_model.py:254
↓ 2 callersFunctionpreprocess_img
(image, size=(384, 384), processing=None)
verl/utils/dataset/sft_dataset.py:218
↓ 2 callersFunctionreduce_metrics
(metrics: Dict[str, List[Any]])
verl/trainer/ppo/metric_utils.py:24
↓ 2 callersMethodremove_previous_save_local_path
(self, path)
verl/utils/checkpoint/checkpoint_manager.py:75
↓ 2 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/models/llama/megatron/layers/parallel_attention.py:163
↓ 2 callersMethodsave_checkpoint
(self, step)
verl/trainer/img_rl_fsdp_sft_trainer.py:674
↓ 2 callersFunctionset_ulysses_sequence_parallel_group
Set ulysses sequence parallel process group.
verl/utils/ulysses.py:29
↓ 2 callersFunctionslice_input_tensor
(x: Tensor, dim: int, padding: bool = True, group: ProcessGroup = None)
verl/utils/ulysses.py:116
↓ 2 callersFunctionsplit_tuple
Split the elements in a tuple/interval, while handling well-formatted commas in large numbers
verl/utils/reward_score/prime_math/__init__.py:254
↓ 2 callersFunctionstrip_string
(string)
verl/utils/reward_score/math.py:165
↓ 2 callersFunctionstripped_string_compare
(s1, s2)
verl/utils/reward_score/prime_code/testing_util.py:611
↓ 2 callersMethodtext_generate
(self, input_ids, attention_mask, do_sample,
Janus/janus/models/modeling_vlm.py:385
↓ 2 callersMethodtext_img_generate_two_stage
(self, input_ids, img_input_ids, attention_mask,
Janus/janus/models/modeling_vlm.py:542
↓ 2 callersMethodupdate_options
(self, options: Dict)
verl/single_controller/ray/base.py:159
↓ 2 callersMethodupdate_policy
Update the policy with an iterator of DataProto Args: data (DataProto): an iterator over the DataProto that returns by
verl/workers/actor/base.py:54
↓ 2 callersMethodupdate_sampling_params
(self, **kwargs)
verl/workers/rollout/vllm_rollout/fire_vllm_rollout.py:86
↓ 2 callersMethodvalidation_step
(self, batch: TensorDict)
verl/trainer/img_rl_fsdp_sft_trainer.py:652
↓ 2 callersMethodvalidation_step
(self, batch: TensorDict)
verl/trainer/fsdp_sft_trainer.py:418
↓ 1 callersMethod__init__
( self, image_size: int, min_size: int = 14, image_mean: Union[Tuple[float, fl
Janus/janus/janusflow/models/image_processing_vlm.py:95
↓ 1 callersMethod__init__
( self, image_size: int, min_size: int = 14, image_mean: Union[Tuple[float, fl
Janus/janus/models/image_processing_vlm.py:95
↓ 1 callersMethod__init__
(self, numel: int, numel_padded: int, dtype: torch.dtype, source: Optional[torch.Tensor] = None)
verl/utils/memory_buffer.py:30
↓ 1 callersMethod__init__
(self, resource_pool: RayResourcePool, ray_cls_with_init: RayClassWithInitAr
verl/single_controller/ray/megatron.py:44
↓ 1 callersMethod__init__
(self, config: Qwen2Config, megatron_config: ModelParallelConfig)
verl/models/qwen2/megatron/layers/parallel_decoder.py:37
↓ 1 callersMethod__init__
(self, input_size, num_heads, num_key_value_heads,
verl/models/qwen2/megatron/layers/parallel_linear.py:23
↓ 1 callersMethod__init__
(self, config: LlamaConfig, megatron_config: ModelParallelConfig)
verl/models/llama/megatron/layers/parallel_decoder.py:37
↓ 1 callersMethod__init__
(self, input_size, num_heads, num_key_value_heads,
verl/models/llama/megatron/layers/parallel_linear.py:23
↓ 1 callersMethod_balance_batch
Reorder the data on single controller such that each dp rank gets similar total tokens
verl/trainer/ppo/ray_trainer.py:777
↓ 1 callersMethod_bind_worker_method
Bind the worker method to the WorkerGroup
verl/single_controller/base/worker_group.py:138
↓ 1 callersFunction_bind_workers_method_to_parent
Binds the methods of each worker to the WorkerDict. Note that we only bind public methods that are decorated by register
verl/single_controller/ray/base.py:400
↓ 1 callersMethod_block_until_all_workers_alive
(self)
verl/single_controller/base/worker_group.py:115
↓ 1 callersFunction_broadcast_tp_shard_tensor_gate_up
broadcast tensor in tp shards across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:227
↓ 1 callersFunction_broadcast_tp_shard_tensor_gate_up
broadcast tensor in tp shards across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:206
↓ 1 callersFunction_broadcast_tp_shard_tensor_gate_up
broadcast tensor in tp shards across mp_group
verl/models/llama/megatron/checkpoint_utils/llama_saver.py:206
↓ 1 callersFunction_broadcast_tp_shard_tensor_gate_up
broadcast tensor in tp shards across mp_group
verl/models/llama/megatron/checkpoint_utils/llama_loader.py:231
↓ 1 callersFunction_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
verl/models/llama/megatron/checkpoint_utils/llama_saver.py:259
↓ 1 callersFunction_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
verl/models/llama/megatron/checkpoint_utils/llama_loader.py:285
↓ 1 callersFunction_broadcast_tp_shard_tensor_vocab
broadcast tensor in tp shards across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:134
↓ 1 callersFunction_broadcast_tp_shard_tensor_vocab
broadcast tensor in tp shards across mp_group
verl/models/llama/megatron/checkpoint_utils/llama_loader.py:138
↓ 1 callersMethod_build_critic_model_optimizer
(self, model_path, megatron_config
verl/workers/megatron_workers.py:515
↓ 1 callersMethod_build_critic_model_optimizer
(self, config)
verl/workers/fsdp_workers.py:703
↓ 1 callersMethod_build_dataloader
(self)
verl/trainer/img_rl_fsdp_sft_trainer.py:137
↓ 1 callersMethod_build_dataloader
(self)
verl/trainer/fsdp_sft_trainer.py:121
↓ 1 callersMethod_build_model
(self, config)
verl/workers/fsdp_workers.py:1001
↓ 1 callersMethod_build_model_optimizer
(self)
verl/trainer/img_rl_fsdp_sft_trainer.py:210
← previousnext →201–300 of 1,182, ranked by callers