chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:18:33 +08:00
commit 4ececc111a
2017 changed files with 331736 additions and 0 deletions
@@ -0,0 +1,26 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
import torch
from ...model_implementations.parameter_base import ParameterBase
"""
Embedding containers.
"""
class EmbeddingParameter(ParameterBase):
"""
Embedding container. This should be safe to use for all types of embeddings (i.e. word, position,
and token type).
"""
params: torch.Tensor
"""
Vocabulary parameter of shape [vocab_size, model_dim].
"""
def finalize(self) -> torch.Tensor:
return self.inference_model.transform_embedding_param(self.params)