Official agent skill

Add Quantization Datatype

by intel in intel/auto-round

Add a new quantization data type to AutoRound (e.g., INT, FP8, MXFP, NVFP, GGUF variants).

OfficialApache-2.0Auto-check passedAI & LLM Engineering

Install Add Quantization Datatype

skills CLI
$ npx skills add intel/auto-round --skill add-quantization-datatype -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install intel/auto-round add-quantization-datatype --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/intel/auto-round.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-quantization-datatype .claude/skills/add-quantization-datatype && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-quantization-datatype
GitHub stars
1.6k
Token cost
~1.5k tokens
SKILL.md length
306 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
Apache-2.0

At a glance

Add a new quantization data type to AutoRound (e.g., INT, FP8, MXFP, NVFP, GGUF variants).

  • Works in 6 steps: Create the Data Type Module → Register Multiple Variants (Optional) → Register in init.py → …
  • Implementing a new weight/activation quantization scheme
  • SKILL.md covers Overview, Prerequisites, Step 1: Create the Data Type… and Step 2: Register Multiple…, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Add Quantization Datatype is an agent skill from intel/auto-round, published by the product's own GitHub organization. Add a new quantization data type to AutoRound (e.g., INT, FP8, MXFP, NVFP, GGUF variants). Use when implementing a new weight/activation quantization scheme, registering a new quant function, or extending the datatype registry.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering LLM inference and serving. It works with llama.cpp. The repository describes itself as: A simple and effective post training quantization toolkit for high-accuracy low-bit LLM inference|简洁且高效的后训练量化工具包. The licence is Apache-2.0.

When your agent uses it

  • Implementing a new weight/activation quantization scheme
  • Registering a new quant function
  • Extending the datatype registry

Example prompts

  • “/add-quantization-datatype”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Create the Data Type Module
  2. Register Multiple Variants (Optional)
  3. Register in init.py
  4. Add Scheme Preset (If Needed)
  5. Update Export Format Support
  6. Test

What it can do on your machine

Read from SKILL.md and the folder at commit 6afaecd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Quantization Datatype loads about 1.5k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 306 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from intel/auto-round at commit 6afaecd, republished under its Apache-2.0 licence (© intel). 306 words, ~1,486 tokens.

