MCPcopy Create free account

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

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

↓ 270 callersMethodget
Return a tensor with the input `shape` as a view into the 1-D data starting at `start_index`.
verl/utils/memory_buffer.py:43
↓ 158 callersMethodto
move the batch to device Args: device (torch.device, str): torch device Returns: DataProto: the current Data
verl/protocol.py:327
↓ 62 callersMethodget
(self)
verl/protocol.py:667
↓ 62 callersFunctionlog_gpu_memory_usage
(head: str, logger: logging.Logger = None, level=logging.DEBUG, rank: int = 0)
verl/utils/debug/performance.py:20
↓ 57 callersMethodkeys
(self)
Janus/janus/models/processing_vlm.py:33
↓ 46 callersFunctionprint_rank_0
If distributed is initialized, print only on rank 0.
verl/utils/megatron_utils.py:250
↓ 35 callersMethodupdate
(self, current_kl, n_steps)
verl/trainer/ppo/core_algos.py:52
↓ 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/protocol.py:492
↓ 25 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/utils/fs.py:58
↓ 24 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/protocol.py:376
↓ 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/protocol.py:525
↓ 19 callersFunctionhf_tokenizer
Create a huggingface pretrained tokenizer which correctness handles eos and pad tokens. Args: name (str): The name of the tokenizer.
verl/utils/tokenizer.py:35
↓ 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
verl/utils/ulysses.py:61
↓ 18 callersMethodrepeat
Repeat the batch data a specified number of times. Args: repeat_times (int): Number of times to repeat the data.
verl/protocol.py:557
↓ 16 callersFunctionconvert_config
(hf_config: PretrainedConfig, megatron_config)
verl/utils/megatron_utils.py:156
↓ 16 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/protocol.py:341
↓ 14 callersMethodcopy
(self)
Janus/janus/utils/conversation.py:196
↓ 14 callersMethodeval
(self)
verl/workers/sharding_manager/megatron_vllm.py:167
↓ 14 callersMethodload
(data_path)
verl/utils/dataset/rl_dataset.py:537
↓ 13 callersFunctionget_ulysses_sequence_parallel_world_size
Get ulysses sequence parallel world size.
verl/utils/ulysses.py:45
↓ 12 callersMethodlog
(self, data, step, backend=None)
verl/utils/tracking.py:97
↓ 11 callersFunction_timer
(name: str, timing_raw: Dict[str, float])
verl/trainer/ppo/ray_trainer.py:236
↓ 11 callersMethodencode
(self, x)
Janus/janus/models/vq_model.py:494
↓ 11 callersMethodencode
Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary. Args: text (`str`, `List[str]` or
verl/workers/rollout/tokenizer.py:70
↓ 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
verl/protocol.py:292
↓ 11 callersMethodnamed_parameters
(self)
verl/utils/memory_buffer.py:208
↓ 11 callersFunctionoffload_fsdp_model_to_cpu
(model: FSDP, empty_cache: bool = True)
verl/utils/fsdp_utils.py:115
↓ 11 callersMethodto
(self, device, dtype=torch.bfloat16)
Janus/janus/models/processing_vlm.py:63
↓ 11 callersMethodto_dtype
(precision)
verl/utils/torch_dtypes.py:63
↓ 10 callersMethodgenerate
(self, input_ids, attention_mask, do_sample,
Janus/janus/models/modeling_vlm.py:277
↓ 10 callersMethodget
Return a tensor with the input `shape` as a view into the 1-D data starting at `start_index`.
verl/utils/megatron/memory.py:33
↓ 10 callersFunctionget_ulysses_sequence_parallel_group
Get ulysses sequence parallel process group.
verl/utils/ulysses.py:37
↓ 10 callersFunctionload_fsdp_model_to_gpu
(model: FSDP)
verl/utils/fsdp_utils.py:136
↓ 9 callersMethod__init__
( self, in_channels, block_out_channels, patch_size, bias, ele
Janus/janus/janusflow/models/uvit.py:431
↓ 9 callersMethodapply_sft_template_for_multi_turn_prompts
Applies the SFT template to conversation. An example of conversation: conversation = [ { "role":
Janus/janus/models/processing_vlm.py:137
↓ 9 callersFunctioncompute_position_id_with_mask
(mask)
verl/utils/model.py:194
↓ 9 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/workers/rollout/tokenizer.py:86
↓ 9 callersMethodget_megatron_rank_info
(self)
verl/single_controller/base/megatron/worker.py:31
↓ 9 callersMethodget_rng_state
()
verl/utils/checkpoint/checkpoint_manager.py:107
↓ 9 callersMethodpreprocess_data
(self, data: DataProto)
verl/workers/sharding_manager/base.py:29
↓ 9 callersMethodtrain
(self)
verl/workers/sharding_manager/megatron_vllm.py:171
↓ 8 callersMethodappend_message
Append a new message.
Janus/janus/utils/conversation.py:157
↓ 8 callersFunctionlogprobs_from_logits
See: https://github.com/pytorch/pytorch/issues/563#issuecomment-330103591
verl/utils/torch_functional.py:48
↓ 8 callersFunctionmasked_mean
Compute mean of tensor with a masked values.
verl/utils/torch_functional.py:118
↓ 8 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/utils/torch_functional.py:242
↓ 8 callersMethodpostprocess_data
(self, data: DataProto)
verl/workers/sharding_manager/base.py:32
↓ 8 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/protocol.py:434
↓ 8 callersFunctionwith_article
(name: str)
gen_prompt/create_prompts.py:19
↓ 7 callersMethod__init__
( self, in_channels=3, ch=128, ch_mult=(1, 1, 2, 2, 4), num_res_blocks
Janus/janus/models/vq_model.py:47
↓ 7 callersMethod__init__
(self, params)
Janus/janus/models/modeling_vlm.py:45
↓ 7 callersFunction_megatron_calc_global_rank
given TP,DP,PP rank to get the global rank.
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/models/llama/megatron/checkpoint_utils/llama_saver.py:27
↓ 7 callersFunctionappend_to_dict
(data: Dict, new_data: Dict)
verl/utils/py_functional.py:41
↓ 7 callersMethodbackward
(ctx: Any, grad_output: Tensor)
verl/utils/ulysses.py:226
↓ 7 callersFunctionclean_traceback
(error_traceback)
verl/utils/reward_score/prime_code/testing_util.py:101
↓ 7 callersFunctionoffload_fsdp_optimizer
(optimizer)
verl/utils/fsdp_utils.py:152
↓ 7 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/utils/ulysses.py:252
↓ 7 callersFunctionunwrap_model
(model, module_instances=ALL_MODULE_WRAPPER_CLASSNAMES)
verl/utils/megatron_utils.py:138
↓ 6 callersFunction_broadcast_tensor
broadcast tensor from rank0 across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:100
↓ 6 callersFunction_broadcast_tensor
broadcast tensor from rank0 across mp_group
verl/models/llama/megatron/checkpoint_utils/llama_loader.py:104
↓ 6 callersFunctioncombined_int_check
(val)
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:
verl/utils/ulysses.py:85
↓ 6 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/utils/torch_functional.py:150
↓ 6 callersFunctionget_init_weight_context_manager
(use_meta_tensor=True, mesh: DeviceMesh = None)
verl/utils/fsdp_utils.py:39
↓ 6 callersFunctionhf_processor
Create a huggingface processor to process multimodal data. Args: name_or_path (str): The name of the processor. Returns: tra
verl/utils/tokenizer.py:62
↓ 6 callersFunctionis_non_local
(path)
verl/utils/fs.py:32
↓ 6 callersFunctionregister_conv_template
Register a new conversation template.
Janus/janus/utils/conversation.py:225
↓ 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/models/qwen2/megatron/layers/parallel_attention.py:131
↓ 6 callersMethodresize
Args: pil_img (PIL.Image): [H, W, 3] in PIL.Image in RGB Returns: x (np.ndarray): [3, self.image_size, self
Janus/janus/models/image_processing_vlm.py:127
↓ 6 callersFunctiontruncatefn
(s, length=300)
verl/utils/reward_score/prime_code/testing_util.py:42
↓ 5 callersFunctionNormalize
(in_channels, norm_type="group")
Janus/janus/models/vq_model.py:398
↓ 5 callersMethod__init__
(self, config: Qwen2Config, megatron_config: ModelParallelConfig)
verl/models/qwen2/megatron/modeling_qwen2_megatron.py:81
↓ 5 callersMethod__init__
(self, config: LlamaConfig, megatron_config: ModelParallelConfig)
verl/models/llama/megatron/modeling_llama_megatron.py:82
↓ 5 callersFunction_broadcast_tensor
broadcast tensor across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:123
↓ 5 callersFunction_broadcast_tensor
broadcast tensor across mp_group
verl/models/llama/megatron/checkpoint_utils/llama_saver.py:123
↓ 5 callersFunction_hdfs_cmd
(cmd: str)
verl/utils/hdfs_io.py:139
↓ 5 callersFunction_run_cmd
(cmd: str, timeout=None)
verl/utils/hdfs_io.py:135
↓ 5 callersMethodadd
(self, idx: int, val: int)
verl/utils/seqlen_balancing.py:33
↓ 5 callersFunctionapply_monkey_patch
Replace _flash_attention_forward to _ulysses_flash_attention_forward
verl/models/transformers/monkey_patch.py:87
↓ 5 callersFunctionapply_rotary_pos_emb
(q, k, cos, sin, position_ids)
verl/models/qwen2/megatron/layers/parallel_attention.py:123
↓ 5 callersFunctionbroadcast_dict_tensor
TODO: optimize this. Technically, we only need one broadcast
verl/utils/torch_functional.py:179
↓ 5 callersMethoddecode
(self, quant)
Janus/janus/models/vq_model.py:500
↓ 5 callersFunctionfunc
(*args, **kwargs)
verl/single_controller/ray/base.py:38
↓ 5 callersFunctiongather_outpus_and_unpad
(x: Tensor, gather_dim: int, unpad_dim: int = None,
verl/utils/ulysses.py:233
↓ 5 callersFunctionget_conv_template
Get a conversation template.
Janus/janus/utils/conversation.py:235
↓ 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/utils/fsdp_utils.py:54
↓ 5 callersFunctionget_micro_data_parallel_world_size
()
verl/workers/sharding_manager/megatron_vllm.py:441
↓ 5 callersFunctionget_model
Build the model.
verl/utils/megatron_utils.py:41
↓ 5 callersMethodinit_model
(self)
verl/workers/fsdp_workers.py:822
↓ 5 callersFunctionmodel_name_to_cls
(cls_name)
Janus/janus/models/modeling_vlm.py:62
↓ 5 callersFunctionupdate_model_config
(module_config, override_config_kwargs)
verl/utils/model.py:42
↓ 5 callersFunctionvalidate_ulysses_config
(num_heads, ulysses_sequence_size)
verl/utils/ulysses.py:291
↓ 4 callersMethod__init__
(self, **kwargs)
Janus/janus/janusflow/models/modeling_vlm.py:101
↓ 4 callersMethod__init__
(self, dim, max_position_embeddings=2048, base=10000, device=None)
verl/models/llama/megatron/layers/parallel_attention.py:37
↓ 4 callersFunction_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:162
↓ 4 callersFunction_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/models/llama/megatron/checkpoint_utils/llama_saver.py:162
↓ 4 callersFunction_get_cpu_tensor
(tensor: torch.Tensor)
verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:116
↓ 4 callersFunction_get_cpu_tensor
(tensor: torch.Tensor)
verl/models/llama/megatron/checkpoint_utils/llama_saver.py:116
↓ 4 callersFunction_get_gpt_model
(model)
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:66
↓ 4 callersFunction_get_gpt_model
(model)
verl/models/llama/megatron/checkpoint_utils/llama_loader.py:70
next →1–100 of 1,182, ranked by callers