MCPcopy Create free account

hub / github.com/deepspeedai/DeepSpeed / functions

Functions15,468 in github.com/deepspeedai/DeepSpeed

↓ 5 callersFunctionget_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 callersFunctionget_fused_qkv_type
(module)
deepspeed/module_inject/fusedqkv_utils.py:48
↓ 5 callersMethodget_gradient_for_reduction
(self, param)
deepspeed/runtime/zero/stage_1_and_2.py:1295
↓ 5 callersFunctionget_group
(gid: int)
deepspeed/compile/custom_ops/sp_dp_registry.py:18
↓ 5 callersMethodget_hp_fragment
(self, optim_state_key=None)
deepspeed/utils/tensor_fragment.py:55
↓ 5 callersMethodget_lr_ratio
(self)
deepspeed/runtime/lr_schedules.py:904
↓ 5 callersFunctionget_megatron_version
()
tests/unit/megatron_model.py:16
↓ 5 callersMethodget_model_parallel_world_size
(self)
deepspeed/runtime/pipe/topology.py:447
↓ 5 callersMethodget_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 callersMethodget_sequence_parallel_world_size
(self)
tests/unit/v1/moe/test_autoep_unit.py:493
↓ 5 callersMethodget_slice_parallel_group
(self)
deepspeed/runtime/pipe/topology.py:469
↓ 5 callersMethodget_slice_parallel_world_size
(self)
deepspeed/runtime/pipe/topology.py:463
↓ 5 callersMethodget_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 callersMethodgroup_step
(self, group_to_paramlist)
deepspeed/ops/adam/zenflow_torch_adam.py:203
↓ 5 callersMethodhas_all_gather_into_tensor
(self)
deepspeed/comm/torch.py:302
↓ 5 callersMethodhas_gradients
(self)
deepspeed/runtime/swap_tensor/optimizer_utils.py:63
↓ 5 callersMethodinit_process_group
(self)
deepspeed/comm/backend.py:44
↓ 5 callersFunctioninstall_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 callersFunctioninstalled_cuda_version
()
op_builder/builder.py:43
↓ 5 callersFunctionis_activation_to_checkpoint
Is an activation to be checkpointed
deepspeed/runtime/activation_checkpointing/checkpointing.py:377
↓ 5 callersFunctionis_autoep_zero3_partitioned_entry
(entry)
deepspeed/checkpoint/autoep_zero3_metadata.py:42
↓ 5 callersFunctionis_autotp_training_mode
()
deepspeed/module_inject/layers.py:176
↓ 5 callersMethodis_first_stage
True if this process is in the first stage in the pipeline.
deepspeed/runtime/pipe/engine.py:510
↓ 5 callersFunctionis_profile_incomplete
(graph: Graph)
deepspeed/compile/profilers/graph_profile.py:81
↓ 5 callersMethodis_record_trace
(self)
deepspeed/runtime/zero/partitioned_param_coordinator.py:203
↓ 5 callersMethodis_swappable_tensor
(self, tensor=None, numel=None)
deepspeed/runtime/swap_tensor/optimizer_utils.py:225
↓ 5 callersMethodkv_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 callersFunctionlegacy_uniform_autoep_placement_descriptor
Synthesize the legacy contiguous, uniform AutoEP placement.
deepspeed/checkpoint/autoep_affine.py:109
↓ 5 callersFunctionload_with_byte_offset
Loads a fragment from memory
csrc/deepspeed4science/evoformer_attn/iterators/epilogue_predicated_tile_iterator.h:323
↓ 5 callersMethodload_with_pointer_offset
Loads a fragment from memory
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:812
↓ 5 callersFunctionmacs_to_string
(macs, units=None, precision=DEFAULT_PRECISION)
deepspeed/profiling/flops_profiler/profiler.py:1123
↓ 5 callersFunctionmake_cutlass_checkout
(path)
tests/unit/ops/deepspeed4science/test_evoformer_attn_builder.py:16
↓ 5 callersMethodmemory_stats
(self, device_index=None)
accelerator/hpu_accelerator.py:141
↓ 5 callersMethodmoe
Dispatch, a per-expert matmul over each expert's contiguous rows, weighting, combine.
tests/unit/module_inject/test_auto_ep_comm.py:1078
↓ 5 callersMethodneeds_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 callersFunctionomp_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 callersFunctionparams_to_string
(params_num, units=None, precision=DEFAULT_PRECISION)
deepspeed/profiling/flops_profiler/profiler.py:1169
↓ 5 callersFunctionparse_inclusion_exclusion
(resource_pool, inclusion, exclusion)
deepspeed/launcher/runner.py:373
↓ 5 callersFunctionplan_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 callersMethodpopulate_all_inference_policies
(self)
deepspeed/runtime/hybrid_engine.py:124
↓ 5 callersFunctionprepare_step
(opt, param, master, monkeypatch, mock_collectives=True)
tests/unit/v1/zero/test_zero2_gradient_safety.py:597
↓ 5 callersFunctionreduce
(tensor, dst, op=ReduceOp.SUM, group=None, async_op=False,
deepspeed/comm/comm.py:639
↓ 5 callersFunctionreduce_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 callersMethodreentrant
()
tests/unit/module_inject/test_auto_ep_comm.py:1483
↓ 5 callersFunctionreference_entropy
(logits)
tests/unit/v1/sequence_parallelism/test_vocab_parallel_ops.py:25
↓ 5 callersFunctionregister_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 callersFunctionregister_grad_hook
(param, hook)
deepspeed/utils/torch.py:41
↓ 5 callersMethodrelease_memory
(self)
deepspeed/runtime/swap_tensor/optimizer_utils.py:35
↓ 5 callersFunctionreplace_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 callersMethodreset_cpu_buffers
(self)
deepspeed/runtime/zero/stage3.py:2776
↓ 5 callersMethodrun
Profile absolute memory and release gathered/interpreter state on every exit.
deepspeed/compile/profilers/graph_profile.py:436
↓ 5 callersMethodrun_gpt2_test
(self, test_config, output)
tests/model/Megatron_GPT2/test_common.py:55
↓ 5 callersMethodrun_test
(self, test_config, r_tol)
tests/model/BingBertSquad/BingBertSquad_run_func_test.py:113
↓ 5 callersFunctionrun_training_steps
(engine, num_steps=3, seq_len=8, hidden_dim=64)
tests/unit/v1/moe/autoep_test_utils.py:271
↓ 5 callersMethodsample
(logits)
deepspeed/runtime/rollout/hybrid_engine_rollout.py:1804
↓ 5 callersMethodsave
(self, state_dict, path: str)
deepspeed/runtime/checkpoint_engine/checkpoint_engine.py:32
↓ 5 callersMethodscatter
(self, tensor, gather_list, dst, group=None, async_op=False)
deepspeed/comm/ccl.py:134
↓ 5 callersFunctionsegki_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 callersMethodset_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 callersMethodset_residual_tile
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_access_iterator_residual_last.h:760
↓ 5 callersMethodshard
Replace the weights with column-parallel shards, as AutoTP's `_tp_partition` does.
tests/unit/runtime/zero/test_per_head_muon.py:768
↓ 5 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
↓ 5 callersFunctionsort_dtypes
(dtypes: List[torch.dtype])
deepspeed/runtime/torch_autocast.py:89
↓ 5 callersMethodsource_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 callersMethodstep
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 callersMethodstep
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 callersMethodstep
Not supporting closure.
deepspeed/runtime/zenflow/zenflow_stage_1_and_2.py:778
↓ 5 callersMethodstore_with_pointer_offset
Store a fragment to memory
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:830
↓ 5 callersFunctiontask_log
(tid, msg, force=False)
deepspeed/nvme/test_ds_aio_utils.py:20
↓ 5 callersMethodto
Move the parameter to the given device. Then, if the device is a cuda device, quantize it.
deepspeed/linear/quantization.py:118
↓ 5 callersFunctiontop1gating
Implements Top1Gating on logits.
deepspeed/moe/sharded_moe.py:216
↓ 5 callersFunctiontorch_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 callersFunctiontrain_and_collect
(model, config, batches, client_optimizer=None, on_initialize=None, state_keys=())
tests/unit/v1/zero/test_reflow.py:488
↓ 5 callersFunctiontranspose
(data)
deepspeed/module_inject/utils.py:9
↓ 5 callersMethodvalidate
(config)
tests/unit/module_inject/test_auto_ep_comm.py:34
↓ 5 callersFunctionvalidate_folding_metadata
(metadata, *, tp_size,
deepspeed/checkpoint/autoep_universal.py:84
↓ 5 callersFunctionwrap_ddp_reference
(model, device, rank)
tests/unit/v1/zero/test_zero_user_backward.py:119
↓ 5 callersMethodwriter
(cls, path, dtype)
deepspeed/runtime/data_pipeline/data_sampling/indexed_dataset.py:375
↓ 5 callersMethodzero_offload_param
(self)
deepspeed/runtime/engine.py:1643
↓ 5 callersMethodzero_use_cpu_optimizer
(self)
deepspeed/runtime/engine.py:1646
↓ 4 callersMethodGetMaxTokenLength
csrc/transformer/inference/includes/inference_context.h:191
↓ 4 callersMethodInstance
(cls)
deepspeed/ops/transformer/inference/op_binding/workspace.py:32
↓ 4 callersMethodRATIO
csrc/includes/dropout.h:22
↓ 4 callersFunctionRun
csrc/includes/gemm_test.h:123
↓ 4 callersMethod__init__
(self, num_experts=4, ffn_hidden=128, hidden_size=64, intermediate_size=None)
tests/unit/v1/moe/autoep_test_utils.py:57
↓ 4 callersMethod__init__
(self, out=None, bias=None)
tests/unit/runtime/zero/test_zero_context_return.py:28
↓ 4 callersMethod__init__
(self, *args)
tests/unit/runtime/zero/test_zero_context.py:24
↓ 4 callersMethod__init__
(self)
tests/unit/module_inject/test_tp_partition_config_path.py:31
↓ 4 callersMethod__release_param
(self, param: Parameter, free_data: bool = True)
deepspeed/runtime/zero/partitioned_param_coordinator.py:638
↓ 4 callersMethod__setattr__
(self, name, value)
deepspeed/module_inject/auto_tp_model_utils.py:23
↓ 4 callersFunction_add
(graph, lhs, rhs, name, device_time=0)
tests/unit/v1/compile/test_list_schedule.py:211
↓ 4 callersMethod_add_to_grad_partition_buffer
(output, source)
deepspeed/runtime/zero/stage_1_and_2.py:1439
↓ 4 callersMethod_aligned_size
(self, param)
deepspeed/runtime/zero/partition_parameters.py:1701
↓ 4 callersMethod_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 callersFunction_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 callersFunction_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 callersFunction_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 callersMethod_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 callersFunction_autoep_modules
(engine)
tests/unit/v1/moe/test_autoep_checkpoint.py:130
↓ 4 callersFunction_aws_error_code
(result: Any)
ci/torch_latest.py:892
← previousnext →1,001–1,100 of 15,468, ranked by callers