Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deepspeedai/DeepSpeed
/ functions
Functions
14,579 in github.com/deepspeedai/DeepSpeed
⨍
Functions
14,579
◇
Types & classes
2,353
↳
Endpoints
92
↓ 2 callers
Function
_jsd_ratios
(log_q, log_p, log_beta, log_one_minus_beta)
deepspeed/ops/triton_ops/vocab_parallel_softmax.py:68
↓ 2 callers
Method
_keep_in_fp32
Convert the parameters and buffers of ``module`` that it names for fp32 (keep_in_fp32.py).
deepspeed/runtime/zero/partition_parameters.py:1255
↓ 2 callers
Function
_key_list_to_string
(key_list)
deepspeed/checkpoint/reshape_utils.py:76
↓ 2 callers
Function
_kimi_k3_hybrid_config
Kimi-K3-0.40B: linear-attention layers on a config that also carries MLA fields. `linear_attn_config` gives `num_heads: 8, head_dim: 32`, so its
tests/unit/runtime/zero/test_per_head_muon.py:446
↓ 2 callers
Method
_largest_contiguous
(self)
deepspeed/runtime/zero/contiguous_memory_allocator.py:273
↓ 2 callers
Method
_last_logits_kwargs
Ask models that support it for last-position logits only, since prefill samples just one token.
deepspeed/runtime/rollout/hybrid_engine_rollout.py:1257
↓ 2 callers
Function
_launch
(x, cos, sin, out, backward)
deepspeed/ops/triton_ops/fused_rotary_pos_emb.py:168
↓ 2 callers
Method
_launch_non_daemonic_procs
(self, num_procs, init_method)
tests/unit/common.py:221
↓ 2 callers
Method
_launch_with_file_store
(self, request, world_size)
tests/unit/common.py:345
↓ 2 callers
Method
_lazy_init_class_dict
(self)
accelerator/hpu_accelerator.py:263
↓ 2 callers
Method
_lazy_init_class_dict
(self)
accelerator/supa_accelerator.py:243
↓ 2 callers
Method
_lazy_init_class_dict
(self)
accelerator/cuda_accelerator.py:367
↓ 2 callers
Method
_libomp_prefix
(self)
op_builder/mps/cpu_adam.py:41
↓ 2 callers
Method
_link_all_hp_params
(self)
deepspeed/runtime/bf16_optimizer.py:340
↓ 2 callers
Function
_llama3_inverse_frequencies
(config: Any, device: Any)
deepspeed/inference/v2/model_implementations/exaone4_5/model.py:34
↓ 2 callers
Method
_lm_head_patterns
(self)
deepspeed/module_inject/auto_tp.py:685
↓ 2 callers
Method
_load_global_state
(self, sd)
deepspeed/runtime/bf16_optimizer.py:700
↓ 2 callers
Function
_load_torch_checkpoint
(path)
tests/unit/v1/moe/test_autoep_autotp_checkpoint.py:212
↓ 2 callers
Function
_load_universal_file
(universal_dir, param_name, key)
tests/unit/v1/moe/test_autoep_checkpoint.py:56
↓ 2 callers
Method
_load_zero_checkpoint
(self, load_dir, tag, load_optimizer_states=True)
deepspeed/runtime/engine.py:4817
↓ 2 callers
Function
_local_kv_tokens
(prompts, new_tokens, local_heads)
tests/unit/v1/test_hybrid_engine_rollout_v1.py:56
↓ 2 callers
Function
_log_scheduler_result
(graph_id: int, bwd: bool, scheduler_budget,
deepspeed/compile/passes/zero3_compile.py:239
↓ 2 callers
Method
_loss_stage_global_rank
Global rank of the stage that computes the loss.
deepspeed/runtime/pipe/engine.py:506
↓ 2 callers
Method
_make_autoep_folding_metadata
(folding_spec, *, family,
deepspeed/runtime/engine.py:4105
↓ 2 callers
Function
_make_offload_state_key
(key)
deepspeed/runtime/utils.py:1229
↓ 2 callers
Function
_make_zero2_config
()
tests/unit/v1/moe/test_autoep_grad_parity.py:51
↓ 2 callers
Method
_mark_as_occupied
(self, address, size)
deepspeed/runtime/zero/contiguous_memory_allocator.py:279
↓ 2 callers
Method
_mark_uc_metadata
(self)
deepspeed/module_inject/layers.py:2280
↓ 2 callers
Method
_master_pinned_at_construction
Whether _create_fp32_partitions pinned this sub-group's CPU master partition (offload_optimizer.pin_memory; NVMe-swapped sub-groups are manage
deepspeed/runtime/zero/stage3.py:2931
↓ 2 callers
Function
_masters
(engine)
tests/unit/checkpoint/test_fp32_master_stage3_bf16.py:66
↓ 2 callers
Function
_match_outputs
(ref, tgt)
tests/unit/runtime/activation_checkpointing/test_activation_checkpointing.py:52
↓ 2 callers
Method
_matches_glob
(self, rel_posix: str, globs: tuple[str, ...])
ci/tests_fetcher.py:465
↓ 2 callers
Function
_measured_margin
The share of the device the allocator holds without using, clamped to a calibrated range.
deepspeed/compile/passes/offload_activation.py:130
↓ 2 callers
Function
_mem_rows
(graph)
tests/unit/v1/compile/test_offload_opt_states.py:67
↓ 2 callers
Function
_memory_budget
()
deepspeed/compile/passes/offload_activation.py:145
↓ 2 callers
Method
_merge_base
Merge-base of ``base`` and ``HEAD``, or "" if it can't be determined. An empty result (e.g. shallow clone that doesn't reach the fork point)
ci/tests_fetcher.py:218
↓ 2 callers
Method
_merge_state_dicts
(self, sd_list)
deepspeed/checkpoint/deepspeed_checkpoint.py:343
↓ 2 callers
Function
_merge_zero_shards
(param_base_path, state, tp_degree, slice_shapes=None)
deepspeed/checkpoint/ds_to_universal.py:235
↓ 2 callers
Function
_micro_batches
(engine, count)
tests/unit/v1/half_precision/test_keep_in_fp32_modules.py:284
↓ 2 callers
Function
_minimum_gather_residency_budget
Build a rank-consistent gather-only cap without inferring memory headroom.
deepspeed/compile/passes/zero3_compile.py:96
↓ 2 callers
Function
_model
()
tests/unit/v1/ops/muon/test_muon_zero3_grad_accum.py:26
↓ 2 callers
Method
_model_for
(self, route, std)
tests/unit/v1/moe/test_autoep_expert_activation.py:683
↓ 2 callers
Method
_module_name
Dotted module name for a file under a package root, or None. e.g. deepspeed/runtime/engine.py -> deepspeed.runtime.engine tests/
ci/tests_fetcher.py:286
↓ 2 callers
Function
_momentum_norm
(engine)
tests/unit/v1/ops/muon/test_muon_checkpoint.py:56
↓ 2 callers
Function
_move_destination
(affine_map, rank, index, delta)
tests/unit/checkpoint/test_affine_shard_map.py:516
↓ 2 callers
Method
_muon_momentum_buffer
The flat momentum buffer for this group, in the dtype `muon_update` needs. `muon_update` does `momentum.lerp_(grad)`, which requires both to
deepspeed/runtime/zero/stage_1_and_2.py:2890
↓ 2 callers
Method
_muon_param_groups
Split each incoming param group into its Muon and Adam halves. Muon has to build its own groups, because which half a parameter belongs to is
deepspeed/runtime/engine.py:2498
↓ 2 callers
Method
_muon_staging_momentum
The buffer `muon_update` writes this step's momentum into. It starts as a copy of the committed momentum, so a step that is later discarded
deepspeed/runtime/zero/stage_1_and_2.py:3092
↓ 2 callers
Method
_muon_update_lacks_loss_scale
Whether this sub-group holds a Muon update that has to be scaled like a gradient. Newton-Schulz returns the same update at any loss scale, so
deepspeed/runtime/zero/stage3.py:2640
↓ 2 callers
Method
_muon_update_lacks_loss_scale
Whether this group holds a Muon update that has to be scaled like a gradient. Newton-Schulz returns the same update at any loss scale, so unl
deepspeed/runtime/zero/stage_1_and_2.py:2881
↓ 2 callers
Method
_new_locked
(self, example, out_shape)
deepspeed/utils/pin_memory.py:53
↓ 2 callers
Function
_no_gather_coalesced
(params: Iterable[Parameter])
deepspeed/runtime/zero/partition_parameters.py:899
↓ 2 callers
Function
_norm_rtol
Scale agreement: a couple of ulps of the compute dtype, and never looser than 1%.
tests/unit/runtime/zero/test_per_head_muon.py:60
↓ 2 callers
Function
_normalize_fqn
Turn Dynamo's nn_module_stack path into the dotted name model.named_modules() uses. Dynamo records the access expression, e.g. "L['self']._module
deepspeed/compile/passes/tp_compile.py:102
↓ 2 callers
Function
_normalize_uc_shape
(value)
deepspeed/module_inject/layers.py:40
↓ 2 callers
Function
_npu_host_copy_funcs
Resolve the npurt host-registration functions, or (None, reason). torch.npu.npurt() returns the runtime-API module exposing npuHostRegister/n
accelerator/npu_accelerator.py:29
↓ 2 callers
Function
_ns_tolerance
Some tens of ulps of whatever dtype the kernel iterates in. `gram` runs in fp16 and `newtonschulz5` in bf16 (fp32 where unsupported), and the ite
tests/unit/runtime/zero/test_per_head_muon.py:47
↓ 2 callers
Method
_offload_compact_grad_partitions
Copy each compact partition's running sum to the host gradient at a boundary. Every parameter accumulated in this window is copied, including
deepspeed/runtime/zero/stage_1_and_2.py:1362
↓ 2 callers
Method
_offload_grad_partition_at_boundary
(self, param, grad_buffer, offload_fp32_gradients, offload_fp32_offsets)
deepspeed/runtime/zero/stage3.py:1495
↓ 2 callers
Method
_offsets
(self, base, strides)
deepspeed/checkpoint/affine.py:113
↓ 2 callers
Function
_one_cycle_lrs
(first_stair_count, steps=16, first_step_size=8, second_step_size=8, second_stair_count=None)
tests/unit/runtime/test_lr_schedulers.py:717
↓ 2 callers
Method
_optimizer_step
(self, sub_group_id)
deepspeed/runtime/superoffload/superoffload_stage3.py:98
↓ 2 callers
Function
_order_kl_arguments
(student_log_probs, teacher_log_probs, reverse)
deepspeed/sequence/vocab_parallel_ops.py:304
↓ 2 callers
Function
_originating_layer
Return the (qualified name, type) of the innermost nn.Module a node was traced from.
deepspeed/compile/passes/tp_compile.py:85
↓ 2 callers
Function
_over_budget_path_options
(task: AllgatherTask, scheduler_budget: SchedulerMemoryBudget)
deepspeed/compile/list_schedule.py:541
↓ 2 callers
Function
_owner_modules
`named_modules()` as a lookup, or None when the object does not have any.
deepspeed/__init__.py:282
↓ 2 callers
Method
_pack_int4
Pack values in [-8, 7] two per byte: even element in the low nibble, odd element in the high nibble (the reference layout).
op_builder/npu/quantizer.py:91
↓ 2 callers
Function
_pad_rows
(tensor: torch.Tensor, rows: int)
deepspeed/moe/ep_tp_dispatch.py:276
↓ 2 callers
Function
_pad_tensor_by_size
(src_tensor, pad_size, dtype, device)
deepspeed/runtime/zero/stage_1_and_2.py:110
↓ 2 callers
Method
_padding_size
(self, param)
deepspeed/runtime/zero/partition_parameters.py:1704
↓ 2 callers
Function
_pairs
Parameters with replicated sources: whole-parameter replicas, a partly replicated fused block, a vector and a scalar.
tests/unit/checkpoint/test_affine_replica_policy.py:63
↓ 2 callers
Function
_params
(engine)
tests/unit/v1/zero/test_zero_coalesce_grad_reduction.py:67
↓ 2 callers
Method
_parse_all
Parse every file once; return (deps_by_file, raw_imports_by_file).
ci/tests_fetcher.py:412
↓ 2 callers
Function
_partition_like_zero3
What `zero.Init` leaves behind: a flat placeholder plus the real shape on `ds_shape`.
tests/unit/runtime/zero/test_muon_use_muon_under_zero_init.py:42
↓ 2 callers
Function
_partitioned_metadata_entry
()
tests/unit/checkpoint/test_autoep_zero3_metadata.py:29
↓ 2 callers
Function
_patch_aot_constructor
()
tests/unit/compile/test_backend.py:116
↓ 2 callers
Function
_patch_tp_group_creation
(monkeypatch, *, rank=2, initialize_mesh_device=None)
tests/unit/v1/autotp/test_autotp_training.py:55
↓ 2 callers
Function
_path_parts
(path)
accelerator/cpu_accelerator.py:57
↓ 2 callers
Function
_per_head_muon_meta
The head-count reader and the config the widths come from, built once per model. AutoTPMeta.from_model_config is the repo's single source of trut
deepspeed/__init__.py:112
↓ 2 callers
Method
_phase
(self, phase)
deepspeed/runtime/pipe/dualpipev.py:160
↓ 2 callers
Function
_pid_is_running
(pid: int, proc_root: Path = Path("/proc"))
ci/test_torch_latest.py:1120
↓ 2 callers
Function
_pin_observed_floor
Hold the observed-memory clamp still. The planner takes the larger of its profiled floor and what the allocator has already handed out. That
tests/unit/v1/compile/test_offload_activation.py:103
↓ 2 callers
Function
_place
Mark the shard addresses ``piece`` occupies in ``placed``, refusing one already taken. ``validate()`` checks destinations from metadata, which ca
deepspeed/checkpoint/affine.py:531
↓ 2 callers
Method
_plain
(self, value, device)
tests/unit/runtime/test_runtime_utils.py:96
↓ 2 callers
Method
_point_aliased_fp32_partitions_at_lp_buffer
After lp_param_buffer moves, point each aliased master partition at its slice of it again. The master tensor stays the one the optimizer holds
deepspeed/runtime/zero/stage3.py:3959
↓ 2 callers
Method
_pop_manager_stack
(self)
deepspeed/runtime/activation_checkpointing/offload_activations.py:457
↓ 2 callers
Function
_positive_int
(value, name)
deepspeed/checkpoint/autoep_affine.py:334
↓ 2 callers
Function
_prep_inputs
(*inputs)
tests/unit/runtime/activation_checkpointing/test_activation_checkpointing.py:40
↓ 2 callers
Function
_prepare
Validate both maps and cut the target into intersections with the source regions.
deepspeed/checkpoint/affine_transfer.py:724
↓ 2 callers
Function
_prime_factors
Returns the prime factorization of positive integer N.
deepspeed/runtime/pipe/topology.py:217
↓ 2 callers
Function
_print_scheduler_debug
(message: str, process_group=None)
deepspeed/compile/passes/zero3_compile.py:109
↓ 2 callers
Method
_process_selected_fp32_groups_grad
Process gradients for selected columns in FP32 groups
deepspeed/runtime/zenflow/zenflow_stage_1_and_2.py:277
↓ 2 callers
Function
_product
(shape)
tests/unit/checkpoint/test_affine_transfer_plan.py:60
↓ 2 callers
Function
_prologue
csrc/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h:925
↓ 2 callers
Method
_publish_host_accumulated_grad
Read this parameter's host sum back to the device, then into the FP32 partition. The device pass lets the shared norm and overflow helpers se
deepspeed/runtime/zero/stage_1_and_2.py:1126
↓ 2 callers
Function
_qps_for_sms
Queue pairs to reserve for a given SM count. One per SM plus a margin for the control path. This is deliberately smaller than DeepEP's automa
deepspeed/module_inject/auto_ep_comm.py:47
↓ 2 callers
Function
_quantizer
(quantization_group_size)
tests/unit/ops/fp_quantizer/test_fp8_gemm.py:21
↓ 2 callers
Function
_raise_if_autoep_zero3_partitioned_state
(state_dict)
deepspeed/utils/zero_to_fp32.py:136
↓ 2 callers
Function
_raise_unsupported_load_balance_coeff
(value: object)
deepspeed/module_inject/auto_ep_presets/base.py:19
↓ 2 callers
Function
_random_causal_selection
Per row a random subset of the causal keys, ``-1`` padded where fewer than ``topk`` exist.
tests/unit/v1/models/test_glm_moe_dsa.py:32
← previous
next →
2,101–2,200 of 14,579, ranked by callers