MCPcopy Create free account

hub / github.com/deepspeedai/DeepSpeed / functions

Functions15,767 in github.com/deepspeedai/DeepSpeed

↓ 2 callersMethodreplace_moe_layers
Replace multiple MoE modules and batch post-replacement recorder retargeting. With ``collect_sources``, returns a ``ReplacementSourceMap``: t
deepspeed/module_inject/auto_ep.py:695
↓ 2 callersFunctionreplace_transformer_layer
Replace bert-style transformer layers with DeepSpeed's transformer layer Arguments: orig_layer_impl (torch.nn.Module): the original trans
deepspeed/module_inject/replace_module.py:181
↓ 2 callersFunctionreplace_wo_policy
(module, all_reduce_linears, prefix="", state_dict=None)
deepspeed/module_inject/replace_module.py:274
↓ 2 callersMethodreplay_dispatch
Repeat a forward dispatch in the layout its handle recorded. Used when activation checkpointing recomputes a forward dispatch. The ro
deepspeed/module_inject/auto_ep_comm.py:312
↓ 2 callersFunctionreplicated_kv_row_start
First K/V row in ``rank``'s local replicated-K/V shard.
deepspeed/module_inject/fusedqkv_utils.py:103
↓ 2 callersFunctionreplicates_kv_block
Whether this model's fused qkv layout keeps the whole K/V block on every rank. Uses class names instead of ``get_fused_qkv_type`` to avoid string
deepspeed/module_inject/fusedqkv_utils.py:62
↓ 2 callersFunctionrequire_tp_fused_qkvw
(name, mp_size)
deepspeed/module_inject/fusedqkv_utils.py:22
↓ 2 callersMethodreset
(self)
tests/unit/runtime/rollout/test_hybrid_engine_rollout.py:559
↓ 2 callersMethodreset
(self)
deepspeed/utils/timer.py:175
↓ 2 callersMethodreset
(self)
deepspeed/sequence/linear_cross_entropy.py:343
↓ 2 callersMethodreset
Set to the initial state (no tracker).
deepspeed/runtime/activation_checkpointing/checkpointing.py:149
↓ 2 callersMethodreset_data
Clear all logged communication data.
deepspeed/utils/comms_logging.py:143
↓ 2 callersMethodreset_swap_buffers
(self)
deepspeed/runtime/zero/stage3.py:4321
↓ 2 callersMethodreset_tokens
(self, initial_tokens=1)
deepspeed/ops/transformer/inference/op_binding/workspace.py:126
↓ 2 callersMethodreset_tokens
csrc/transformer/inference/includes/inference_context.h:212
↓ 2 callersFunctionreshape_meg_2d_parallel
(old_pp_degree, old_tp_degree, new_pp_degree, new_tp_degree, verbose=False)
deepspeed/checkpoint/reshape_meg_2d.py:80
↓ 2 callersFunctionresolve_row_weighting_impl
Resolve DeepEP row weighting implementation from config override.
deepspeed/module_inject/auto_ep_layer.py:118
↓ 2 callersFunctionresolve_score_apply_mode
Resolve score-application mode from config override or preset default.
deepspeed/module_inject/auto_ep_layer.py:99
↓ 2 callersFunctionrestore_inference_model
Restore the model from the buffer and metadata. Arguments: buffer: Buffer containing the model parameters. metadata: Metadat
deepspeed/inference/v2/model_implementations/flat_model_helpers.py:225
↓ 2 callersFunctionrestore_offloaded_activations
Restore async-offloaded inputs in place onto their saved tensors. Mutating ``t.data`` (not replacing the object) preserves autograd identity and
deepspeed/runtime/activation_checkpointing/checkpointing.py:550
↓ 2 callersMethodretake_workspace
(self)
deepspeed/ops/transformer/inference/op_binding/workspace.py:196
↓ 2 callersMethodrms_norm_fallback
(vals, gamma, epsilon)
deepspeed/ops/transformer/inference/op_binding/rms_norm.py:23
↓ 2 callersFunctionround_up_to_256
Round up to the nearest multiple of 256.
tests/unit/inference/v2/model_implementations/sharding/test_mlp_sharding.py:13
↓ 2 callersFunctionrun
(num_matmuls)
tests/unit/utils/test_timer.py:24
↓ 2 callersFunctionrun
(norms)
tests/unit/v1/ops/triton_ops/test_fused_rms_norm.py:677
↓ 2 callersFunctionrun
(x, manager=None)
tests/unit/runtime/activation_checkpointing/test_offload_activations.py:263
↓ 2 callersMethodrun
(self, tmpdir)
tests/unit/v1/moe/test_autoep_checkpoint.py:888
↓ 2 callersMethodrun
(self)
deepspeed/moe/ep_experts.py:468
↓ 2 callersMethodrun_commands
(self, *commands)
ci/test_torch_latest.py:295
↓ 2 callersMethodrun_ds_config
(self, ds_config, exp_name)
deepspeed/autotuning/autotuner.py:1058
↓ 2 callersMethodrun_grad_acc_post_hooks
Run all registered post hooks if backward is active. Custom autograd Functions (e.g., TiledFusedLogitsLoss) can invoke `torch.autogra
deepspeed/runtime/base_optimizer.py:122
↓ 2 callersFunctionrun_job
(job, verbose=False)
deepspeed/nvme/ds_aio_job.py:42
↓ 2 callersMethodrun_map
(self)
deepspeed/runtime/data_pipeline/data_sampling/data_analyzer.py:201
↓ 2 callersMethodrun_map_reduce
(self, comm_group=None)
deepspeed/runtime/data_pipeline/data_sampling/data_analyzer.py:447
↓ 2 callersFunctionrun_model
(model, config_dict, hidden_dim, dtype, requires_grad)
tests/unit/runtime/zero/test_zero_leaf_module.py:276
↓ 2 callersFunctionrun_opt_passes
Apply scheduled graph passes and retain only complete post-pass memory profiles.
deepspeed/compile/backend.py:257
↓ 2 callersFunctionrun_sandbox_command
(sandbox: Any, modal_module: Any, command: RemoteCommand)
ci/torch_latest.py:783
↓ 2 callersFunctionrun_step
(x)
tests/unit/runtime/activation_checkpointing/test_offload_activations.py:212
↓ 2 callersFunctionsafe_set_full_optimizer_state
Update the partitioned fp32 optimizer state of a low-precision (e.g., fp16) parameter. Args: param (``torch.nn.Parameter``): A mo
deepspeed/utils/tensor_fragment.py:190
↓ 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:5993
↓ 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:3526
↓ 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:1647
↓ 2 callersFunctionsearch_error
(filename)
deepspeed/autotuning/utils.py:17
↓ 2 callersFunctionsegki_injected
Whether segment kernels run in ``model``'s forwards, whichever rollout installed them.
deepspeed/module_inject/segment_ki.py:767
↓ 2 callersFunctionselect
(request)
tests/unit/checkpoint/test_affine_transfer_plan.py:162
↓ 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:3558
↓ 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:3620
↓ 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:1973
↓ 2 callersMethodset_num_threads
csrc/includes/reflow_cpu_adam.h:136
↓ 2 callersMethodset_replay_data
Register external routes for one layer. ``selected_experts`` must be an integer tensor shaped ``[tokens, top_k]``. The tensor is deta
deepspeed/moe/routing_replay.py:56
↓ 2 callersFunctionset_sdpa_attn_mask
(attn_node: Node, attn_mask, as_kwarg: bool)
deepspeed/compile/passes/sp_compile.py:461
↓ 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 callersMethodset_write_position
(self, pos: torch.Tensor)
deepspeed/utils/static_cache.py:240
↓ 2 callersMethodshared
csrc/pin_memory/deepspeed_pin_tensor.cpp:27
↓ 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 callersMethodshutdown
Release any backend resources. Default no-op.
deepspeed/runtime/rollout/base.py:110
↓ 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:94
↓ 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:4146
↓ 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:14
↓ 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:168
↓ 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
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:3135
↓ 2 callersMethodstep
(self, closure=None)
deepspeed/runtime/zero/muon/original_muon.py:313
↓ 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 callersMethodstep_state_halfgrad
Optimizer-state-only Adam step from half-precision gradients: update exp_avg/exp_avg_sq and skip the param store. Runs on a background worker
deepspeed/runtime/reflow/reflow_cpu_adam.py:146
↓ 2 callersMethodstop_event
(self, name, num_elem)
deepspeed/runtime/zero/partitioned_param_profiler.py:42
← previousnext →3,201–3,300 of 15,767, ranked by callers