Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Model Quantization

Quantization reduces model VRAM (min_vram) so larger LLMs and image models can run on common 24 GB GPU nodes. Lower VRAM requirements also increase the number of matching nodes and can improve scheduling.

Crynux supports two modes:

  • Task-time quantization — the base model is floating-point (FP16 / BF16). You pass quantization_config on the request so the node quantizes weights at load time.

  • Pre-quantized models and components — the Hub repository already stores quantized weights (LLM AWQ / GPTQ / compressed-tensors, or image Nunchaku Lite / GGUF components). You select that model ID or replace a component through components. Do not stack a conflicting quantization_config on the same model or component.

How to Pass Quantization Config

OpenAI-Compatible APIs

On Chat Completions, Completions, Responses, Images Generations, and Images Edits:

  • Python OpenAI SDK: pass quantization_config (and optional dtype / components) through extra_body

  • JavaScript OpenAI SDK: pass the same fields as top-level request properties

See How to Run LLM using Crynux Network and OpenAI-Compatible Image API.

Raw Task API

Put quantization_config (and optional components for image tasks) inside the task_args JSON string on POST /inference_tasks. See Text-to-Text Task and Text-to-Image Task. The usual path is Crynux AS; for self-hosted wallet and fee control, use Crynux Bridge.

LLM Quantization

Task-time quantization shape

BitsAndBytes 4-bit (NF4 / FP4)

Supported quant_kwargs include load_in_4bit, bnb_4bit_quant_type ("nf4" or "fp4"), bnb_4bit_compute_dtype ("float16", "bfloat16", "float32"), and bnb_4bit_use_double_quant.

BitsAndBytes 8-bit (INT8)

Supported quant_kwargs include load_in_8bit, llm_int8_threshold (for example 6.0 or 0.0), and llm_int8_skip_modules.

Fine-grained FP8

Requires a GPU with compute capability 8.9 or higher.

scale_fmt may be "float" or "ue8m0". Do not pass dequantize in quant_kwargs.

Pre-quantized LLM checkpoints

Set model to the pre-quantized Hub repository. Omit quantization_config or set it to null.

Method
Example model ID

AWQ (INT4)

mattbucci/Qwen3.8-27B-AWQ

GPTQ / compressed-tensors (INT4)

RedHatAI/Qwen3.8-27B-INT4

compressed-tensors (FP8, etc.)

RedHatAI/Llama-3.2-1B-Instruct-FP8-dynamic

Image Model Quantization

Method 1: Task-time BitsAndBytes (per component)

components_to_quantize lists component names from the base pipeline model_index.json, for example ["transformer"] or ["transformer", "text_encoder"].

INT8 example for the transformer:

Method 2: Component GGUF through components

Keep base_model as the full Diffusers pipeline. Replace transformer with a community GGUF file:

Supported GGUF tensor types include Q4_0, Q4_1, Q5_0, Q5_1, Q8_0, Q2_K–Q6_K, and BF16.

You may combine a GGUF transformer with BitsAndBytes on other unquantized components (for example text_encoder). The same component must not receive two quantization methods.

Method 3: Pre-quantized Nunchaku Lite INT4 pipeline

Use a complete Nunchaku Lite Diffusers pipeline as base_model. Do not set components or quantization_config.

Platform Support and Scheduling Rules

Load
Windows CUDA
Linux / Docker CUDA

LLM BitsAndBytes / FP8

Supported

Supported

Image BitsAndBytes / GGUF

Supported

Supported

LLM AWQ / GPTQ / GPTQModel

Not scheduled

Supported

Image Nunchaku Lite

Not scheduled

Supported

Common rejection cases:

  • Passing quantization_config for a model or component that already has embedded quantization

  • Passing dequantize inside quant_kwargs

  • Targeting the same component with both components GGUF replacement and BitsAndBytes components_to_quantize

Last updated