Class DeepSeekModel.Session

java.lang.Object
smile.llm.model.deepseek.DeepSeekModel.Session
All Implemented Interfaces:
AutoCloseable
Enclosing class:
DeepSeekModel

public static final class DeepSeekModel.Session extends Object implements AutoCloseable
All mutable per-sequence state of the model (each layer's caches and the engram token history). The model runs one sequence at a time; DeepSeekModel.use(DeepSeekModel.Session) switches which one, so a serving layer can interleave requests.
  • Method Details

    • reset

      public void reset()
      Returns the session to the state of an empty sequence, keeping its allocations.
    • close

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