Class QuantFormatDetector
java.lang.Object
smile.llm.quant.QuantFormatDetector
Detects HuggingFace quantization format from
config.json.-
Method Summary
Modifier and TypeMethodDescriptionstatic QuantFormatDetects the quantization format for a checkpoint directory.static QuantFormatfromConfig(tools.jackson.databind.JsonNode root) Parsesquantization_config(or related fields) from a config tree.
-
Method Details
-
detect
Detects the quantization format for a checkpoint directory.- Parameters:
checkpointDir- model directory containingconfig.json.- Returns:
- detected format (
QuantFormat.DENSEwhen absent). - Throws:
IOException- ifconfig.jsonexists but cannot be parsed.
-
fromConfig
Parsesquantization_config(or related fields) from a config tree.- Parameters:
root-config.jsonroot.- Returns:
- detected format.
-