Class RotaryEmbedding

java.lang.Object
io.github.kirstenali.deepj.transformer.embeddings.RotaryEmbedding

public final class RotaryEmbedding extends Object
  • Constructor Details

    • RotaryEmbedding

      public RotaryEmbedding(int headDim, int maxSeqLen)
  • Method Details

    • apply

      public Tensor apply(Tensor t, int seqLen, int nHeads)
    • apply

      public Tensor apply(Tensor tensor, int length, int heads, int offset)
    • applyBackward

      public Tensor applyBackward(Tensor t, int seqLen, int nHeads)
    • applyInference

      public Tensor applyInference(Tensor input, int length, int heads, int offset)
      Continuing positions for rolling inference; persistent rotary tables never grow.
    • headDim

      public int headDim()