Enum Class MiniMaxWeightMode

java.lang.Object
java.lang.Enum<MiniMaxWeightMode>
smile.llm.model.minimax.MiniMaxWeightMode
All Implemented Interfaces:
Serializable, Comparable<MiniMaxWeightMode>, Constable

public enum MiniMaxWeightMode extends Enum<MiniMaxWeightMode>
How the model's linear weights are stored and multiplied.
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Dense weights in the compute dtype (BF16 checkpoints, or MXFP8 expanded while loading).
    MXFP8 converted to 128x128 block FP8; W8A8 block-scaled tensor-core GEMM (Hopper and newer).
    Same storage and arithmetic as FP8 but the GEMM is emulated, so it runs on any CUDA GPU (tests).
    MXFP8 stays FP8-resident; weight-only Marlin kernels with bfloat16 activations (Ampere and newer).
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether this mode uses the block-scaled FP8 GEMM (native or emulated).
    boolean
    Returns whether weights stay in MXFP8-derived form on the device.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • DENSE

      public static final MiniMaxWeightMode DENSE
      Dense weights in the compute dtype (BF16 checkpoints, or MXFP8 expanded while loading).
    • MARLIN

      public static final MiniMaxWeightMode MARLIN
      MXFP8 stays FP8-resident; weight-only Marlin kernels with bfloat16 activations (Ampere and newer).
    • FP8

      public static final MiniMaxWeightMode FP8
      MXFP8 converted to 128x128 block FP8; W8A8 block-scaled tensor-core GEMM (Hopper and newer).
    • FP8_EMULATED

      public static final MiniMaxWeightMode FP8_EMULATED
      Same storage and arithmetic as FP8 but the GEMM is emulated, so it runs on any CUDA GPU (tests).
  • Method Details

    • values

      public static MiniMaxWeightMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MiniMaxWeightMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • quantized

      public boolean quantized()
      Returns whether weights stay in MXFP8-derived form on the device.
      Returns:
      false for DENSE.
    • blockFp8

      public boolean blockFp8()
      Returns whether this mode uses the block-scaled FP8 GEMM (native or emulated).
      Returns:
      true for FP8 and FP8_EMULATED.