Class GenAISupportedModels

java.lang.Object
smile.onnx.genai.GenAISupportedModels

public final class GenAISupportedModels extends Object
Allowlist of architectures supported by ONNX Runtime GenAI for chat.

Updated as onnx-genai gains models. Whisper is listed but not chat-capable.

  • Method Details

    • match

      public static Optional<GenAISupportedModels.Family> match(Path checkpointDir)
      Matches a local HF checkpoint directory via config.json.
      Parameters:
      checkpointDir - model directory.
      Returns:
      chat-capable family when listed; empty when unknown or Whisper.
    • matchRepoId

      public static Optional<GenAISupportedModels.Family> matchRepoId(String modelSpec)
      Matches a Hugging Face repo id or directory name heuristic.
      Parameters:
      modelSpec - owner/name or leaf directory name.
      Returns:
      chat-capable family when listed.
    • isChatConvertible

      public static boolean isChatConvertible(Path checkpointDir, String modelSpec)
      Returns whether a plain HF checkpoint is eligible for Olive → OGA conversion for chat (excludes Whisper and unknown families).
      Parameters:
      checkpointDir - local dir, or null to use modelSpec only.
      modelSpec - HF id or path string.
      Returns:
      true when allowlisted for chat OGA.