Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Franklin-Zhang0/ReasonGen-R1
/ functions
Functions
1,182 in github.com/Franklin-Zhang0/ReasonGen-R1
⨍
Functions
1,182
◇
Types & classes
202
↳
Endpoints
24
↓ 4 callers
Function
_is_non_local
(path: str)
verl/utils/hdfs_io.py:143
↓ 4 callers
Function
_repeat_interleave
(value: Union[torch.Tensor, np.ndarray], repeats: int)
verl/workers/rollout/vllm_rollout/vllm_rollout_spmd.py:58
↓ 4 callers
Function
_split_args_kwargs_data_proto
(chunks, *args, **kwargs)
verl/single_controller/base/decorator.py:45
↓ 4 callers
Method
add_image_token
Args: image_indices (List[int]): [index_0, index_1, ..., index_j] input_ids (torch.LongTensor): [N] Returns
Janus/janus/models/processing_vlm.py:215
↓ 4 callers
Function
allgather_dict_tensors
TODO: optimize this. - We can use async ops - We can use only one allgather Args: tensors: size: group:
verl/utils/torch_functional.py:188
↓ 4 callers
Function
build_memory_reference_from_module
(module: torch.nn.Module, memory_buffers: Dict[torch.dtype, MemoryBuffe
verl/utils/memory_buffer.py:100
↓ 4 callers
Method
estimate_flops
Estimate the FLOPS based on the number of valid tokens in the current batch and the time taken. Args: batch_seqlens (Lis
verl/utils/flops_counter.py:114
↓ 4 callers
Method
execute_rank_zero_async
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:342
↓ 4 callers
Method
finish
(self)
verl/utils/tracking.py:127
↓ 4 callers
Method
generate_sequences
Generate sequences
verl/workers/rollout/base.py:35
↓ 4 callers
Method
get
(self)
verl/utils/rendezvous/ray_backend.py:30
↓ 4 callers
Function
get_micro_data_parallel_group
()
verl/workers/sharding_manager/megatron_vllm.py:436
↓ 4 callers
Method
get_placement_groups
(self, strategy="STRICT_PACK", name=None)
verl/single_controller/ray/base.py:84
↓ 4 callers
Method
get_resource_pool
Get the resource pool of the worker_cls
verl/trainer/ppo/ray_trainer.py:101
↓ 4 callers
Method
gradient_checkpointing_enable
(self, gradient_checkpointing_kwargs)
Janus/janus/models/modeling_vlm.py:629
↓ 4 callers
Function
is_digit
(s)
verl/utils/reward_score/prime_math/grader.py:107
↓ 4 callers
Function
load_megatron_model_weights
(config, model_config, parallel_model,
verl/utils/model.py:280
↓ 4 callers
Function
nonlinearity
(x)
Janus/janus/models/vq_model.py:393
↓ 4 callers
Method
prepare_gen_img_embeds
(self, image_ids: torch.LongTensor)
Janus/janus/models/modeling_vlm.py:272
↓ 4 callers
Function
print_model_size
(model: nn.Module, name: str = None)
verl/utils/model.py:146
↓ 4 callers
Method
rank
(self)
verl/single_controller/base/worker.py:206
↓ 4 callers
Function
rotate_half
Rotates half the hidden dims of the input.
verl/models/qwen2/megatron/layers/parallel_attention.py:116
↓ 4 callers
Function
rotate_half
Rotates half the hidden dims of the input.
verl/models/llama/megatron/layers/parallel_attention.py:148
↓ 4 callers
Method
save_checkpoint
(self, step)
verl/trainer/fsdp_sft_trainer.py:425
↓ 4 callers
Method
set_system_message
Set the system message.
Janus/janus/utils/conversation.py:153
↓ 4 callers
Method
shared_embedding_or_output_weight
(self)
verl/models/qwen2/megatron/modeling_qwen2_megatron.py:604
↓ 4 callers
Method
text_img_generate
(self, input_ids, attention_mask, do_sample,
Janus/janus/models/modeling_vlm.py:448
↓ 4 callers
Method
to
(self, device, dtype=torch.bfloat16)
Janus/janus/janusflow/models/processing_vlm.py:63
↓ 4 callers
Method
to_dict
(self)
verl/single_controller/base/worker.py:76
↓ 4 callers
Function
trunc_normal_
r"""The original timm.models.layers.weight_init.trunc_normal_ can not handle bfloat16 yet, here we first convert the tensor to float32, apply the
Janus/janus/janusflow/models/siglip_vit.py:92
↓ 4 callers
Function
trunc_normal_
r"""The original timm.models.layers.weight_init.trunc_normal_ can not handle bfloat16 yet, here we first convert the tensor to float32, apply the
Janus/janus/models/siglip_vit.py:92
↓ 3 callers
Method
__init__
( self, dim: int, num_heads: int, mlp_ratio: float = 4.0, qkv_bias: bo
Janus/janus/janusflow/models/siglip_vit.py:210
↓ 3 callers
Method
__init__
( self, dim: int, num_heads: int, mlp_ratio: float = 4.0, qkv_bias: bo
Janus/janus/models/siglip_vit.py:210
↓ 3 callers
Method
__init__
(self)
verl/single_controller/ray/base.py:462
↓ 3 callers
Method
__init__
(self, dim, max_position_embeddings=2048, base=10000, device=None)
verl/models/qwen2/megatron/layers/parallel_attention.py:37
↓ 3 callers
Function
_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:181
↓ 3 callers
Function
_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/models/llama/megatron/checkpoint_utils/llama_loader.py:185
↓ 3 callers
Method
_build_param_references
(self, pp_rank, maintain_weight=False)
verl/workers/sharding_manager/megatron_vllm.py:103
↓ 3 callers
Function
_concat_data_proto_or_future
(output: List)
verl/single_controller/base/decorator.py:129
↓ 3 callers
Function
_get_gpt_model
(model)
verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:85
↓ 3 callers
Function
_get_gpt_model
(model)
verl/models/llama/megatron/checkpoint_utils/llama_saver.py:85
↓ 3 callers
Function
_repeat_interleave
(value: Union[torch.Tensor, np.ndarray], repeats: int)
verl/workers/rollout/hf_rollout.py:37
↓ 3 callers
Method
_set_cos_sin_cache
(self, seq_len, device, dtype)
verl/models/llama/megatron/layers/parallel_attention.py:51
↓ 3 callers
Function
_str_is_int
(x: str)
verl/utils/reward_score/prime_math/__init__.py:111
↓ 3 callers
Method
apply_mask
(self, mask: torch.Tensor)
verl/protocol.py:601
↓ 3 callers
Function
build_memory_buffer
Build the memory buffer given weight_buffer_meta Args: weight_buffer_meta: contains mapping from name to a dictionary containing shape an
verl/utils/memory_buffer.py:71
↓ 3 callers
Function
calc_padded_numel
for cuda memory alignment, make sure alignment by 128-bits
verl/utils/memory_buffer.py:54
↓ 3 callers
Function
compute_transformers_input_shapes
(batches, meta_info)
verl/utils/megatron/pipeline_parallel.py:22
↓ 3 callers
Function
copy
r"""Works like shutil.copy() for file, and shutil.copytree for dir, and supports hdfs. Copy data and mode bits ("cp src dst"). Return the file's
verl/utils/hdfs_io.py:84
↓ 3 callers
Function
create_device_mesh
(world_size, fsdp_size)
verl/workers/fsdp_workers.py:52
↓ 3 callers
Method
decode_code
(self, code_b, shape=None, channel_first=True)
Janus/janus/models/vq_model.py:505
↓ 3 callers
Method
execute_all_sync
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:352
↓ 3 callers
Function
get_default_kwargs_for_model_parallel_config
()
verl/utils/megatron/tensor_parallel.py:32
↓ 3 callers
Function
get_generation_config
( model: str, trust_remote_code: bool = False, )
verl/utils/model.py:58
↓ 3 callers
Function
get_parallel_model_from_config
(config, megatron_config, pre_process=No
verl/utils/model.py:251
↓ 3 callers
Method
get_prompt
Get the prompt for generation.
Janus/janus/utils/conversation.py:76
↓ 3 callers
Function
get_sharding_strategy
(device_mesh)
verl/workers/fsdp_workers.py:62
↓ 3 callers
Function
import_external_libs
(external_libs=None)
verl/utils/import_utils.py:50
↓ 3 callers
Function
init_model_parallel_config
(config: DictConfig)
verl/utils/megatron_utils.py:206
↓ 3 callers
Method
load_checkpoint
(self, local_path, hdfs_path=None, del_local_after_load=True)
verl/workers/fsdp_workers.py:923
↓ 3 callers
Method
load_single_dataset
(self, data_path)
verl/utils/dataset/rl_dataset.py:531
↓ 3 callers
Function
make_batch_generator
(batches, vpp_size)
verl/utils/megatron/pipeline_parallel.py:43
↓ 3 callers
Function
make_plural
(name: str)
gen_prompt/create_prompts.py:26
↓ 3 callers
Function
model_name_to_cls
(cls_name)
Janus/janus/janusflow/models/modeling_vlm.py:37
↓ 3 callers
Method
pad_to_max_length
(self, input_ids, attention_mask)
verl/utils/dataset/sft_dataset.py:454
↓ 3 callers
Function
rearrange_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/utils/seqlen_balancing.py:224
↓ 3 callers
Method
set_input_tensor
Set input tensor to be used instead of forward()'s input. When doing pipeline parallelism the input from the previous stage comes fro
verl/models/qwen2/megatron/modeling_qwen2_megatron.py:462
↓ 3 callers
Function
set_random_seed
(seed)
verl/workers/megatron_workers.py:52
↓ 3 callers
Function
split_dict_tensor_into_batches
(tensors: TensorDict, batch_size)
verl/utils/torch_functional.py:222
↓ 3 callers
Function
time_limit
(seconds: float)
verl/utils/reward_score/prime_math/grader.py:345
↓ 3 callers
Method
to_str
(precision)
verl/utils/torch_dtypes.py:74
↓ 3 callers
Method
update
(self, entropy)
verl/utils/adaptive_entropy_coeff.py:29
↓ 3 callers
Function
vocab_parallel_log_probs_from_logits
TODO(zhangchi.usc1992): We may change the implementation later
verl/utils/megatron/tensor_parallel.py:141
↓ 2 callers
Method
__init__
(self, config)
verl/workers/megatron_workers.py:477
↓ 2 callers
Method
__init__
(self, config)
verl/workers/fsdp_workers.py:661
↓ 2 callers
Function
_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:281
↓ 2 callers
Function
_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:259
↓ 2 callers
Method
_build_model_optimizer
(self, model_path, megatron_config: ModelParalle
verl/workers/megatron_workers.py:136
↓ 2 callers
Method
_build_model_optimizer
(self, model_path, fsdp_config,
verl/workers/fsdp_workers.py:144
↓ 2 callers
Method
_compute_loss_and_backward
Compute loss with optional sequence parallelism and remove padding features
verl/trainer/img_rl_fsdp_sft_trainer.py:367
↓ 2 callers
Method
_compute_loss_and_backward
Compute loss with optional sequence parallelism and remove padding features
verl/trainer/fsdp_sft_trainer.py:286
↓ 2 callers
Function
_compute_response_info
(batch: DataProto)
verl/trainer/ppo/metric_utils.py:30
↓ 2 callers
Method
_download
(self, use_origin_parquet=False)
verl/utils/dataset/rl_dataset.py:119
↓ 2 callers
Method
_forward_micro_batch
(self, micro_batch)
verl/workers/critic/dp_critic.py:50
↓ 2 callers
Method
_forward_micro_batch
Returns: entropy: # (bs, response_len) log_probs: # (bs, response_len)
verl/workers/actor/dp_actor.py:84
↓ 2 callers
Function
_is_frac
(expr: str)
verl/utils/reward_score/prime_math/__init__.py:107
↓ 2 callers
Function
_normalize
Normalize answer expressions.
verl/utils/reward_score/prime_math/__init__.py:147
↓ 2 callers
Method
_offload_params_to_cpu
(self, pp_rank, to_empty=False)
verl/workers/sharding_manager/megatron_vllm.py:119
↓ 2 callers
Function
_pad_tensor
(x: Tensor, dim: int, padding_size: int)
verl/utils/ulysses.py:103
↓ 2 callers
Method
_pad_to_length
(self, input_ids, attention_mask)
verl/utils/dataset/rm_dataset.py:99
↓ 2 callers
Function
_parse
(s)
verl/utils/reward_score/prime_math/grader.py:312
↓ 2 callers
Method
_pos_embed
(self, x: torch.Tensor)
Janus/janus/janusflow/models/siglip_vit.py:476
↓ 2 callers
Method
_pos_embed
(self, x: torch.Tensor)
Janus/janus/models/siglip_vit.py:476
↓ 2 callers
Method
_read_files_and_tokenize
(self)
verl/utils/dataset/rl_dataset.py:125
↓ 2 callers
Method
_set_cos_sin_cache
(self, seq_len, device, dtype)
verl/models/qwen2/megatron/layers/parallel_attention.py:51
↓ 2 callers
Function
_strip_properly_formatted_commas
(expr: str)
verl/utils/reward_score/prime_math/__init__.py:136
↓ 2 callers
Function
_unpad_tensor
(x: Tensor, dim: int, padding_size: int)
verl/utils/ulysses.py:110
↓ 2 callers
Function
_unwrap_ray_remote
(cls)
verl/single_controller/ray/base.py:434
↓ 2 callers
Method
_validate
(self)
verl/trainer/ppo/ray_trainer.py:513
↓ 2 callers
Function
all_gather_data_proto
(data: DataProto, process_group)
verl/protocol.py:681
← previous
next →
101–200 of 1,182, ranked by callers