docstr: Parameters:
      ragged_batch (RaggedBatchWrapper): The input ids and associated ragged batch metadata.
      word_embeddings (torch.Tensor): The word embedding table
docstr_tok: ["Parameters",":","ragged_batch","(","RaggedBatchWrapper",")",":","The","input","ids","and","associated","ragged","batch","metadata",".","word_embeddings","(","torch.Tensor",")",":","The","word","embedding","table"]
code: def forward(
      self,
      ragged_batch: RaggedBatchWrapper,
      word_embeddings: torch.Tensor,
      position_embeddings: Optional[torch.Tensor] = None,
  ) -> torch.Tensor:
      """
      Parameters:
          ragged_batch (RaggedBatchWrapper): The input ids and associated ragged batch metadata.
          word_embeddings (torch.Tensor): The word embedding table
      """
      output = empty_from(
          self._output,
          (ragged_batch.tensor_toks, self._config.embedding_dim),
      )
      self._ragged_embed(
          output,
          ragged_batch,
          word_embeddings,
          position_embed_weight=position_embeddings,
          position_embed_offset=self.embed_offset,
      )
      return output
  
file_path: deepspeed/deepspeed/inference/v2/modules/implementations/embedding/ragged_embedding.py
imports: from typing import Any, Dict, Optional
  import torch
  from deepspeed.accelerator import get_accelerator
  from ....allocator import empty_from
  from ....inference_utils import DtypeEnum
  from ....kernels.ragged_ops import RaggedEmbeddingKernel
  from ....ragged import RaggedBatchWrapper
  from ...interfaces import DSEmbeddingBase, DSEmbeddingRegistry
  from ...configs import DSEmbeddingsConfig
label_desc: Use image node_id 5 for calling the DSRaggedEmbedding obj's underlying member method code with example usage: obj.forward(ragged_batch, word_embeddings, position_embeddings) and returns: output