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
↓ 5 callers
Function
get_fp32_state_dict_from_zero_checkpoint
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with ``load_state_dict()`` and used for training
deepspeed/utils/zero_to_fp32.py:614
↓ 5 callers
Function
get_fused_qkv_type
(module)
deepspeed/module_inject/fusedqkv_utils.py:48
↓ 5 callers
Method
get_gradient_for_reduction
(self, param)
deepspeed/runtime/zero/stage_1_and_2.py:1295
↓ 5 callers
Function
get_group
(gid: int)
deepspeed/compile/custom_ops/sp_dp_registry.py:18
↓ 5 callers
Method
get_hp_fragment
(self, optim_state_key=None)
deepspeed/utils/tensor_fragment.py:55
↓ 5 callers
Method
get_lr_ratio
(self)
deepspeed/runtime/lr_schedules.py:904
↓ 5 callers
Function
get_megatron_version
()
tests/unit/megatron_model.py:16
↓ 5 callers
Method
get_model_parallel_world_size
(self)
deepspeed/runtime/pipe/topology.py:447
↓ 5 callers
Method
get_sequence
Get the sequence descriptor for the given sequence id. If the sequence does not exist, then None is returned.
deepspeed/inference/v2/ragged/ragged_manager.py:123
↓ 5 callers
Method
get_sequence_parallel_world_size
(self)
tests/unit/v1/moe/test_autoep_unit.py:493
↓ 5 callers
Method
get_slice_parallel_group
(self)
deepspeed/runtime/pipe/topology.py:469
↓ 5 callers
Method
get_slice_parallel_world_size
(self)
deepspeed/runtime/pipe/topology.py:463
↓ 5 callers
Method
get_total_macs
Returns the total MACs of the model. Args: as_string (bool, optional): whether to output the flops as string. Defaults to False.
deepspeed/profiling/flops_profiler/profiler.py:244
↓ 5 callers
Method
group_step
(self, group_to_paramlist)
deepspeed/ops/adam/zenflow_torch_adam.py:203
↓ 5 callers
Method
has_all_gather_into_tensor
(self)
deepspeed/comm/torch.py:302
↓ 5 callers
Method
has_gradients
(self)
deepspeed/runtime/swap_tensor/optimizer_utils.py:63
↓ 5 callers
Method
init_process_group
(self)
deepspeed/comm/backend.py:44
↓ 5 callers
Function
install_chunked_causal_lm_loss
Make a Hugging Face causal LM compute its training loss with :class:`ChunkedCausalLMLoss`. Only models whose ``loss_function`` is the stock ``For
deepspeed/runtime/chunked_cross_entropy.py:283
↓ 5 callers
Function
installed_cuda_version
()
op_builder/builder.py:43
↓ 5 callers
Function
is_activation_to_checkpoint
Is an activation to be checkpointed
deepspeed/runtime/activation_checkpointing/checkpointing.py:377
↓ 5 callers
Function
is_autoep_zero3_partitioned_entry
(entry)
deepspeed/checkpoint/autoep_zero3_metadata.py:42
↓ 5 callers
Function
is_autotp_training_mode
()
deepspeed/module_inject/layers.py:176
↓ 5 callers
Method
is_first_stage
True if this process is in the first stage in the pipeline.
deepspeed/runtime/pipe/engine.py:510
↓ 5 callers
Function
is_profile_incomplete
(graph: Graph)
deepspeed/compile/profilers/graph_profile.py:81
↓ 5 callers
Method
is_record_trace
(self)
deepspeed/runtime/zero/partitioned_param_coordinator.py:203
↓ 5 callers
Method
is_swappable_tensor
(self, tensor=None, numel=None)
deepspeed/runtime/swap_tensor/optimizer_utils.py:225
↓ 5 callers
Method
kv_ptrs
Pointer to where the list of KV ids associated with a sequence are. If the device Tensor is requested, the Tensor is truncated to the
deepspeed/inference/v2/ragged/ragged_wrapper.py:260
↓ 5 callers
Function
legacy_uniform_autoep_placement_descriptor
Synthesize the legacy contiguous, uniform AutoEP placement.
deepspeed/checkpoint/autoep_affine.py:109
↓ 5 callers
Function
load_with_byte_offset
Loads a fragment from memory
csrc/deepspeed4science/evoformer_attn/iterators/epilogue_predicated_tile_iterator.h:323
↓ 5 callers
Method
load_with_pointer_offset
Loads a fragment from memory
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:812
↓ 5 callers
Function
macs_to_string
(macs, units=None, precision=DEFAULT_PRECISION)
deepspeed/profiling/flops_profiler/profiler.py:1123
↓ 5 callers
Function
make_cutlass_checkout
(path)
tests/unit/ops/deepspeed4science/test_evoformer_attn_builder.py:16
↓ 5 callers
Method
memory_stats
(self, device_index=None)
accelerator/hpu_accelerator.py:141
↓ 5 callers
Method
moe
Dispatch, a per-expert matmul over each expert's contiguous rows, weighting, combine.
tests/unit/module_inject/test_auto_ep_comm.py:1078
↓ 5 callers
Method
needs_scaler
Check if this optimizer requires loss scaling for correct backward pass. Returns True if any of the following conditions are met:
deepspeed/runtime/base_optimizer.py:430
↓ 5 callers
Function
omp_get_max_threads
Builds without OpenMP (e.g. Apple clang without libomp) run the kernels on one thread. */
csrc/includes/reflow_cpu_adam.h:15
↓ 5 callers
Function
params_to_string
(params_num, units=None, precision=DEFAULT_PRECISION)
deepspeed/profiling/flops_profiler/profiler.py:1169
↓ 5 callers
Function
parse_inclusion_exclusion
(resource_pool, inclusion, exclusion)
deepspeed/launcher/runner.py:373
↓ 5 callers
Function
plan_prefill_buckets
Minimize additive predicted cost over contiguous length-sorted buckets. ``cost(batch_size, padded_width)`` belongs to the model backend. Returned
deepspeed/runtime/rollout/continuous_batching.py:136
↓ 5 callers
Method
populate_all_inference_policies
(self)
deepspeed/runtime/hybrid_engine.py:124
↓ 5 callers
Function
prepare_step
(opt, param, master, monkeypatch, mock_collectives=True)
tests/unit/v1/zero/test_zero2_gradient_safety.py:597
↓ 5 callers
Function
reduce
(tensor, dst, op=ReduceOp.SUM, group=None, async_op=False,
deepspeed/comm/comm.py:639
↓ 5 callers
Function
reduce_scatter_coalesced
simultaneously reduce-scatter a list of tensors - this can be done more efficiently than individual reduce scatter calls TODO. see if PyTorch
deepspeed/runtime/comm/coalesced_collectives.py:81
↓ 5 callers
Method
reentrant
()
tests/unit/module_inject/test_auto_ep_comm.py:1483
↓ 5 callers
Function
reference_entropy
(logits)
tests/unit/v1/sequence_parallelism/test_vocab_parallel_ops.py:25
↓ 5 callers
Function
register_external_parameter
Instruct DeepSpeed to coordinate ``parameter``'s collection and partitioning in the forward and backward passes of ``module``. This is used w
deepspeed/runtime/zero/partition_parameters.py:151
↓ 5 callers
Function
register_grad_hook
(param, hook)
deepspeed/utils/torch.py:41
↓ 5 callers
Method
release_memory
(self)
deepspeed/runtime/swap_tensor/optimizer_utils.py:35
↓ 5 callers
Function
replace_attention
Replace every DSA attention module of ``model`` with :class:`DeepSpeedGlmMoeDsaAttention`. Returns the number of replaced modules. Call it after
deepspeed/models/glm_moe_dsa/attention.py:393
↓ 5 callers
Method
reset_cpu_buffers
(self)
deepspeed/runtime/zero/stage3.py:2776
↓ 5 callers
Method
run
Profile absolute memory and release gathered/interpreter state on every exit.
deepspeed/compile/profilers/graph_profile.py:436
↓ 5 callers
Method
run_gpt2_test
(self, test_config, output)
tests/model/Megatron_GPT2/test_common.py:55
↓ 5 callers
Method
run_test
(self, test_config, r_tol)
tests/model/BingBertSquad/BingBertSquad_run_func_test.py:113
↓ 5 callers
Function
run_training_steps
(engine, num_steps=3, seq_len=8, hidden_dim=64)
tests/unit/v1/moe/autoep_test_utils.py:271
↓ 5 callers
Method
sample
(logits)
deepspeed/runtime/rollout/hybrid_engine_rollout.py:1804
↓ 5 callers
Method
save
(self, state_dict, path: str)
deepspeed/runtime/checkpoint_engine/checkpoint_engine.py:32
↓ 5 callers
Method
scatter
(self, tensor, gather_list, dst, group=None, async_op=False)
deepspeed/comm/ccl.py:134
↓ 5 callers
Function
segki_refresh
Drop every derived-weight cache after an in-place weight write. The injected forwards cache tensors derived from the weights (concat groups,
deepspeed/module_inject/segment_ki.py:746
↓ 5 callers
Method
set_dependency
Set dependency can be used for managing dependencies when a mapping is provided in the class definition for the layer. The dep_name h
deepspeed/inference/v2/model_implementations/layer_container_base.py:272
↓ 5 callers
Method
set_residual_tile
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_access_iterator_residual_last.h:760
↓ 5 callers
Method
shard
Replace the weights with column-parallel shards, as AutoTP's `_tp_partition` does.
tests/unit/runtime/zero/test_per_head_muon.py:768
↓ 5 callers
Function
should_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
↓ 5 callers
Function
sort_dtypes
(dtypes: List[torch.dtype])
deepspeed/runtime/torch_autocast.py:89
↓ 5 callers
Method
source_offsets
Yield the offset into the full tensor of every element this piece covers. Used to check coverage. Pieces are small relative to the parameter,
deepspeed/checkpoint/affine.py:105
↓ 5 callers
Method
step
Update the model parameters. .. note:: This method will be called internally by ZeRO-Offload. DeepSpeed users should
deepspeed/ops/adagrad/cpu_adagrad.py:41
↓ 5 callers
Method
step
Update the model parameters. .. note:: This method will be called internally by ZeRO-Offload. DeepSpeed users should
deepspeed/ops/lion/cpu_lion.py:77
↓ 5 callers
Method
step
Not supporting closure.
deepspeed/runtime/zenflow/zenflow_stage_1_and_2.py:778
↓ 5 callers
Method
store_with_pointer_offset
Store a fragment to memory
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:830
↓ 5 callers
Function
task_log
(tid, msg, force=False)
deepspeed/nvme/test_ds_aio_utils.py:20
↓ 5 callers
Method
to
Move the parameter to the given device. Then, if the device is a cuda device, quantize it.
deepspeed/linear/quantization.py:118
↓ 5 callers
Function
top1gating
Implements Top1Gating on logits.
deepspeed/moe/sharded_moe.py:216
↓ 5 callers
Function
torch_assert_equal
Compare two tensors or non-tensor numbers for their equality. Add msg=blah to add an additional comment to when assert fails.
tests/unit/util.py:127
↓ 5 callers
Function
train_and_collect
(model, config, batches, client_optimizer=None, on_initialize=None, state_keys=())
tests/unit/v1/zero/test_reflow.py:488
↓ 5 callers
Function
transpose
(data)
deepspeed/module_inject/utils.py:9
↓ 5 callers
Method
validate
(config)
tests/unit/module_inject/test_auto_ep_comm.py:34
↓ 5 callers
Function
validate_folding_metadata
(metadata, *, tp_size,
deepspeed/checkpoint/autoep_universal.py:84
↓ 5 callers
Function
wrap_ddp_reference
(model, device, rank)
tests/unit/v1/zero/test_zero_user_backward.py:119
↓ 5 callers
Method
writer
(cls, path, dtype)
deepspeed/runtime/data_pipeline/data_sampling/indexed_dataset.py:375
↓ 5 callers
Method
zero_offload_param
(self)
deepspeed/runtime/engine.py:1643
↓ 5 callers
Method
zero_use_cpu_optimizer
(self)
deepspeed/runtime/engine.py:1646
↓ 4 callers
Method
GetMaxTokenLength
csrc/transformer/inference/includes/inference_context.h:191
↓ 4 callers
Method
Instance
(cls)
deepspeed/ops/transformer/inference/op_binding/workspace.py:32
↓ 4 callers
Method
RATIO
csrc/includes/dropout.h:22
↓ 4 callers
Function
Run
csrc/includes/gemm_test.h:123
↓ 4 callers
Method
__init__
(self, num_experts=4, ffn_hidden=128, hidden_size=64, intermediate_size=None)
tests/unit/v1/moe/autoep_test_utils.py:57
↓ 4 callers
Method
__init__
(self, out=None, bias=None)
tests/unit/runtime/zero/test_zero_context_return.py:28
↓ 4 callers
Method
__init__
(self, *args)
tests/unit/runtime/zero/test_zero_context.py:24
↓ 4 callers
Method
__init__
(self)
tests/unit/module_inject/test_tp_partition_config_path.py:31
↓ 4 callers
Method
__release_param
(self, param: Parameter, free_data: bool = True)
deepspeed/runtime/zero/partitioned_param_coordinator.py:638
↓ 4 callers
Method
__setattr__
(self, name, value)
deepspeed/module_inject/auto_tp_model_utils.py:23
↓ 4 callers
Function
_add
(graph, lhs, rhs, name, device_time=0)
tests/unit/v1/compile/test_list_schedule.py:211
↓ 4 callers
Method
_add_to_grad_partition_buffer
(output, source)
deepspeed/runtime/zero/stage_1_and_2.py:1439
↓ 4 callers
Method
_aligned_size
(self, param)
deepspeed/runtime/zero/partition_parameters.py:1701
↓ 4 callers
Method
_all_gather_shards
Reassemble a parameter from its tensor parallel shards along ``dim``. ``partition_sizes`` is derived locally from the same deterministic spli
deepspeed/module_inject/layers.py:595
↓ 4 callers
Function
_assert_merged_matches
The merged universal slice for `param_name` must equal `expected` element-wise.
tests/unit/checkpoint/test_autotp_uc_checkpoint.py:1372
↓ 4 callers
Function
_assert_trains_like_cpu_offload
(tmpdir, optimizer_device, param_device, dtype=torch.bfloat16, **nvme_options)
tests/unit/v1/zero/test_zero3_nvme_offload.py:89
↓ 4 callers
Function
_assert_union_holds_what_each_layout_holds
Each element lists every location of every layout that holds it, and each location keeps its shard.
tests/unit/checkpoint/test_affine_transfer_plan.py:1069
↓ 4 callers
Method
_assert_valid_mixed_precision_config
param_dtype, if set, must match the enabled fp16/bf16 mode. The optimizer/master-weight/reduction paths derive the model dtype from t
deepspeed/runtime/engine.py:1899
↓ 4 callers
Function
_autoep_modules
(engine)
tests/unit/v1/moe/test_autoep_checkpoint.py:130
↓ 4 callers
Function
_aws_error_code
(result: Any)
ci/torch_latest.py:892
← previous
next →
1,001–1,100 of 15,468, ranked by callers