Class QuantPolicy

java.lang.Object
smile.llm.quant.QuantPolicy

public final class QuantPolicy extends Object
Resolves checkpoint QuantFormat and WeightGemmBackend for load.
  • Method Details

    • resolve

      public static QuantPolicy.Resolved resolve(Path checkpointDir, Device device, String backendOverride) throws IOException
      Detects format and selects backend (auto or explicit override).
      Parameters:
      checkpointDir - model directory.
      device - target device.
      backendOverride - auto/dense/fp8/nvfp4/marlin, or null to use QuantBackendOverride / auto.
      Returns:
      resolved format and backend.
      Throws:
      IOException - if checkpoint IO fails.