MCPcopy Create free account

hub / github.com/Jiayi-Pan/TinyZero / functions

Functions1,293 in github.com/Jiayi-Pan/TinyZero

↓ 4 callersFunctionget_tensor_model_parallel_group
Get the tensor model parallel group the caller rank belongs to.
verl/third_party/vllm/vllm_v_0_4_2/parallel_state.py:273
↓ 4 callersFunctionget_tensor_model_parallel_world_size
Return world size for the tensor model parallel group.
verl/third_party/vllm/vllm_v_0_4_2/parallel_state.py:279
↓ 4 callersFunctioninit_model_parallel_config
(config: DictConfig)
verl/utils/megatron_utils.py:201
↓ 4 callersFunctionload_megatron_model_weights
(config, model_config, parallel_model,
verl/utils/model.py:253
↓ 4 callersMethodmake_iterator
Make an iterator from the DataProto. This is built upon that TensorDict can be used as a normal Pytorch dataset. See https://pytorch.org/tenso
verl/protocol.py:441
↓ 4 callersFunctionoffload_fsdp_optimizer
(optimizer)
verl/utils/fsdp_utils.py:113
↓ 4 callersFunctionprint_model_size
(model: nn.Module, name: str = None)
verl/utils/model.py:129
↓ 4 callersMethodprofile_run
(self)
verl/third_party/vllm/vllm_v_0_3_1/model_runner.py:235
↓ 4 callersFunctionreduce_metrics
(metrics: dict)
verl/trainer/ppo/ray_trainer.py:150
↓ 4 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:131
↓ 4 callersFunctionrotate_half
Rotates half the hidden dims of the input.
verl/models/llama/megatron/layers/parallel_attention.py:116
↓ 4 callersFunctionset_ulysses_sequence_parallel_group
Set ulysses sequence parallel process group.
verl/utils/ulysses.py:29
↓ 3 callersMethod__init__
(self)
verl/single_controller/ray/base.py:442
↓ 3 callersMethod__init__
(self, dim, max_position_embeddings=2048, base=10000, device=None)
verl/models/llama/megatron/layers/parallel_attention.py:37
↓ 3 callersMethod__init__
(self, load_config: LoadConfig)
verl/third_party/vllm/vllm_v_0_4_2/model_loader.py:164
↓ 3 callersFunction_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/models/llama/megatron/checkpoint_utils/llama_loader.py:178
↓ 3 callersMethod_build_param_references
(self, pp_rank, maintain_weight=False)
verl/workers/sharding_manager/megatron_vllm.py:88
↓ 3 callersFunction_concat_data_proto_or_future
(output: List)
verl/single_controller/base/decorator.py:129
↓ 3 callersFunction_get_and_verify_dtype
( config: PretrainedConfig, dtype: Union[str, torch.dtype], )
verl/third_party/vllm/vllm_v_0_3_1/config.py:475
↓ 3 callersFunction_get_and_verify_max_len
Get and verify the model's maximum length.
verl/third_party/vllm/vllm_v_0_3_1/config.py:525
↓ 3 callersFunction_get_gpt_model
(model)
verl/models/llama/megatron/checkpoint_utils/llama_saver.py:93
↓ 3 callersFunction_pre_process_inputs
(pad_token_id, prompt_token_ids: torch.Tensor)
verl/workers/rollout/vllm_rollout/vllm_rollout.py:49
↓ 3 callersMethod_verify_cuda_graph
(self)
verl/third_party/vllm/vllm_v_0_3_1/config.py:153
↓ 3 callersMethod_verify_quantization
(self)
verl/third_party/vllm/vllm_v_0_3_1/config.py:124
↓ 3 callersFunctionapply_monkey_patch
(config: PretrainedConfig, verbose=True)
verl/models/transformers/monkey_patch.py:42
↓ 3 callersFunctionapply_rotary_pos_emb
(q, k, cos, sin, position_ids)
verl/models/llama/megatron/layers/parallel_attention.py:123
↓ 3 callersFunctionbuild_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:68
↓ 3 callersFunctioncalc_padded_numel
for cuda memory alignment, make sure alignment by 128-bits
verl/utils/memory_buffer.py:51
↓ 3 callersFunctioncheck_model_support_rmpad
(model_type: str)
verl/models/registry.py:27
↓ 3 callersFunctioncompute_transformers_input_shapes
(batches, meta_info)
verl/utils/megatron/pipeline_parallel.py:22
↓ 3 callersMethodexecute_rank_zero_async
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:322
↓ 3 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:547
↓ 3 callersMethodfrom_detached
(cls, worker_names=None, ray_cls_with_init=None)
verl/single_controller/ray/base.py:285
↓ 3 callersMethodget
(self)
verl/utils/rendezvous/ray_backend.py:30
↓ 3 callersFunctionget_constant_schedule_with_warmup
( optimizer: Optimizer, num_warmup_steps: int, last_epoch: int = -1, )
verl/utils/torch_functional.py:422
↓ 3 callersFunctionget_default_kwargs_for_model_parallel_config
()
verl/utils/megatron/tensor_parallel.py:32
↓ 3 callersMethodget_lora_tokenizer
(self, lora_request: Optional[LoRARequest])
verl/third_party/vllm/vllm_v_0_3_1/tokenizer.py:52
↓ 3 callersFunctionget_megatron_optimizer
( model, config: OptimizerConfig, no_weight_decay_cond=None, scale_lr_cond=Non
verl/utils/megatron/optimizer.py:26
↓ 3 callersMethodget_num_unfinished_requests
Gets the number of unfinished requests.
verl/third_party/vllm/vllm_v_0_3_1/llm_engine_sp.py:340
↓ 3 callersFunctionget_parallel_model_from_config
(config, megatron_config, pre_process=None, post_process=None, value=False)
verl/utils/model.py:234
↓ 3 callersFunctionget_tensor_model_parallel_world_size
Return world size for the tensor model parallel group.
verl/third_party/vllm/vllm_v_0_6_3/parallel_state.py:297
↓ 3 callersFunctionget_tensor_model_parallel_world_size
Return world size for the tensor model parallel group.
verl/third_party/vllm/vllm_v_0_5_4/parallel_state.py:288
↓ 3 callersMethodhas_unfinished_requests
Returns True if there are unfinished requests.
verl/third_party/vllm/vllm_v_0_3_1/llm_engine_sp.py:344
↓ 3 callersFunctionimport_external_libs
(external_libs=None)
verl/utils/import_utils.py:41
↓ 3 callersFunctioninit_megatron_optim_config
(optim_config: Dict)
verl/utils/megatron_utils.py:185
↓ 3 callersMethodinit_workers
Init resource pool and worker group
verl/trainer/ppo/ray_trainer.py:444
↓ 3 callersFunctioninitialize_global_process_group
(timeout_second=36000)
verl/utils/distributed.py:18
↓ 3 callersFunctioninitialize_model_parallel
NOTE: This method is a hack from the open-sourced version without asertion of world_size = tp * pp Initialize model parallel groups.
verl/third_party/vllm/vllm_v_0_6_3/parallel_state.py:199
↓ 3 callersFunctionload_dtensor_weights
(actor_weights: Dict, vllm_model: nn.Module)
verl/third_party/vllm/vllm_v_0_6_3/dtensor_weight_loaders.py:363
↓ 3 callersFunctionload_dtensor_weights
(actor_weights: Dict, vllm_model: nn.Module)
verl/third_party/vllm/vllm_v_0_5_4/dtensor_weight_loaders.py:323
↓ 3 callersFunctionload_dtensor_weights
(actor_weights: Dict, vllm_model: nn.Module)
verl/third_party/vllm/vllm_v_0_4_2/dtensor_weight_loaders.py:252
↓ 3 callersFunctionload_megatron_weights
(actor_weights: Dict, vllm_model: nn.Module)
verl/third_party/vllm/vllm_v_0_6_3/megatron_weight_loaders.py:291
↓ 3 callersFunctionload_megatron_weights
(actor_weights: Dict, vllm_model: nn.Module)
verl/third_party/vllm/vllm_v_0_5_4/megatron_weight_loaders.py:290
↓ 3 callersFunctionload_megatron_weights
(actor_weights: Dict, vllm_model: nn.Module)
verl/third_party/vllm/vllm_v_0_4_2/megatron_weight_loaders.py:290
↓ 3 callersMethodload_model
( self, actor_model: Union[PreTrainedModel, Dict], model_config: ModelConfig,
verl/third_party/vllm/vllm_v_0_6_3/model_loader.py:210
↓ 3 callersMethodload_model
(self, actor_model: Union[PreTrainedModel, Dict], model_config: ModelConfig, device_config:
verl/third_party/vllm/vllm_v_0_5_4/model_loader.py:189
↓ 3 callersMethodload_model
(self, actor_model: Union[PreTrainedModel, Dict], model_config: Mo
verl/third_party/vllm/vllm_v_0_4_2/model_loader.py:178
↓ 3 callersFunctionload_weights
(actor_weights: Dict, vllm_model: nn.Module)
verl/third_party/vllm/vllm_v_0_3_1/model_loader.py:181
↓ 3 callersFunctionmake_batch_generator
(batches, vpp_size)
verl/utils/megatron/pipeline_parallel.py:43
↓ 3 callersFunctionmake_map_fn
(split)
examples/data_preprocess/hellaswag.py:53
↓ 3 callersMethodoffload_model_weights
(self)
verl/third_party/vllm/vllm_v_0_3_1/llm.py:274
↓ 3 callersFunctionpad_dataproto_to_divisor
Pad a DataProto to size divisible by size_divisor Args: size_divisor (int): size divisor Returns: data: (DataProto): the pad
verl/protocol.py:40
↓ 3 callersMethodreorder
Note that this operation is in-place
verl/protocol.py:539
↓ 3 callersMethodsave_checkpoint
(self, step)
verl/trainer/fsdp_sft_trainer.py:295
↓ 3 callersMethodset_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/llama/megatron/modeling_llama_megatron.py:457
↓ 3 callersFunctionsplit_dict_tensor_into_batches
(tensors: TensorDict, batch_size)
verl/utils/torch_functional.py:203
↓ 3 callersMethodsub
(self, data: DataProto)
tests/ray/test_colocated_workers.py:44
↓ 3 callersMethodsync_model_weights
(self, actor_weights: Dict[str, torch.Tensor])
verl/third_party/vllm/vllm_v_0_3_1/llm.py:271
↓ 3 callersMethodto_str
(precision)
verl/utils/torch_dtypes.py:74
↓ 3 callersFunctionunion_numpy_dict
(tensor_dict1: dict[np.ndarray], tensor_dict2: dict[np.ndarray])
verl/protocol.py:80
↓ 3 callersFunctionunion_tensor_dict
Union two tensordicts.
verl/protocol.py:66
↓ 3 callersFunctionunpad_dataproto
(data: 'DataProto', pad_size)
verl/protocol.py:60
↓ 3 callersFunctionupdate_megatron_weight_loader
()
verl/third_party/vllm/vllm_v_0_6_3/megatron_weight_loaders.py:306
↓ 3 callersFunctionupdate_megatron_weight_loader
()
verl/third_party/vllm/vllm_v_0_5_4/megatron_weight_loaders.py:305
↓ 3 callersFunctionupdate_megatron_weight_loader
()
verl/third_party/vllm/vllm_v_0_4_2/megatron_weight_loaders.py:305
↓ 3 callersFunctionvocab_parallel_log_probs_from_logits
TODO(zhangchi.usc1992): We may change the implementation later
verl/utils/megatron/tensor_parallel.py:136
↓ 2 callersMethod__init__
(self, config)
verl/workers/megatron_workers.py:410
↓ 2 callersMethod__init__
(self, config)
verl/workers/fsdp_workers.py:509
↓ 2 callersMethod_build_model_optimizer
(self, model_path, megatron_config: ModelParalle
verl/workers/megatron_workers.py:124
↓ 2 callersMethod_build_model_optimizer
(self, model_path, fsdp_config,
verl/workers/fsdp_workers.py:111
↓ 2 callersMethod_compute_loss
(self, batch)
verl/trainer/fsdp_sft_trainer.py:218
↓ 2 callersFunction_compute_response_info
(batch)
verl/trainer/ppo/ray_trainer.py:156
↓ 2 callersMethod_forward_micro_batch
(self, micro_batch)
verl/workers/critic/dp_critic.py:53
↓ 2 callersMethod_forward_micro_batch
Returns: entropy: # (bs, response_len) log_probs: # (bs, response_len)
verl/workers/actor/dp_actor.py:58
↓ 2 callersMethod_get_stats
Get Stats to be Logged to Prometheus.
verl/third_party/vllm/vllm_v_0_3_1/llm_engine_sp.py:600
↓ 2 callersFunction_is_non_local
(path)
verl/utils/fs.py:29
↓ 2 callersMethod_offload_params_to_cpu
(self, pp_rank, to_empty=False)
verl/workers/sharding_manager/megatron_vllm.py:102
↓ 2 callersFunction_pad_tensor
(x: Tensor, dim: int, padding_size: int)
verl/utils/ulysses.py:103
↓ 2 callersMethod_pad_to_length
(self, input_ids, attention_mask)
verl/utils/dataset/rm_dataset.py:99
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
verl/models/llama/megatron/layers/parallel_attention.py:51
↓ 2 callersFunction_unpad_tensor
(x: Tensor, dim: int, padding_size: int)
verl/utils/ulysses.py:110
↓ 2 callersFunction_unwrap_ray_remote
(cls)
verl/single_controller/ray/base.py:414
↓ 2 callersMethodadd
(self, data: DataProto)
tests/ray/test_colocated_workers.py:31
↓ 2 callersMethodadd
(self, a, b)
tests/e2e/envs/digit_completion/task.py:78
↓ 2 callersMethodadd_request
Add a request to the engine's request pool. The request is added to the request pool and will be processed by the scheduler as `engin
verl/third_party/vllm/vllm_v_0_3_1/llm_engine_sp.py:238
↓ 2 callersMethodall_gather
(self)
tests/ray/test_worker_group_torch.py:40
↓ 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:118
↓ 2 callersFunctionapply_kl_penalty
(data: DataProto, kl_ctrl: core_algos.AdaptiveKLController, kl_penalty='kl')
verl/trainer/ppo/ray_trainer.py:84
↓ 2 callersMethodcache_swap
( self, blocks_to_swap_in: Dict[int, int], blocks_to_swap_out: Dict[int, int],
verl/third_party/vllm/vllm_v_0_3_1/worker.py:188
← previousnext →101–200 of 1,293, ranked by callers