Class InferenceContext

java.lang.Object
io.github.kirstenali.deepj.inference.InferenceContext
All Implemented Interfaces:
AutoCloseable

public final class InferenceContext extends Object implements AutoCloseable
Cache slots follow logical attention visits, so each repeated Loop pass has its own state.
  • Constructor Details

    • InferenceContext

      public InferenceContext(int capacity)
    • InferenceContext

      public InferenceContext(int capacity, boolean rolling)
  • Method Details

    • position

      public int position()
    • begin

      public void begin(int offset)
    • rotate

      public Tensor rotate(RotaryEmbedding rotary, Tensor input, int length, int heads)
    • attend

      public Tensor attend(Object owner, Tensor query, Tensor key, Tensor value, int queryHeads, int keyValueHeads, float scale)
    • finish

      public void finish()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable