Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deepspeedai/DeepSpeed
/ functions
Functions
15,468 in github.com/deepspeedai/DeepSpeed
⨍
Functions
15,468
◇
Types & classes
2,493
↳
Endpoints
106
↓ 3 callers
Function
remove_random_ltd_state_dict
(state_dict)
deepspeed/runtime/data_pipeline/data_routing/helper.py:38
↓ 3 callers
Function
replace_dict
Replaces values in dict d with values in dict u. Args: d (dict): the target dict to overwrite u (dict): the dict containing the v
deepspeed/autotuning/utils.py:110
↓ 3 callers
Function
replace_reduce_outputs_with_none
(graph: Graph)
deepspeed/compile/fx.py:50
↓ 3 callers
Function
replicated_kv_shard_heads
Number of attention heads that bound one rank's shard, or None when unspecified.
deepspeed/module_inject/fusedqkv_utils.py:88
↓ 3 callers
Function
replicated_kv_shard_meta
Metadata whose shard unit is query heads for replicated K/V, otherwise K/V heads. ``get_shard_size`` always reads ``num_kv_heads`` as the shard u
deepspeed/module_inject/fusedqkv_utils.py:76
↓ 3 callers
Function
report_to_dict
A JSON-ready summary; ``include_messages`` adds the full per-round message list.
deepspeed/checkpoint/affine_transfer_analysis.py:232
↓ 3 callers
Function
requires_offset
csrc/includes/quantization.h:20
↓ 3 callers
Method
reserve
csrc/includes/deepcompile.h:149
↓ 3 callers
Method
reset_peak_memory_stats
(self)
tests/unit/v1/compile/test_graph_profile.py:39
↓ 3 callers
Method
reset_rss
(self)
accelerator/cpu_accelerator.py:287
↓ 3 callers
Function
resolve_preset_candidates
Resolve ordered preset candidates for AutoEP detection.
deepspeed/module_inject/auto_ep_presets/registry.py:157
↓ 3 callers
Function
restore
()
tests/unit/v1/ops/triton_ops/test_autoep_fused_token_ops.py:108
↓ 3 callers
Function
restore_combined_fused
``restore_combined`` with the weighted top-k reduction done by the fused kernel. The rows and the routing weights go through the same differentia
deepspeed/moe/ep_tp_dispatch.py:485
↓ 3 callers
Method
restore_slots
(self, slots: list)
deepspeed/autotuning/scheduler.py:271
↓ 3 callers
Method
run
(reflow)
tests/unit/v1/zero/test_reflow.py:1371
↓ 3 callers
Method
run
(self, class_tmpdir, val1, val2)
tests/unit/comm/test_dist.py:97
↓ 3 callers
Function
run_forward
(ds_config, seq_len, atol=1e-2, verbose=False, test_bsz=None)
tests/unit/ops/accelerators/test_accelerator_forward.py:165
↓ 3 callers
Method
run_training_distributed
(self, config_dict)
tests/unit/runtime/zenflow/test_zf.py:125
↓ 3 callers
Function
safe_get_local_optimizer_state
Get the local optimizer state partition of ZeRO-3 partitioned parameter in fp32 precision. Args: param (``torch.nn.Parameter``):
deepspeed/utils/tensor_fragment.py:302
↓ 3 callers
Function
safe_update_full_grad_vectorized
Vectorized update of the partitioned gradients of a list of low-precision (e.g., fp16) parameters. To avoid precision issues, the upd
deepspeed/utils/tensor_fragment.py:343
↓ 3 callers
Method
set_checkpoint_interval
(self, interval)
deepspeed/runtime/pipe/module.py:550
↓ 3 callers
Method
set_module
(self, sd, module)
deepspeed/runtime/state_dict_factory.py:156
↓ 3 callers
Function
set_optimizer_flags
(config_class: DeepSpeedConfig, model: torch.nn.Module)
deepspeed/__init__.py:357
↓ 3 callers
Method
set_state
(self, state)
deepspeed/runtime/data_pipeline/data_routing/scheduler.py:80
↓ 3 callers
Function
set_z3_leaf_modules_by_name
Sets a leaf flag for modules referenced by their names in ``model.named_modules()``. Args: model (torch.nn.Module): The model cont
deepspeed/utils/z3_leaf_module.py:89
↓ 3 callers
Function
set_z3_leaf_modules_by_suffix
Sets a leaf flag for modules referenced by suffixes of ``model.named_modules()`` names.
deepspeed/utils/z3_leaf_module.py:120
↓ 3 callers
Method
setup_buckets
(self)
deepspeed/runtime/zero/stage_1_and_2.py:3383
↓ 3 callers
Method
should_refresh_expected_hook_count
Return True when count_used_parameters_in_backward() should be re-evaluated.
deepspeed/runtime/base_optimizer.py:499
↓ 3 callers
Method
simd_width
(self)
op_builder/builder.py:447
↓ 3 callers
Method
skip_autotune
(self)
deepspeed/ops/transformer/inference/triton/matmul_ext.py:225
↓ 3 callers
Function
skip_on_device
()
tests/unit/v1/autotp/test_tp_plan_e2e.py:20
↓ 3 callers
Function
softmax
(input: torch.Tensor, mask: torch.Tensor = None, dim=-1)
deepspeed/ops/transformer/inference/triton/softmax.py:52
↓ 3 callers
Function
sparse_mla
Attention of every query over its selected latent keys, in the absorbed MLA form. Args: q: ``[tokens, heads, d_v + rope_dim]`` bf16, the
deepspeed/models/glm_moe_dsa/kernels/sparse_mla.py:31
↓ 3 callers
Method
step
Updates the optimizer with the learning rate for the last batch index. `self.last_batch_iteration` is treated as the last batch index.
deepspeed/runtime/lr_schedules.py:679
↓ 3 callers
Method
step
Not supporting closure.
deepspeed/runtime/zero/stage3.py:3198
↓ 3 callers
Method
store_with_byte_offset
Store a fragment to memory
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:837
↓ 3 callers
Function
stub_route_layer
A stand-in layer with only what _deepep_route reads, and staging off as in a default config.
tests/unit/module_inject/test_auto_ep_comm.py:339
↓ 3 callers
Function
swiglu_backward
The gradients of :func:`swiglu` with respect to ``gate`` and ``up``, as its own backward computes them. For callers that run the forward inside t
deepspeed/ops/triton_ops/swiglu_triton.py:239
↓ 3 callers
Function
swiglu_clamped_packed
:func:`swiglu_clamped` of ``gate`` and ``up`` packed side by side in one ``[..., 2 * I]`` tensor, the output of one gate+up GEMM, read in place as
deepspeed/ops/triton_ops/swiglu_triton.py:504
↓ 3 callers
Function
swiglu_packed_backward
The gradient of :func:`swiglu_packed` with respect to ``gate_up``, as its own backward computes it.
deepspeed/ops/triton_ops/swiglu_triton.py:252
↓ 3 callers
Method
sync_weights
(self, step: int)
tests/unit/runtime/rollout/test_rollout_interface.py:189
↓ 3 callers
Method
synchronize_reads
(self)
deepspeed/runtime/swap_tensor/partitioned_param_swapper.py:213
↓ 3 callers
Function
tensors_to_keep_in_fp32
(full name, tensor, is_buffer) for every floating parameter and buffer whose full name matches.
deepspeed/runtime/keep_in_fp32.py:65
↓ 3 callers
Method
to_meta
Returns a torch.LongTensor that encodes partitioning information. Can be used along with ``data()`` to serialize a ``PartitionedTensor`` for
deepspeed/runtime/utils.py:809
↓ 3 callers
Method
train
r
deepspeed/runtime/engine.py:3030
↓ 3 callers
Method
transform_gate_param
Perform any necessary transformations of the gate parameter. Args: param (torch.Tensor): gate_w (shape: [num_experts, mo
deepspeed/inference/v2/modules/interfaces/moe_base.py:35
↓ 3 callers
Method
transform_mlp_1_param
Shards the first MLP parameter and passes it to the underlying implementation for any necessary transformations. Args:
deepspeed/inference/v2/model_implementations/inference_transformer_base.py:531
↓ 3 callers
Function
trim_mean
Compute the trimmed mean of a list of numbers. Args: data (list): List of numbers. trim_percent (float): Percentage of data to tr
deepspeed/utils/timer.py:321
↓ 3 callers
Function
triton_backend_available
()
deepspeed/runtime/chunked_cross_entropy.py:70
↓ 3 callers
Method
unregisterGatheredParam
csrc/includes/deepcompile.h:424
↓ 3 callers
Method
unscale_and_clip_grads
(self, sub_group_id, total_norm)
deepspeed/runtime/zero/stage3.py:3325
↓ 3 callers
Function
unsupported_preset_for_hf_model_type
Return a preset carrying an actionable diagnostic for an unsupported HF model_type.
deepspeed/module_inject/auto_ep_presets/registry.py:94
↓ 3 callers
Method
update_hook_state_and_maybe_run_epilogue
Update hook state after a gradient hook fires and run epilogue if all hooks have fired.
deepspeed/runtime/base_optimizer.py:507
↓ 3 callers
Method
update_offload_overflow_tracker
(self, grad)
deepspeed/runtime/zero/stage_1_and_2.py:1910
↓ 3 callers
Method
use_host_timers
(self)
accelerator/hpu_accelerator.py:47
↓ 3 callers
Method
use_node_local_storage
(self)
deepspeed/runtime/engine.py:1796
↓ 3 callers
Method
uses_parallelization_pass_only
Determines if the compiled graph comes from a parallelization pass rather than ZeRO.
deepspeed/runtime/engine.py:1683
↓ 3 callers
Method
validate_active_resources
srun places tasks by count, not by device id. It can run N tasks on a named set of hosts, but it cannot pin them to particular slots,
deepspeed/launcher/multinode_runner.py:365
↓ 3 callers
Method
validate_args
(self)
deepspeed/launcher/multinode_runner.py:280
↓ 3 callers
Method
validate_embedding
(module)
deepspeed/module_inject/layers.py:1130
↓ 3 callers
Method
visible_devices_envs
(self)
accelerator/hpu_accelerator.py:310
↓ 3 callers
Function
warning_once
This method is identical to `logger.warning()`, but will emit the warning with the same message only once Note: The cache is for the functio
deepspeed/utils/logging.py:65
↓ 3 callers
Function
worker
(stage, output)
tests/unit/runtime/test_determinism.py:110
↓ 3 callers
Function
wrapFunc
(func, funcFlopCompute)
deepspeed/profiling/flops_profiler/profiler.py:872
↓ 3 callers
Function
wrapper
(*args, **kwargs)
deepspeed/runtime/compiler.py:84
↓ 3 callers
Function
wrapper
(self, *args, **kwargs)
deepspeed/comm/torch.py:209
↓ 3 callers
Function
writeAs
csrc/includes/simd.h:29
↓ 3 callers
Method
zenflow_config
(self)
deepspeed/runtime/engine.py:1883
↓ 3 callers
Method
zenflow_cpu_optimizer_step
(self, now_state, scaled_global_grad_norm)
deepspeed/runtime/zenflow/zenflow_stage_1_and_2.py:757
↓ 3 callers
Function
zero3_post_init_quantization_test_helper
(cpu_offload: bool, nvme_offload: bool, bits: int, nvme_path=None)
tests/unit/inference/quantization/test_intX_quantization.py:57
↓ 3 callers
Function
zero3_quantized_initialization_test_helper
(cpu_offload: bool, nvme_offload: bool, bits: int, nvme_path=None)
tests/unit/inference/quantization/test_intX_quantization.py:177
↓ 3 callers
Method
zero_grad
Zero FP16 parameter grads.
deepspeed/runtime/zero/stage3.py:2608
↓ 3 callers
Method
zero_nvme_offload_optimizer
(self)
deepspeed/runtime/engine.py:1720
↓ 3 callers
Method
zero_offload_optimizer
(self)
deepspeed/runtime/engine.py:1640
↓ 3 callers
Function
zero_param_storage_affine_map
Describe the storage of a live low-precision ``param`` across global ranks. A ZeRO-3 parameter is described by its own partition group and ``ds_t
deepspeed/checkpoint/zero_affine.py:119
↓ 3 callers
Function
zero_param_storage_shard
This rank's shard of ``param`` as laid out by ``zero_param_storage_affine_map``: a flat view. A ZeRO-3 parameter must be partitioned. A gathered
deepspeed/checkpoint/zero_affine.py:143
↓ 2 callers
Function
DS4Sci_EvoformerAttention
(Q, K, V, biases)
deepspeed/ops/deepspeed4science/evoformer_attn.py:88
↓ 2 callers
Method
Forward
csrc/transformer/ds_transformer_cuda.cpp:154
↓ 2 callers
Method
ForwardWithBiasAdd
csrc/includes/gelu.h:25
↓ 2 callers
Method
GeluCheckpoint
csrc/includes/ds_transformer_cuda.h:145
↓ 2 callers
Method
GetBatchSize
csrc/transformer/inference/includes/inference_context.h:192
↓ 2 callers
Method
GetHiddenSize
csrc/includes/ds_transformer_cuda.h:142
↓ 2 callers
Method
GetIntermediateSize
csrc/includes/ds_transformer_cuda.h:139
↓ 2 callers
Method
GetSeqLength
csrc/includes/softmax.h:59
↓ 2 callers
Method
GetTimeInSeconds
csrc/includes/StopWatch.h:45
↓ 2 callers
Method
IsTrainingMode
csrc/includes/ds_transformer_cuda.h:144
↓ 2 callers
Method
Restart
csrc/includes/StopWatch.h:29
↓ 2 callers
Method
SetIntermediateBuffers
csrc/transformer/ds_transformer_cuda.cpp:566
↓ 2 callers
Method
SetSeqLength
csrc/transformer/ds_transformer_cuda.cpp:585
↓ 2 callers
Method
SetWorkSpace
csrc/includes/context.h:76
↓ 2 callers
Method
Softmax
csrc/includes/softmax.h:38
↓ 2 callers
Method
Stop
csrc/includes/StopWatch.h:35
↓ 2 callers
Method
UseMean
csrc/includes/normalize_layer.h:188
↓ 2 callers
Function
_Wait_bwd_comm
(input_, dic_, h_id)
deepspeed/runtime/domino/transformer.py:50
↓ 2 callers
Method
__getattr__
Pass through attributes defined in the model if they are not overridden by ds-engine.
deepspeed/runtime/engine.py:1455
↓ 2 callers
Method
__getstate__
(self)
deepspeed/linear/quantization.py:85
↓ 2 callers
Method
__init__
(self, out=True, err=True, replay=True)
tests/unit/util.py:228
↓ 2 callers
Method
__init__
(self, linear)
tests/unit/profiling/flops_profiler/test_flops_profiler.py:274
↓ 2 callers
Method
__init__
(self, result: str)
tests/unit/inference/v2/model_implementations/test_exaone4_5.py:101
↓ 2 callers
Method
__init__
(self, num_layers=20, dim=128)
tests/unit/v1/ops/muon/test_muon.py:733
← previous
next →
1,901–2,000 of 15,468, ranked by callers