MCPcopy Create free account

hub / github.com/deepspeedai/DeepSpeed / functions

Functions14,579 in github.com/deepspeedai/DeepSpeed

↓ 2 callersFunctionsafe_set_local_grad
Update the local gradient partition of a ZeRO-3 partitioned parameter. To avoid precision issues, the update value should have the da
deepspeed/utils/tensor_fragment.py:275
↓ 2 callersMethodsave_16bit_model
Save 16bit model weights This method saves the 16bit model weights at the desired destination. Arguments: save_
deepspeed/runtime/engine.py:5798
↓ 2 callersFunctionsave_args_for_backward
keep this function to reduce the modification from original implementation
deepspeed/runtime/activation_checkpointing/checkpointing.py:807
↓ 2 callersMethodsave_state_dict
(self, save_dir, checkpoint_engine, exclude_frozen_params=False)
deepspeed/runtime/pipe/module.py:602
↓ 2 callersMethodscale
r"""Apply loss scaler for manual backward pass. Use this method when calling loss.backward() directly instead of engine.backward(). T
deepspeed/runtime/engine.py:3421
↓ 2 callersMethodscale_if_loss
Applies loss scaling to the input value if it is a loss tensor.
deepspeed/runtime/base_optimizer.py:444
↓ 2 callersMethodscale_loss
Scales the loss by the current loss scale. We need this function to scale loss without calling backward on it.
deepspeed/runtime/fp16/loss_scaler.py:165
↓ 2 callersFunctionscatter
(tensor, scatter_list=None, src=0, group=None, async_op=False,
deepspeed/comm/comm.py:454
↓ 2 callersMethodscheduler_name
(self)
deepspeed/runtime/engine.py:1566
↓ 2 callersFunctionsearch_error
(filename)
deepspeed/autotuning/utils.py:17
↓ 2 callersFunctionselect
(request)
tests/unit/checkpoint/test_affine_transfer_plan.py:159
↓ 2 callersFunctionsend_ssm_command
( instance: AwsInstance, run_identity: str, phase: str, script: str, timeout_seconds: int,
ci/torch_latest.py:1226
↓ 2 callersFunctionsequence_tiled_compute
This is a wrapper for SequenceTiledCompute which we need since torch.autograd.Function can't work with dicts of tensors (in backward it has to re
deepspeed/runtime/sequence_parallel/ulysses_sp.py:724
↓ 2 callersMethodsetPersistent
csrc/includes/deepcompile.h:303
↓ 2 callersMethodsetValid
csrc/includes/deepcompile.h:445
↓ 2 callersMethodset_attention
(self, qkvw, qkvb, dense_w, dense_b)
deepspeed/module_inject/containers/base.py:192
↓ 2 callersMethodset_dataloader
(self, loader)
deepspeed/runtime/pipe/engine.py:638
↓ 2 callersFunctionset_example_values_to_symints
(real_inputs, param_indices=None, real_zero_params=None)
deepspeed/compile/backend.py:181
↓ 2 callersMethodset_full_hp_param
(self, value, param, optim_state_key=None)
deepspeed/runtime/zero/stage3.py:3275
↓ 2 callersMethodset_hidden_heads
Args: hidden_size: embedding dimension of the model num_attention_heads: number of attention heads in the model
deepspeed/module_inject/containers/base.py:175
↓ 2 callersMethodset_layernorm
(self, attn_nw, attn_nb, input_nw, input_nb)
deepspeed/module_inject/containers/base.py:204
↓ 2 callersMethodset_local_hp_param
(self, value, param, optim_state_key=None)
deepspeed/runtime/zero/stage3.py:3328
↓ 2 callersMethodset_lora_params
If available, set the LoRA parameters for the module. An implementation for this would iterate over all parameters of the model and
deepspeed/module_inject/containers/features/hybrid_engine.py:50
↓ 2 callersMethodset_norm_for_param_grad_in_gpu
(self, param)
deepspeed/runtime/zero/stage_1_and_2.py:1956
↓ 2 callersFunctionset_sdpa_attn_mask
(attn_node: Node, attn_mask, as_kwarg: bool)
deepspeed/compile/passes/sp_compile.py:160
↓ 2 callersMethodset_states
Set the rng states. For efficiency purposes, we do not check the size of seed for compatibility.
deepspeed/runtime/activation_checkpointing/checkpointing.py:159
↓ 2 callersMethodset_swap_buffers
(self, buffers, aligned_numel)
deepspeed/runtime/swap_tensor/optimizer_utils.py:113
↓ 2 callersMethodsetup_buckets
(self)
deepspeed/runtime/zero/stage_1_and_2.py:3364
↓ 2 callersFunctionshared_open
csrc/cpu/comm/shm.cpp:50
↓ 2 callersFunctionshm_initialize
csrc/cpu/comm/shm.cpp:340
↓ 2 callersFunctionshould_release_reduce_buckets
(graph_order, graph_id: int)
deepspeed/compile/fx.py:35
↓ 2 callersMethodsimple_init
(self)
deepspeed/checkpoint/reshape_meg_2d.py:16
↓ 2 callersFunctionskip_unless_transformers_has
(transformers, *names, min_version=None, reason="AutoEP coverage")
tests/unit/v1/moe/autoep_test_utils.py:350
↓ 2 callersMethodsource_view
This piece's elements as a view of the full parameter, without copying.
deepspeed/checkpoint/affine.py:90
↓ 2 callersMethodsources
(self)
op_builder/xpu/async_io.py:22
↓ 2 callersMethodsparse_allreduce_no_retain
(self, bucket, dp_group, dp_world_size=None)
deepspeed/runtime/engine.py:4020
↓ 2 callersFunctionsparse_mla_bwd
Gradients of :func:`sparse_mla_fwd_interface` with respect to ``q`` and ``kv``.
deepspeed/models/glm_moe_dsa/kernels/sparse_mla_bwd.py:294
↓ 2 callersFunctionsparse_mla_fwd_interface
Run the forward kernel on token-major tensors. ``q`` is ``[tokens, heads, d_v + rope_dim]``, ``kv`` is ``[tokens_kv, 1, d_v + rope_dim]``, ``indi
deepspeed/models/glm_moe_dsa/kernels/sparse_mla_fwd.py:180
↓ 2 callersFunctionsplit_by_qkvlist_and_refuse
(qkv_list, split_size, split_dim=0, cat_dim=0)
deepspeed/module_inject/fusedqkv_utils.py:10
↓ 2 callersFunctionsplit_dataset
(dataset, num_workers, worker_id, num_threads)
deepspeed/runtime/data_pipeline/data_sampling/utils.py:38
↓ 2 callersFunctionsplit_half_float_double
(tensors)
deepspeed/runtime/zero/stage_1_and_2.py:66
↓ 2 callersFunctionsplit_half_float_double_sparse
(tensors)
deepspeed/runtime/engine.py:167
↓ 2 callersFunctionsplit_index
(start_idx, end_idx, num_partitions)
deepspeed/runtime/data_pipeline/data_sampling/utils.py:33
↓ 2 callersFunctionsplit_kv
Split a KV cache instance into its key and value components. Parameters: kv_cache (torch.Tensor): The KV-cache to split. This should
deepspeed/inference/v2/ragged/kv_cache.py:22
↓ 2 callersFunctionsplit_params_grads_into_shared_and_expert_params
Split grad of parameters into grads of non-expert params and grads of expert params. This is useful while computing grad-norms for clipping an
deepspeed/moe/utils.py:46
↓ 2 callersMethodstart_event
(self, name)
deepspeed/runtime/zero/partitioned_param_profiler.py:34
↓ 2 callersFunctionstart_optimizer_process
Start ZenFlow's overlapped optimizer (ZeRO stage 1/2/3) in a dedicated process, coordinated through a shared-memory semaphore control block. A sep
deepspeed/runtime/zenflow/zenflow_utils.py:138
↓ 2 callersMethodstart_profiling_comms
(self)
deepspeed/utils/comms_logging.py:90
↓ 2 callersFunctionstate_matched_models
(model_cls, config)
tests/unit/v1/moe/autoep_test_utils.py:294
↓ 2 callersFunctionstep
Not supporting closure.
deepspeed/runtime/zenflow/engine_stage3.py:612
↓ 2 callersMethodstep
Update the model parameters. .. note:: This method will be called internally by ZeRO-Offload. DeepSpeed users should
deepspeed/ops/lion/cpu_lion.py:77
↓ 2 callersMethodstep
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
deepspeed/ops/adam/fused_adam.py:107
↓ 2 callersMethodstep
Not supporting closure.
deepspeed/runtime/zero/stage_1_and_2.py:3116
↓ 2 callersMethodstep
Not supporting closure.
deepspeed/runtime/fp16/fused_optimizer.py:256
↓ 2 callersMethodstep
Not supporting closure.
deepspeed/runtime/fp16/unfused_optimizer.py:197
↓ 2 callersMethodstop_event
(self, name, num_elem)
deepspeed/runtime/zero/partitioned_param_profiler.py:42
↓ 2 callersMethodsupported
()
deepspeed/runtime/engine.py:455
↓ 2 callersMethodswap_in_optimizer_state
(self, parameter, async_parameter)
deepspeed/runtime/swap_tensor/pipelined_optimizer_swapper.py:102
↓ 2 callersMethodswap_out
(self, aio_handle, async_op=False)
deepspeed/runtime/swap_tensor/utils.py:153
↓ 2 callersMethodswap_out_and_release
(self, params, async_op=False, force_buffer_release=False)
deepspeed/runtime/swap_tensor/partitioned_param_swapper.py:274
↓ 2 callersMethodswap_out_gradients
(self, parameter, gradient_offsets, gradient_tensors)
deepspeed/runtime/swap_tensor/pipelined_optimizer_swapper.py:155
↓ 2 callersMethodswap_out_optimizer_state
(self, parameter, async_swap)
deepspeed/runtime/swap_tensor/pipelined_optimizer_swapper.py:129
↓ 2 callersFunctionsweep_main
(args)
deepspeed/nvme/perf_run_sweep.py:291
↓ 2 callersFunctionsync_all
()
deepspeed/compile/profilers/comm_profile.py:20
↓ 2 callersMethodsynchronize_writes
(self)
deepspeed/runtime/swap_tensor/partitioned_param_swapper.py:204
↓ 2 callersMethodtemp_copy_param
(self, group_to_paramlist)
deepspeed/ops/adam/zenflow_torch_adam.py:66
↓ 2 callersFunctiontime_intervals
(timer, run_matmuls, matmuls_per_interval)
tests/unit/utils/test_timer.py:31
↓ 2 callersMethodto_layers
(self)
tests/unit/alexnet_model.py:51
↓ 2 callersFunctionto_padded
Pad to a backend friendly granularity.
deepspeed/inference/v2/ragged/ragged_wrapper.py:17
↓ 2 callersFunctiontorch_assert_dicts_of_tensors_equal
Compare two dicts of tensors or non-tensor numbers for their equality. Add msg=blah to add an additional comment to when assert fails.
tests/unit/util.py:149
↓ 2 callersMethodtorch_autocast_dtype
(self)
deepspeed/runtime/engine.py:1724
↓ 2 callersMethodtorch_autocast_enabled
(self)
deepspeed/runtime/engine.py:1721
↓ 2 callersFunctiontp_group_world_size
(tp_group, dist_module)
deepspeed/runtime/tensor_parallel/init_utils.py:63
↓ 2 callersMethodtrace_prologue
(self, sub_module: Module)
deepspeed/runtime/zero/partitioned_param_coordinator.py:205
↓ 2 callersMethodtrain
(buffer_bytes)
tests/unit/v1/ops/muon/test_muon.py:237
↓ 2 callersFunctiontrain_cifar
(model, config, num_steps=400, average_dp_losses=True, fp16=True, seed=123)
tests/unit/alexnet_model.py:126
↓ 2 callersFunctiontrain_independent_loss
(num_models, config_dict, dtype)
tests/unit/runtime/test_multiple_models.py:50
↓ 2 callersFunctiontrain_shared_loss
(num_models, config_dict, dtype)
tests/unit/runtime/test_multiple_models.py:22
↓ 2 callersMethodtransform_for_inference
If the views on certain parameters are largely incompatible, it may be necessary to do more substantial transformations to the parame
deepspeed/module_inject/containers/features/hybrid_engine.py:41
↓ 2 callersMethodtransform_for_training
If the views on certain parameters are largely incompatible, it may be necessary to do more substantial transformations to the parame
deepspeed/module_inject/containers/features/hybrid_engine.py:33
↓ 2 callersMethodtransform_moe_mlp_1_param
(self, param: torch.Tensor)
tests/unit/inference/v2/model_implementations/parameters/test_parameter_list.py:33
↓ 2 callersMethodtransform_moe_mlp_1_param
Shards the first MoE param and passes it to the underlying implementation. Since it's possible for an architecture to have both MoE a
deepspeed/inference/v2/model_implementations/inference_transformer_base.py:663
↓ 2 callersMethodtransform_moe_mlp_2_param
Perform any necessary transformations of the parameter. The specified component being transformed should be inferred from the shape o
deepspeed/inference/v2/modules/interfaces/moe_base.py:56
↓ 2 callersMethodtranspose_attention
(self)
deepspeed/module_inject/containers/base.py:287
↓ 2 callersMethodtrim_left
Shift all cache layers left to reclaim an unused prefix span.
deepspeed/utils/static_cache.py:283
↓ 2 callersMethodtune
Tunes Zero stages, micro batch size per GPU, and other Zero configurations. Performance metrics of different tuning spaces are recorded in self.recor
deepspeed/autotuning/autotuner.py:404
↓ 2 callersMethoduncovered_offsets
Return the offsets of the full tensor that no rank holds. A non-empty result means the parameter cannot be rebuilt from its shards, so this
deepspeed/checkpoint/affine.py:229
↓ 2 callersMethodunfuse_lora_weight
(self)
deepspeed/runtime/hybrid_engine.py:171
↓ 2 callersMethodunpatch_init_and_builtins
(self)
deepspeed/runtime/zero/partition_parameters.py:612
↓ 2 callersFunctionunpin_offloaded_optimizer_states
Release host buffers that offloading page-locked in the optimizer state. Offload pins these regardless of the ZeRO CPU-offload config, so destroy
deepspeed/runtime/zero/offload_states.py:44
↓ 2 callersMethodunscale_and_clip_grads
(self, total_norm, apply_scale=True)
deepspeed/runtime/fp16/unfused_optimizer.py:243
↓ 2 callersFunctionunwrap_model_for_generation
For ZeRO-3 models, we gather the weights once to speed up generation.
deepspeed/runtime/zero/stage3.py:90
↓ 2 callersFunctionupdate_gathered_stage3_optimizer
(optimizer_state, param_shapes, world_size)
tests/unit/checkpoint/test_universal_checkpoint.py:185
↓ 2 callersMethodupdate_hp_grads
(self, clear_lp_grads=False)
deepspeed/runtime/bf16_optimizer.py:536
↓ 2 callersMethodupdate_lp_params
(self)
deepspeed/runtime/bf16_optimizer.py:597
↓ 2 callersMethodupdate_offload_overflow_tracker_for_param_grad
(self, param)
deepspeed/runtime/zero/stage_1_and_2.py:1897
↓ 2 callersFunctionupdate_out_and_lse
( out: Optional[torch.Tensor], lse: Optional[torch.Tensor], block_out: torch.Tensor, block_lse
deepspeed/sequence/fpdt_layer.py:59
↓ 2 callersMethodupdate_selected_channels
(self, tensor, total_size, communication_data_type)
deepspeed/runtime/zenflow/zenflow_stage_1_and_2.py:178
↓ 2 callersMethodupdate_seq
(self, global_steps)
deepspeed/runtime/data_pipeline/data_routing/scheduler.py:83
↓ 2 callersFunctionvalidate_device
(tensor: torch.Tensor)
tests/unit/inference/v2/model_implementations/parameters/utils.py:59
← previousnext →2,901–3,000 of 14,579, ranked by callers