Download SKILL.mdSave it as .claude/skills/add-quantization-datatype/SKILL.md (or your agent's skills folder).
name
add-quantization-datatype
description
Add a new quantization data type to AutoRound (e.g., INT, FP8, MXFP, NVFP, GGUF variants). Use when implementing a new weight/activation quantization scheme, registering a new quant function, or extending the data_type registry.

Adding a New Quantization Data Type to AutoRound

Overview

This skill guides you through adding a new quantization data type to AutoRound. A data type defines how tensors are quantized and dequantized (e.g., INT symmetric, FP8 per-block, MXFP4). Each data type is registered via a decorator and plugged into the quantization loop automatically.

Prerequisites

Before starting, determine:

  1. Data type category: Integer (INT), floating-point (FP8, BF16), mixed-format (MXFP, NVFP), or GGUF variant
  2. Quantization parameters: bits, group_size, symmetric/asymmetric, scale format
  3. Special requirements: Block-wise scaling, imatrix support, custom rounding

Step 1: Create the Data Type Module

Create a new file at auto_round/data_type/your_dtype.py.

Function Signature

The quantization function must follow this contract:

python
from auto_round.data_type.register import register_dtype
from auto_round.data_type.utils import reshape_pad_tensor_by_group_size, revert_tensor_by_pad


@register_dtype("your_dtype_name")
def quant_tensor_your_dtype(
    tensor,
    bits=4,
    group_size=128,
    v=0,
    min_scale=0,
    max_scale=0,
    scale_dtype=torch.float16,
    q_scale_thresh=0,
    weight_fp8_max_scale=0,
    imatrix=None,
    **kwargs
):
    """Quantize a tensor using your data type.

    Args:
        tensor: The weight tensor to quantize (2D: [out_features, in_features])
        bits: Number of quantization bits
        group_size: Number of elements per quantization group
        v: Learnable perturbation tensor (for SignSGD optimization, same shape as tensor)
        min_scale: Minimum scale clipping value
        max_scale: Maximum scale clipping value
        scale_dtype: Data type for quantization scales
        q_scale_thresh: Threshold for scale quantization
        weight_fp8_max_scale: Max scale for FP8 weight quantization
        imatrix: Importance matrix for weighted quantization (optional)
        **kwargs: Additional parameters

    Returns:
        tuple: (qdq_tensor, scale, zp)
            - qdq_tensor: Quantized-then-dequantized tensor (same shape as input)
            - scale: Quantization scale tensor
            - zp: Zero-point tensor (or maxq for symmetric)
    """
    # 1. Apply perturbation
    tensor = tensor + v

    # 2. Reshape by group_size
    orig_shape = tensor.shape
    tensor, orig_out_features = reshape_pad_tensor_by_group_size(tensor, group_size)

    # 3. Compute scale and zero-point
    # ... your quantization logic here ...

    # 4. Quantize and dequantize (Straight-Through Estimator for gradients)
    from auto_round.data_type.utils import round_ste

    tensor_q = round_ste(tensor / scale) + zp  # or your rounding logic
    qdq_tensor = (tensor_q - zp) * scale

    # 5. Revert padding
    qdq_tensor = revert_tensor_by_pad(qdq_tensor, orig_out_features, orig_shape)

    return qdq_tensor, scale, zp
Key Utilities from auto_round/data_type/utils.py
  • reshape_pad_tensor_by_group_size(tensor, group_size) — Reshape tensor into groups, padding if needed
  • revert_tensor_by_pad(tensor, orig_out_features, orig_shape) — Undo padding and restore original shape
  • round_ste(x) — Round with Straight-Through Estimator (gradient passthrough)
  • get_quant_func(data_type, bits) — Look up registered quant function

Step 2: Register Multiple Variants (Optional)

If your data type has variants, register them all:

python
@register_dtype(["your_dtype", "your_dtype_v2"])
def quant_tensor_your_dtype(tensor, bits=4, group_size=128, v=0, **kwargs):
    variant = kwargs.get("data_type", "your_dtype")
    # Branch logic based on variant
    ...

Step 3: Register in __init__.py

Add your import to auto_round/data_type/__init__.py:

python
import auto_round.data_type.your_dtype

This triggers the @register_dtype decorator, populating QUANT_FUNC_WITH_DTYPE.

Step 4: Add Scheme Preset (If Needed)

If your data type corresponds to a named scheme (e.g., "W4A16", "MXFP4"), add it to auto_round/schemes.py:

python
YOUR_SCHEME = QuantizationScheme(
    bits=4,
    group_size=32,
    sym=True,
    data_type="your_dtype",
)
PRESET_SCHEMES["YOUR_SCHEME"] = YOUR_SCHEME

Step 5: Update Export Format Support

If your data type needs specific export handling, update the relevant export format's support_schemes list in the corresponding OutputFormat subclass under auto_round/export/.

Step 6: Test

Create tests in the appropriate test directory (e.g., test/test_cuda/ or test/test_cpu/):

python
def test_your_dtype_quantization(tiny_opt_model_path, dataloader):
    ar = AutoRound(
        tiny_opt_model_path,
        bits=4,
        group_size=128,
        data_type="your_dtype",
        dataset=dataloader,
        iters=2,
        nsamples=2,
    )
    compressed_model, _ = ar.quantize()
    # Verify model produces valid outputs

Reference: Existing Data Type Implementations

FileData TypesKey Patterns
auto_round/data_type/int.pyint (sym/asym)Basic INT quantization with min/max scaling
auto_round/data_type/fp8.pyfp8_e4m3fn, fp8_e5m2, fp8_dynamic, fp8_blockPer-tensor/block FP8 with amax-based scaling
auto_round/data_type/mxfp.pymx_fp, mx_fp_rceilMicroscaling with shared exponent
auto_round/data_type/nvfp.pynv_fp, nv_fp4NVIDIA FP4 with static group scale
auto_round/data_type/w4fp8.pyw4fp8Hybrid INT4 weight + FP8 activation
auto_round/data_type/gguf.pyGGUF Q2_K through Q8_0Super-block quantization with multiple sub-types

© intel, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/add-quantization-datatype of intel/auto-round.

Open the folder on GitHubat commit 6afaecd

Compare with similar skills

Add Quantization Datatype next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Quantization Datatype compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Quantization Datatype this skillintel/auto-round1.6k—~1.5kAutomated safety check: PassApache-2.0
Qwen Mtp GgufR6410418/Jackrong-llm-finetuning-guide1.7k—~1.7kAutomated safety check: PassMIT
Hugging Face Local Modelshuggingface/skills11k3 repos~945Automated safety check: PassApache-2.0
Hf Quant And Layer Package JobsMesh-LLM/mesh-llm3.5k—~1.6kAutomated safety check: PassApache-2.0
Llama Patch ChangesMesh-LLM/mesh-llm3.5k—~1.9kAutomated safety check: PassApache-2.0
Skippy Spec BenchMesh-LLM/mesh-llm3.5k—~260Automated safety check: PassApache-2.0

Similar skills

  • Qwen Mtp Gguf

    R6410418/Jackrong-llm-finetuning-guide

    Complete agent-ready workflow for Qwen-family MTP or nextn GGUF conversion and release.

    1.7k GitHub stars~1.7k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Hugging Face Local Models

    huggingface/skills

    Official

    Finds llama.cpp-compatible GGUF models on the Hugging Face Hub, picks a quantization for your hardware and launches them with llama-cli or llama-server.

    11k GitHub starsUsed in 3 repos~945 tokens
    AI & LLM EngineeringAuto-check passed
  • A skill your agent uses when running quantization of a BF16/FP16 GGUF repo and Skippy layer-package creation as one local or Hugging Face Jobs workflow, publishing both artifacts to Hugging Face.

    3.5k GitHub stars~1.6k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Llama Patch Changes

    Mesh-LLM/mesh-llm

    A skill your agent uses when changing mesh-llm's llama.cpp patch queue, upstream pin, prepare/build scripts, or carried RPC, MoE, and mesh-hook llama.cpp patches.

    3.5k GitHub stars~1.9k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Skippy Spec Bench

    Mesh-LLM/mesh-llm

    A skill your agent uses when testing or benchmarking target/draft GGUF pairs for speculative decoding compatibility, tokenizer agreement, draft acceptance rate, or staged verification behavior.

    3.5k GitHub stars~260 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Quantized Export

    wshobson/agents

    Export a promoted fine-tuned model in the right deployment format — merged safetensors, LoRA-only, GGUF with imatrix, or FP8.

    40k GitHub stars~2k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed

More from intel/auto-round

  • Official

    Adapt AutoRound to support a new diffusion model architecture (DiT, UNet, hybrid AR+DiT).

    1.6k GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed
  • Adapt New LLM

    intel/auto-round

    Official

    Adapt AutoRound to support a new LLM architecture that doesn't work out-of-the-box.

    1.6k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Add Export Format

    intel/auto-round

    Official

    Add a new model export format to AutoRound (e.g., autoround, autogptq, autoawq, gguf, llmcompressor).

    1.6k GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Add Inference Backend

    intel/auto-round

    Official

    Add a new hardware inference backend to AutoRound for deploying quantized models (e.g., CUDA/Marlin, Triton, CPU, HPU, ARK).

    1.6k GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Add Vlm Model

    intel/auto-round

    Official

    Add support for a new Vision-Language Model (VLM) to AutoRound, including multimodal block handler, calibration dataset template, and special model handling.

    1.6k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Review PR

    intel/auto-round

    Official

    Review or prepare a pull request for the AutoRound repository — checks registration points for new data types/backends/VLMs, validates Chinese translation parity for modified markdown files…

    1.6k GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Add Quantization Datatype

What does Add Quantization Datatype do?

Add a new quantization data type to AutoRound (e.g., INT, FP8, MXFP, NVFP, GGUF variants). Add Quantization Datatype is an agent skill from intel/auto-round, published by the product's own GitHub organization., INT, FP8, MXFP, NVFP, GGUF variants).

When should I use Add Quantization Datatype?

Add Quantization Datatype fits situations like: implementing a new weight/activation quantization scheme; registering a new quant function; extending the datatype registry.

How do I install Add Quantization Datatype in Claude Code?

Run `npx skills add intel/auto-round --skill add-quantization-datatype -a claude-code`. Or copy the skill folder (.claude/skills/add-quantization-datatype in intel/auto-round) into .claude/skills/add-quantization-datatype in your project. Claude Code loads it when a task matches its description.

How do I install Add Quantization Datatype in Codex?

Run `npx skills add intel/auto-round --skill add-quantization-datatype -a codex`. Or copy the skill folder (.claude/skills/add-quantization-datatype in intel/auto-round) into .agents/skills/add-quantization-datatype in your project. Codex loads it when a task matches its description.

Can I use Add Quantization Datatype in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add intel/auto-round --skill add-quantization-datatype -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-quantization-datatype, .gemini/skills/add-quantization-datatype, .github/skills/add-quantization-datatype and .opencode/skills/add-quantization-datatype in your project.

What does Add Quantization Datatype need to run?

SKILL.md names no scripts, command-line tools or credentials: Add Quantization Datatype is instructions for the agent only. Our summary lists: Python 3.

Does Add Quantization Datatype access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Add Quantization Datatype safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add Quantization Datatype use?

Add Quantization Datatype is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Quantization Datatype use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Quantization Datatype?

Skills that share tags, products or a category with Add Quantization Datatype: Qwen Mtp Gguf (R6410418/Jackrong-llm-finetuning-guide, 1.7k stars), Hugging Face Local Models (huggingface/skills, 11k stars), Hf Quant And Layer Package Jobs (Mesh-LLM/mesh-llm, 3.5k stars) and Llama Patch Changes (Mesh-LLM/mesh-llm, 3.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Quantization Datatype?

intel (a GitHub organization, an official publisher) maintains it in intel/auto-round, which has 1,628 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 5, 2026.

Source: intel/auto-round on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.