class_docstr: This module learns positional embeddings up to a fixed maximum size.
code: def __init__(self, weight_shape):
      # OPT is set up so that if padding_idx is specified then offset the embedding ids by 2
      # and adjust num_embeddings appropriately. Other models don't have this hack
      self.offset = 2
      super().__init__(weight_shape)
  
imports: import torch
  from deepspeed import comm
  from torch import nn
  from torch.nn import functional
  from torch.nn.parameter import Parameter
label_desc: Use image node_id 1 to create a new OPTEmbedding object from inherited base classes: EmbeddingLayer with example: obj = OPTEmbedding(weight_shape)