MCPcopy Create free account

hub / github.com/deepspeedai/DeepSpeed / functions

Functions14,579 in github.com/deepspeedai/DeepSpeed

↓ 3 callersFunctionlayer_norm_residual
(a, input_bias, residual, weight, bias, eps)
deepspeed/ops/transformer/inference/triton/layer_norm.py:199
↓ 3 callersFunctionlink_hp_params
(lp_param_list, flat_hp_partition, gradient_dict, off
deepspeed/utils/mixed_precision_linkage.py:11
↓ 3 callersFunctionload
(module, prefix)
deepspeed/module_inject/load_checkpoint.py:46
↓ 3 callersMethodload
csrc/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h:276
↓ 3 callersFunctionload_aws_config
(raw: str)
ci/torch_latest.py:815
↓ 3 callersFunctionload_module_recursive
(module, prefix='', level=0)
deepspeed/module_inject/load_checkpoint.py:222
↓ 3 callersMethodload_with_byte_offset
Loads a fragment from memory
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:819
↓ 3 callersMethodloss_function
(self)
tests/unit/v1/runtime/test_chunked_cross_entropy.py:352
↓ 3 callersMethodmake_attn_layer
Builds the attention layer for the model. This sets the `self.attn` attribute.
deepspeed/inference/v2/model_implementations/inference_transformer_base.py:394
↓ 3 callersMethodmake_attn_out_layer
Instantiates the linear projection layer for the attention output linear layer. This sets the `self.attn_out` attribute.
deepspeed/inference/v2/model_implementations/inference_transformer_base.py:476
↓ 3 callersFunctionmake_graph_from_schedule
(scheduled: List[Node])
deepspeed/compile/list_schedule.py:24
↓ 3 callersFunctionmake_metadata_filename
Make a filename for a metadata file. Arguments: rank: Rank of the file. n_ranks: Total number of ranks. Returns:
deepspeed/inference/v2/model_implementations/flat_model_helpers.py:73
↓ 3 callersMethodmake_qkv_layer
Instantiates the linear projection layer for the QKV linear layer. This sets the `self.qkv` attribute.
deepspeed/inference/v2/model_implementations/inference_transformer_base.py:363
↓ 3 callersMethodmake_unembedding_layer
Performs setup and creates an unembedding layer. This implementation assumes normalization prior to the LM head projection. If this d
deepspeed/inference/v2/model_implementations/inference_transformer_base.py:325
↓ 3 callersFunctionmask_nan_or_inf_with_val_inplace
(input, device=None, val=-1.)
deepspeed/runtime/utils.py:958
↓ 3 callersMethodmax_memory_cached
(self, device_index=None)
accelerator/hpu_accelerator.py:135
↓ 3 callersFunctionmaybe_copy_geglu
(module, sd, weight_quantizer, mp_replace, dst_name, src_names)
deepspeed/module_inject/policy.py:189
↓ 3 callersMethodmemory_cached
(self, device_index=None)
accelerator/hpu_accelerator.py:132
↓ 3 callersMethodmemory_reserved
(self, device_index=None)
accelerator/hpu_accelerator.py:147
↓ 3 callersMethodmodule_state_dict
(self, destination=None, prefix="", keep_vars=False, exclude_frozen_parameters=False)
deepspeed/runtime/engine.py:4091
↓ 3 callersFunctionmoe_test_helper
Helper function for validating the GEMM kernel for a single expert.
tests/unit/inference/v2/kernels/cutlass_ops/test_moe_gemm.py:48
↓ 3 callersFunctionnew_exchange_scope
A fresh sharing scope, normally one per model AutoEP converts. Layers sharing a scope share a buffer. Two models do not, even on one expert-p
deepspeed/module_inject/auto_ep_comm.py:79
↓ 3 callersMethodnum_tensors
(self)
deepspeed/runtime/swap_tensor/optimizer_utils.py:74
↓ 3 callersFunctionoffload_adam_states_sync
()
deepspeed/compile/passes/offload_adam_states.py:156
↓ 3 callersFunctionoffload_optimizer_states
(optimizer, device, pin_memory=False, non_blocking=False)
deepspeed/runtime/zero/offload_states.py:17
↓ 3 callersMethodoperand_B_ref
Returns a TensorRef to the B operand
csrc/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h:214
↓ 3 callersMethodoverlapping_partition_gradients_reduce_epilogue
(self)
deepspeed/runtime/zero/stage3.py:1536
↓ 3 callersFunctionpatch_fake_tensor
()
deepspeed/compile/patch_fake_tensor.py:78
↓ 3 callersFunctionpinned_memory_summary
(tag: str = "")
deepspeed/utils/pin_memory_tracker.py:66
↓ 3 callersMethodplan_expert_transfer
Plan the copies that move the live expert parameters to ``target_placement``. ``target_placement`` is an AutoEP placement descriptor in the t
deepspeed/module_inject/auto_ep_layer.py:876
↓ 3 callersMethodpostscale_gradients
(self)
deepspeed/runtime/engine.py:1770
↓ 3 callersMethodpread
csrc/aio/py_lib/deepspeed_py_io_handle.cpp:315
↓ 3 callersFunctionprepare_tp_model
(hidden_dim, nlayers, linear_indices, allreduce_indices, group, return_global_copy=False)
tests/unit/v1/autotp/test_autotp_training.py:1816
↓ 3 callersFunctionpreset_name_for_hf_model_type
Return the AutoEP preset name for a supported HF model_type.
deepspeed/module_inject/auto_ep_presets/registry.py:86
↓ 3 callersMethodprint_model_profile
Prints the model graph with the measured profile attached to each module. Args: profile_step (int, optional): The global training
deepspeed/profiling/flops_profiler/profiler.py:286
↓ 3 callersFunctionproduct
(shape: Sequence[int])
deepspeed/checkpoint/affine_geometry.py:17
↓ 3 callersFunctionpytest_hack
This is an ugly hack to get the unittest suites to play nicely with pytest. Otherwise failed tests are not reported by pytest for some reason.
tests/model/run_sanity_check.py:20
↓ 3 callersFunctionqtorch_quantize
(input, exp_bits=4, man_bits=3, rounding="nearest", group_size=1024)
tests/unit/ops/fp_quantizer/test_fp_quant.py:23
↓ 3 callersMethodquantize
(self, param, groups, num_bits, quant_type)
tests/unit/runtime/zero/test_zeropp.py:54
↓ 3 callersMethodquantize
(self, tensor: Tensor)
deepspeed/inference/quantization/utils.py:56
↓ 3 callersMethodrange_pop
(self)
tests/unit/utils/test_nvtx.py:124
↓ 3 callersMethodrange_push
(self, msg)
tests/unit/utils/test_nvtx.py:120
↓ 3 callersMethodreduce_scatter_tensor
(self, output_tensor, input_tensor, op, group=None, async_op=False)
deepspeed/comm/ccl.py:104
↓ 3 callersMethodreenter_backward_if_needed
Re-enter backward context for subsequent phases in reentrant checkpointing.
deepspeed/runtime/base_optimizer.py:503
↓ 3 callersMethodrefresh_fp32_params
(self)
deepspeed/runtime/zero/stage3.py:3569
↓ 3 callersMethodregister
(self, module)
deepspeed/runtime/rollout/hybrid_engine_rollout.py:46
↓ 3 callersMethodregisterGatheredParam
csrc/includes/deepcompile.h:419
↓ 3 callersFunctionregister_all_to_all_group
Make ``group`` reachable by name from inside the exchange operator, and return that name. Call this outside any compiled region, before the first
deepspeed/sequence/layer.py:316
↓ 3 callersFunctionregister_grad_hook
(param, hook)
deepspeed/utils/torch.py:41
↓ 3 callersMethodrelease_unswapped_gradients
(self)
deepspeed/runtime/swap_tensor/optimizer_utils.py:151
↓ 3 callersMethodrelease_workspace
(self)
deepspeed/ops/transformer/inference/op_binding/workspace.py:189
↓ 3 callersMethodreload
csrc/includes/deepcompile.h:330
↓ 3 callersFunctionremove_random_ltd_state_dict
(state_dict)
deepspeed/runtime/data_pipeline/data_routing/helper.py:38
↓ 3 callersFunctionreplace_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 callersFunctionreplace_reduce_outputs_with_none
(graph: Graph)
deepspeed/compile/fx.py:50
↓ 3 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
↓ 3 callersFunctionrequires_offset
csrc/includes/quantization.h:20
↓ 3 callersMethodreserve
csrc/includes/deepcompile.h:149
↓ 3 callersMethodreset_rss
(self)
accelerator/cpu_accelerator.py:287
↓ 3 callersFunctionresolve_preset_candidates
Resolve ordered preset candidates for AutoEP detection.
deepspeed/module_inject/auto_ep_presets/registry.py:157
↓ 3 callersFunctionrestore
()
tests/unit/v1/ops/triton_ops/test_autoep_fused_token_ops.py:108
↓ 3 callersMethodrestore_slots
(self, slots: list)
deepspeed/autotuning/scheduler.py:271
↓ 3 callersMethodrun
(self, class_tmpdir, val1, val2)
tests/unit/comm/test_dist.py:97
↓ 3 callersFunctionrun_forward
(ds_config, seq_len, atol=1e-2, verbose=False, test_bsz=None)
tests/unit/ops/accelerators/test_accelerator_forward.py:165
↓ 3 callersMethodrun_training_distributed
(self, config_dict)
tests/unit/runtime/zenflow/test_zf.py:125
↓ 3 callersFunctionsafe_get_local_fp32_param
Get the local partition of a ZeRO-3 partitioned parameter in fp32 precision. Args: param (``torch.nn.Parameter``): A model parame
deepspeed/utils/tensor_fragment.py:289
↓ 3 callersFunctionsafe_get_local_grad
Get the local gradient partition of a ZeRO-3 partitioned parameter. The return data type is that used for gradient accumulation. This
deepspeed/utils/tensor_fragment.py:259
↓ 3 callersFunctionsafe_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 callersMethodsample
(logits)
deepspeed/runtime/rollout/hybrid_engine_rollout.py:1234
↓ 3 callersMethodset_checkpoint_interval
(self, interval)
deepspeed/runtime/pipe/module.py:550
↓ 3 callersMethodset_module
(self, sd, module)
deepspeed/runtime/state_dict_factory.py:156
↓ 3 callersFunctionset_optimizer_flags
(config_class: DeepSpeedConfig, model: torch.nn.Module)
deepspeed/__init__.py:357
↓ 3 callersMethodset_state
(self, state)
deepspeed/runtime/data_pipeline/data_routing/scheduler.py:80
↓ 3 callersFunctionset_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 callersFunctionset_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 callersFunctionshould_log_le
Args: max_log_level_str: maximum log level as a string Returns ``True`` if the current log_level is less or equal to the specified l
deepspeed/utils/logging.py:215
↓ 3 callersMethodshould_refresh_expected_hook_count
Return True when count_used_parameters_in_backward() should be re-evaluated.
deepspeed/runtime/base_optimizer.py:499
↓ 3 callersMethodskip_autotune
(self)
deepspeed/ops/transformer/inference/triton/matmul_ext.py:225
↓ 3 callersFunctionskip_on_device
()
tests/unit/v1/autotp/test_tp_plan_e2e.py:20
↓ 3 callersFunctionsoftmax
(input: torch.Tensor, mask: torch.Tensor = None, dim=-1)
deepspeed/ops/transformer/inference/triton/softmax.py:52
↓ 3 callersFunctionsparse_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 callersMethodstep
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 callersMethodstore_with_byte_offset
Store a fragment to memory
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:837
↓ 3 callersFunctionswiglu_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:474
↓ 3 callersMethodsynchronize_reads
(self)
deepspeed/runtime/swap_tensor/partitioned_param_swapper.py:213
↓ 3 callersFunctiontensors_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 callersMethodto_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 callersMethodtp_parser
(model)
deepspeed/module_inject/auto_tp.py:343
↓ 3 callersMethodtrain
r
deepspeed/runtime/engine.py:2957
↓ 3 callersMethodtransform_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 callersMethodtransform_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 callersFunctiontrim_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:304
↓ 3 callersFunctiontriton_backend_available
()
deepspeed/runtime/chunked_cross_entropy.py:70
↓ 3 callersMethodunregisterGatheredParam
csrc/includes/deepcompile.h:424
↓ 3 callersMethodunscale_and_clip_grads
(self, sub_group_id, total_norm)
deepspeed/runtime/zero/stage3.py:3080
↓ 3 callersFunctionunsupported_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 callersMethodupdate_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 callersMethodupdate_offload_overflow_tracker
(self, grad)
deepspeed/runtime/zero/stage_1_and_2.py:1893
↓ 3 callersMethoduse_host_timers
(self)
accelerator/hpu_accelerator.py:47
↓ 3 callersMethoduse_node_local_storage
(self)
deepspeed/runtime/engine.py:1743
← previousnext →1,701–1,800 of 14,579, ranked by callers