Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bruno686/VisPlay
/ functions
Functions
545 in github.com/bruno686/VisPlay
⨍
Functions
545
◇
Types & classes
97
↳
Endpoints
12
↓ 112 callers
Method
pop
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:367
↓ 67 callers
Method
get
(self)
verl/protocol.py:639
↓ 25 callers
Method
split
(self, split_size: int)
verl/protocol.py:521
↓ 19 callers
Method
to
move the batch to device Args: device (torch.device, str): torch device Returns: DataProto: the current Data
verl/protocol.py:311
↓ 17 callers
Method
update
Update kl_coef according to current KL.
verl/trainer/core_algos.py:41
↓ 14 callers
Method
from_pretrained
r""" Instantiate a [`GenerationConfig`] from a generation configuration file. Args: pretrained_model_name (`str` or `os.P
configuration_utils.py:923
↓ 12 callers
Method
__init__
(self, answer_pattern: str = ANSWER_PATTERN_BOXED, num_examples: int = None)
evaluation/datasets_loader.py:12
↓ 12 callers
Function
print_gpu_memory_usage
Report the current GPU VRAM usage.
verl/utils/model_utils.py:31
↓ 12 callers
Function
timer
(name: str, timing_raw: Dict[str, float])
verl/utils/py_functional.py:109
↓ 10 callers
Function
get_ulysses_sequence_parallel_group
Get ulysses sequence parallel process group.
verl/utils/ulysses.py:39
↓ 9 callers
Function
extract_boxed_content
(text: str)
Evaluation/eval_boxed_accuracy.py:25
↓ 9 callers
Method
log
(self, data: Dict[str, Any], step: int)
verl/utils/logger/logger.py:47
↓ 9 callers
Function
offload_fsdp_model
(model: FSDP, empty_cache: bool = True)
verl/utils/fsdp_utils.py:70
↓ 8 callers
Function
is_package_available
(name: str)
verl/utils/py_functional.py:52
↓ 8 callers
Function
load_fsdp_model
(model: FSDP, empty_cache: bool = True)
verl/utils/fsdp_utils.py:94
↓ 8 callers
Method
to_dtype
(precision: str)
verl/utils/torch_dtypes.py:39
↓ 7 callers
Method
from_dict
Instantiates a [`GenerationConfig`] from a Python dictionary of parameters. Args: config_dict (`Dict[str, Any]`):
configuration_utils.py:1115
↓ 6 callers
Method
chunk
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:488
↓ 6 callers
Method
postprocess_data
(self, data: DataProto)
verl/workers/sharding_manager/base.py:31
↓ 6 callers
Method
preprocess_data
(self, data: DataProto)
verl/workers/sharding_manager/base.py:28
↓ 6 callers
Method
print_rank0
(self, *args, **kwargs)
verl/single_controller/base/worker.py:182
↓ 6 callers
Method
save_pretrained
r""" Save a generation configuration object to the directory `save_directory`, so that it can be re-loaded using the [`~GenerationConf
configuration_utils.py:844
↓ 6 callers
Method
union
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:429
↓ 5 callers
Method
concat
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:526
↓ 5 callers
Method
from_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:274
↓ 5 callers
Function
func
(*args, **kwargs)
verl/single_controller/ray/base.py:43
↓ 5 callers
Function
get_hf_file_to_dict
Downloads a file from the Hugging Face Hub and returns its contents as a dictionary. Parameters: - file_name (str): The name of the
config.py:375
↓ 5 callers
Method
get_rng_state
()
verl/utils/checkpoint/checkpoint_manager.py:93
↓ 5 callers
Function
offload_fsdp_optimizer
(optimizer: Optimizer, empty_cache: bool = True)
verl/utils/fsdp_utils.py:112
↓ 5 callers
Method
select
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:326
↓ 5 callers
Method
to_dict
Serializes this instance to a Python dictionary.
configuration_utils.py:1635
↓ 5 callers
Method
to_json_string
Serializes this instance to a JSON string. Args: use_diff (`bool`, *optional*, defaults to `True`): If s
configuration_utils.py:1206
↓ 4 callers
Function
append_to_dict
Append dict to a dict of list.
verl/utils/py_functional.py:67
↓ 4 callers
Method
generate_sequences
(self, prompts: DataProto)
verl/workers/fsdp_workers.py:478
↓ 4 callers
Method
get_placement_groups
(self, strategy: str = "STRICT_PACK", name: Optional[str] = None)
verl/single_controller/ray/base.py:91
↓ 4 callers
Method
get_resource_pool
Get the resource pool of the worker.
verl/trainer/ray_trainer.py:132
↓ 4 callers
Method
init_model
(self)
verl/workers/fsdp_workers.py:328
↓ 4 callers
Method
merge
(self, other)
verl/utils/seqlen_balancing.py:33
↓ 4 callers
Function
reduce_metrics
(metrics: Dict[str, List[Any]])
verl/trainer/metrics.py:23
↓ 4 callers
Method
step
Performs a single optimization step. Args: closure (callable, optional): A closure that reevaluates the model and return
verl/utils/torch_functional.py:264
↓ 4 callers
Method
to_dict
(self)
verl/trainer/config.py:124
↓ 3 callers
Method
__init__
(self)
verl/single_controller/ray/base.py:475
↓ 3 callers
Method
_init_config
( self, config: Union[ActorConfig, CriticConfig, RefConfig], role: Literal["actor", "critic", "ref"]
verl/workers/fsdp_workers.py:99
↓ 3 callers
Function
_repeat_interleave
(value: Union[torch.Tensor, np.ndarray], repeats: int)
verl/workers/rollout/vllm_rollout_spmd.py:34
↓ 3 callers
Method
_validate
(self)
verl/trainer/ray_trainer.py:350
↓ 3 callers
Method
add
(self, idx: int, val: int)
verl/utils/seqlen_balancing.py:29
↓ 3 callers
Function
convert_dict_to_str
(data: Dict[str, Any])
verl/utils/py_functional.py:104
↓ 3 callers
Function
file_or_path_exists
(model: Union[str, Path], config_name: str, revision: Optional[str])
config.py:163
↓ 3 callers
Method
finish
(self)
verl/utils/logger/logger.py:49
↓ 3 callers
Method
from_single_dict
( cls, data: Dict[str, Union[torch.Tensor, NDArray]], meta_info: Optional[Dict[str, An
verl/protocol.py:257
↓ 3 callers
Function
gather_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:63
↓ 3 callers
Function
get_processor
Create a huggingface pretrained processor.
verl/utils/tokenizer.py:40
↓ 3 callers
Function
get_ulysses_sequence_parallel_world_size
Get ulysses sequence parallel world size.
verl/utils/ulysses.py:47
↓ 3 callers
Method
log
(self, samples: List[Tuple[str, str, str, float]], step: int)
verl/utils/logger/gen_logger.py:34
↓ 3 callers
Function
masked_mean
Compute mean of tensor with a masked values.
verl/utils/torch_functional.py:72
↓ 3 callers
Function
pad_sequence_to_length
Pad a nD tensors in the last dim to max_seq_len.
verl/utils/torch_functional.py:140
↓ 3 callers
Function
ulysses_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:262
↓ 3 callers
Method
update
Updates attributes of this class instance with attributes from `kwargs` if they match existing attributes, returning all the unused k
configuration_utils.py:1313
↓ 3 callers
Method
validate
Validates the values of the attributes of the [`GenerationConfig`] instance. Raises exceptions in the presence of parameterization th
configuration_utils.py:590
↓ 2 callers
Method
_build_messages
(self, example: Dict[str, Any])
verl/utils/dataset.py:178
↓ 2 callers
Function
_ensure_numpy_arrays
(d)
verl/trainer/ray_trainer.py:60
↓ 2 callers
Method
_forward_micro_batch
(self, micro_batch: Dict[str, torch.Tensor])
verl/workers/critic/dp_critic.py:52
↓ 2 callers
Method
_forward_micro_batch
Returns: log_probs: # (bs, response_len)
verl/workers/actor/dp_actor.py:60
↓ 2 callers
Function
_pad_tensor
(x: Tensor, dim: int, padding_size: int)
verl/utils/ulysses.py:105
↓ 2 callers
Method
_save_checkpoint
(self)
verl/trainer/ray_trainer.py:510
↓ 2 callers
Function
_split_args_kwargs_data_proto
(chunks: int, *args, **kwargs)
verl/single_controller/base/decorator.py:48
↓ 2 callers
Function
_unpad_tensor
(x: Tensor, dim: int, padding_size: int)
verl/utils/ulysses.py:112
↓ 2 callers
Function
_unwrap_ray_remote
(cls)
verl/single_controller/ray/base.py:447
↓ 2 callers
Function
all_gather_data_proto
(data: DataProto, size: int, group: ProcessGroup)
verl/protocol.py:680
↓ 2 callers
Function
all_to_all_tensor
( local_input: Tensor, scatter_dim: int, gather_dim: int, group: Optional[dist.ProcessGroup] =
verl/utils/ulysses.py:134
↓ 2 callers
Method
backward
(ctx: Any, grad_output: Tensor)
verl/utils/ulysses.py:228
↓ 2 callers
Function
batch_collate
(features: List[Dict[str, Any]])
verl/protocol.py:113
↓ 2 callers
Method
compute_log_prob
Compute logits given a batch of data. Args: data (DataProto): a batch of data represented by DataProto. It must contain key ```in
verl/workers/actor/base.py:40
↓ 2 callers
Method
dict_torch_dtype_to_str
Checks whether the passed dictionary and its nested dicts have a *torch_dtype* key and if it's not None, converts torch.dtype to a st
configuration_utils.py:1148
↓ 2 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:117
↓ 2 callers
Method
execute_all_async
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:372
↓ 2 callers
Method
execute_rank_zero_async
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:359
↓ 2 callers
Method
from_model_config
Instantiates a [`GenerationConfig`] from a [`PretrainedConfig`]. This function is useful to convert legacy [`PretrainedConfig`] objec
configuration_utils.py:1265
↓ 2 callers
Function
gather_outputs_and_unpad
( x: Tensor, gather_dim: int, unpad_dim: int = None, padding_size: int = 0, grad_scaler: b
verl/utils/ulysses.py:241
↓ 2 callers
Method
get_num_gpus
Get the number of gpus in this cluster.
verl/trainer/ray_trainer.py:136
↓ 2 callers
Function
get_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 Parameter
verl/utils/seqlen_balancing.py:150
↓ 2 callers
Function
get_tokenizer
Create a huggingface pretrained tokenizer.
verl/utils/tokenizer.py:21
↓ 2 callers
Function
grade_answer_with_timeout
Wraps the mathruler 'grade_answer' function with a timeout. If the function takes too long, it returns 'TIMED_OUT' instead of hanging.
question_evaluate/evaluate.py:51
↓ 2 callers
Function
grade_answer_with_timeout
This wrapper applies a timeout to each individual `grade_answer` call. If the function's execution exceeds the specified timeout, it will ret
vllm_service_init/start_vllm_server.py:101
↓ 2 callers
Function
is_rank0
()
verl/utils/model_utils.py:27
↓ 2 callers
Function
list_repo_files
( repo_id: str, *, revision: Optional[str] = None, repo_type: Optional[str] = None, token:
config.py:111
↓ 2 callers
Method
load_checkpoint
(self, path: str)
verl/workers/fsdp_workers.py:415
↓ 2 callers
Function
load_fsdp_optimizer
(optimizer: Optimizer, empty_cache: bool = True)
verl/utils/fsdp_utils.py:128
↓ 2 callers
Function
normalize_answer
(answer: str)
Evaluation/eval_boxed_accuracy.py:41
↓ 2 callers
Method
repeat
Repeat the batch data a specified number of times. Args: repeat_times (int): Number of times to repeat the data.
verl/protocol.py:556
↓ 2 callers
Method
save_checkpoint
(self, path: str)
verl/workers/fsdp_workers.py:404
↓ 2 callers
Function
set_ulysses_sequence_parallel_group
Set ulysses sequence parallel process group.
verl/utils/ulysses.py:31
↓ 2 callers
Method
to_dict
Serializes this instance to a Python dictionary. Returns: `Dict[str, Any]`: Dictionary of all the attributes that make u
configuration_utils.py:1183
↓ 2 callers
Function
try_get_local_file
(model: Union[str, Path], file_name: str, revision: Optional[str
config.py:357
↓ 2 callers
Method
update_options
(self, options: Dict)
verl/single_controller/ray/base.py:172
↓ 1 callers
Method
_balance_batch
Reorder the data on single controller such that each dp rank gets similar total tokens
verl/trainer/ray_trainer.py:553
↓ 1 callers
Method
_bind_worker_method
Bind the worker method to the WorkerGroup
verl/single_controller/base/worker_group.py:134
↓ 1 callers
Function
_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:414
↓ 1 callers
Function
_bleu_distance_matrix
(sentences)
train_examples/reward_function/validation.py:33
↓ 1 callers
Function
_bleu_distance_matrix
(sentences)
train_examples/reward_function/cot_val.py:63
next →
1–100 of 545, ranked by callers