Official agent skill

Add Inference Backend

by intel in intel/auto-round

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

OfficialApache-2.0Auto-check passedAI & LLM Engineering

Install Add Inference Backend

skills CLI
$ npx skills add intel/auto-round --skill add-inference-backend -a claude-code

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

GitHub CLI
$ gh skill install intel/auto-round add-inference-backend --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-inference-backend .claude/skills/add-inference-backend && 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-inference-backend
GitHub stars
1.6k
Token cost
~2.3k tokens
SKILL.md length
418 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
Apache-2.0

At a glance

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

  • Works in 5 steps: Register Backend Info → Implement QuantLinear Module → Wire Up QuantLinear Import Logic → …
  • Implementing QuantLinear kernels
  • SKILL.md covers Overview, Prerequisites, Step 1: Register Backend Info and Step 2: Implement QuantLinear…, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Add Inference Backend is an agent skill from intel/auto-round, published by the product's own GitHub organization. Add a new hardware inference backend to AutoRound for deploying quantized models (e.g., CUDA/Marlin, Triton, CPU, HPU, ARK). Use when implementing QuantLinear kernels, registering backend capabilities, or enabling quantized model inference on a new hardware platform.

Its SKILL.md is about 2.3k 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 CUDA. 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 QuantLinear kernels
  • Registering backend capabilities
  • Enabling quantized model inference on a new hardware platform

Example prompts

  • “/add-inference-backend”

Requirements

  • Python 3

Workflow steps

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

  1. Register Backend Info
  2. Implement QuantLinear Module
  3. Wire Up QuantLinear Import Logic
  4. Add Extension init.py
  5. 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 Inference Backend loads about 2.3k tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 418 words of instructions outside code blocks.

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

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). 418 words, ~2,297 tokens.

Download SKILL.mdSave it as .claude/skills/add-inference-backend/SKILL.md (or your agent's skills folder).
name
add-inference-backend
description
Add a new hardware inference backend to AutoRound for deploying quantized models (e.g., CUDA/Marlin, Triton, CPU, HPU, ARK). Use when implementing QuantLinear kernels, registering backend capabilities, or enabling quantized model inference on a new hardware platform.

Adding a New Inference Backend to AutoRound

Overview

This skill guides you through adding a new inference backend for running quantized models on a specific hardware platform. A backend defines how quantized weights are unpacked and computed at inference time. AutoRound automatically selects the best available backend based on hardware, quantization config, and priority.

Prerequisites

Before starting, determine:

  1. Target hardware: CPU (Intel/AMD), CUDA GPU, Intel XPU, Habana HPU, etc.
  2. Supported quantization configs: Which bit-widths, group sizes, and data types your backend handles
  3. Kernel implementation: Triton, CUDA C++, PyTorch native, or external library (e.g., GPTQModel Marlin)
  4. Packing format: How quantized weights are stored in memory

Step 1: Register Backend Info

Edit auto_round/inference/backend.py to register your backend's capabilities:

python
BackendInfos["auto_round:your_backend"] = BackendInfo(
    device=["cuda"],  # Supported devices
    sym=[True, False],  # Symmetric and/or asymmetric
    packing_format=["auto_round"],  # Compatible packing formats
    bits=[2, 4, 8],  # Supported bit-widths
    group_size=[32, 64, 128, -1],  # Supported group sizes (-1 = per-channel)
    compute_dtype=["float16", "bfloat16"],  # Compute precision
    data_type=["int"],  # Quantization data types
    act_bits=[16, 32],  # Activation bit-widths (16 = WxA16)
    priority=2,  # Higher = preferred (0-5 typical range)
    checkers=[your_feature_checker],  # Validation functions (optional)
    alias=["your_backend_short"],  # Alternative names (optional)
    requirements=["some_package>=1.0"],  # Required packages (optional)
    systems=["linux"],  # OS restriction (optional)
)
BackendInfo Fields Reference
FieldTypeDescription
devicelist[str]Hardware targets: "cpu", "cuda", "xpu", "hpu"
symlist[bool]True for symmetric, False for asymmetric
packing_formatlist[str]How weights are packed: "auto_round", "auto_gptq", etc.
bitslist[int]Supported weight bit-widths
group_sizelist[int]Group sizes; -1 means per-channel
compute_dtypelist[str]Compute precision during inference
data_typelist[str]Quantization data types: "int", "nv_fp", "mx_fp"
act_bitslist[int]Activation bits: [16, 32] for weight-only, [8] for W8A8
priorityintSelection priority (higher wins when multiple backends match)
checkerslist[Callable]Functions to validate layer compatibility
aliaslist[str]Alternative names for CLI/API usage
requirementslist[str]pip-installable dependency specifications
systemslist[str]OS names: "linux", "windows", "darwin"
Checker Functions

Use these pre-built checkers or create your own:

python
# Require in_features and out_features divisible by 32
from auto_round.inference.backend import feature_multiply_checker_32

# Require in_features divisible by group_size
from auto_round.inference.backend import in_feature_checker_group_size


# Custom checker
def your_feature_checker(in_feature, out_feature, config):
    """Check if layer dimensions are compatible with your backend."""
    return in_feature % 64 == 0 and out_feature % 64 == 0 and config["group_size"] in [64, 128]

Step 2: Implement QuantLinear Module

Create auto_round_extension/your_device/qlinear_your_backend.py:

python
import torch
import torch.nn as nn

QUANT_TYPE = "your_backend"


class QuantLinear(nn.Module):
    """Quantized linear layer for your backend.

    Stores packed quantized weights and performs dequantize-then-matmul
    (or fused quantized matmul) at inference time.
    """

    QUANT_TYPE = QUANT_TYPE

    def __init__(self, bits, group_size, in_features, out_features, bias=True, sym=True, **kwargs):
        super().__init__()
        self.bits = bits
        self.group_size = group_size
        self.in_features = in_features
        self.out_features = out_features
        self.sym = sym

        # Register packed weight buffers
        # Example: INT4 packed into INT32
        pack_factor = 32 // bits
        self.register_buffer(
            "qweight",
            torch.zeros(in_features // pack_factor, out_features, dtype=torch.int32),
        )
        self.register_buffer(
            "scales",
            torch.zeros(
                (in_features // group_size, out_features),
                dtype=torch.float16,
            ),
        )
        if not sym:
            self.register_buffer(
                "qzeros",
                torch.zeros(
                    (in_features // group_size, out_features // pack_factor),
                    dtype=torch.int32,
                ),
            )
        if bias:
            self.register_buffer("bias", torch.zeros(out_features, dtype=torch.float16))
        else:
            self.bias = None

    def forward(self, x):
        """Dequantize weights and compute linear transformation."""
        weight = self._dequantize()
        out = torch.matmul(x, weight.T)
        if self.bias is not None:
            out += self.bias
        return out

    def _dequantize(self):
        """Unpack and dequantize weights."""
        # Implement your dequantization kernel here
        # Can use Triton, CUDA, or PyTorch operations
        ...

    @classmethod
    def pack(cls, linear, scales, zeros, bias=None):
        """Pack a standard nn.Linear into this quantized format.

        Called during export to convert calibrated weights into packed format.
        """
        ...
Show full SKILL.md (177 more words)Show less

Step 3: Wire Up QuantLinear Import Logic

Register your backend in the explicit import logic in auto_round/inference/backend.py. In this repository, backend loading is not a generic directory scan; dynamic_import_inference_linear() maps backend keys to specific QuantLinear implementations.

Add a new backend key in BackendInfos[...] if needed, and make sure dynamic_import_inference_linear() returns your QuantLinear class for that backend:

python
if backend == "auto_round:your_backend":
    from auto_round_extension.your_device.qlinear_your_backend import QuantLinear

    return QuantLinear

If your backend fits an existing branch pattern, you can also reuse that logic, but contributors should update the explicit import mapping rather than rely on implicit auto-discovery.

Step 4: Add Extension __init__.py

Create auto_round_extension/your_device/__init__.py if the directory is new:

python
# Auto-Round extension for YourDevice backend

Step 5: Test

Unit test for the QuantLinear
python
def test_your_backend_qlinear():
    from auto_round_extension.your_device.qlinear_your_backend import QuantLinear

    ql = QuantLinear(bits=4, group_size=128, in_features=256, out_features=512)
    x = torch.randn(1, 256, dtype=torch.float16, device="cuda")
    out = ql(x)
    assert out.shape == (1, 512)
End-to-end test
python
def test_your_backend_e2e(tiny_opt_model_path, dataloader):
    ar = AutoRound(
        tiny_opt_model_path,
        bits=4,
        group_size=128,
        dataset=dataloader,
        iters=2,
        nsamples=2,
    )
    compressed_model, _ = ar.quantize()
    ar.save_quantized(output_dir="./tmp_backend_test", format="auto_round")

    # Load and verify inference with your backend
    from transformers import AutoModelForCausalLM, AutoTokenizer

    model = AutoModelForCausalLM.from_pretrained("./tmp_backend_test")
    tokenizer = AutoTokenizer.from_pretrained("./tmp_backend_test")
    inputs = tokenizer("Hello", return_tensors="pt").to("cuda")
    outputs = model.generate(**inputs, max_new_tokens=10)
    assert outputs.shape[1] > inputs["input_ids"].shape[1]

Reference: Existing Backend Implementations

Backend KeyDeviceExtension DirKey Patterns
auto_gptq:exllamav2CUDAcuda/Marlin kernels via GPTQModel, priority=3
auto_round:triton_*CUDAtriton/Triton JIT-compiled kernels
auto_round:torch_*CPU/CUDAtorch/Pure PyTorch fallback
auto_round:arkARKark/ARK accelerator kernels
HPU backendsHPUhpu/Habana Gaudi optimized

Key Registration Points

WhatWhereMechanism
Backend capabilitiesauto_round/inference/backend.pyBackendInfos["name"] dict
QuantLinear moduleauto_round_extension/<device>/qlinear_*.pyQUANT_TYPE class attr
QuantLinear import wiringauto_round/inference/backend.pydynamic_import_inference_linear()
Feature checkersauto_round/inference/backend.pyfunctools.partial wrappers

© 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-inference-backend of intel/auto-round.

Open the folder on GitHubat commit 6afaecd

Compare with similar skills

Add Inference Backend 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 Inference Backend compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Inference Backend this skillintel/auto-round1.6k—~2.3kAutomated safety check: PassApache-2.0
Benchmark TuneMesh-LLM/mesh-llm3.5k—~1.6kAutomated safety check: PassApache-2.0
Hugging Face Local Modelshuggingface/skills11k3 repos~945Automated safety check: PassApache-2.0
Quark Onnx Quant Planamd/Quark181—~4.8kAutomated safety check: PassMIT
Kernel Microbenchmarkguqiong96/Lvllm4642 repos~1.5kAutomated safety check: PassApache-2.0
Model Serving MinefieldBlackwellboy/model-serving-minefield135—~2.1kAutomated safety check: PassMIT

Similar skills

  • Benchmark Tune

    Mesh-LLM/mesh-llm

    A skill your agent uses when running, debugging, interpreting, or documenting mesh-llm benchmark tune model-serving throughput trials, including choosing…

    3.5k GitHub stars~1.6k tokensUpdated today
    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
  • Build a Quark ONNX PTQ quantization plan from modelanalysis.json and user intent.

    181 GitHub stars~4.8k tokensUpdated 9 days ago
    AI & LLM EngineeringAuto-check passed
  • Kernel Microbenchmark

    guqiong96/Lvllm

    Build, debug, and interpret vLLM GPU kernel microbenchmarks for CUDA, Triton, and CuteDSL, including CUPTI timing, correctness checks, generated-code inspection, multi-GPU measurements, and SOL…

    464 GitHub starsUsed in 2 repos~1.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Model Serving Minefield

    Blackwellboy/model-serving-minefield

    Diagnose OpenAI-compatible model-serving failures from symptoms, endpoint reports, explicit configuration files, or logs while preserving evidence status and requiring confirm/refute checks.

    135 GitHub stars~2.1k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Graphsignal

    graphsignal/graphsignal

    Profile AI inference workloads (vLLM, SGLang, TensorRT-LLM, PyTorch, any GPU application) with the Graphsignal profiler and read the results from its local /signals JSON endpoint.

    257 GitHub stars~6.2k tokensUpdated 9 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
  • Official

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

    1.6k GitHub stars~1.5k 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 Inference Backend

What does Add Inference Backend do?

Add a new hardware inference backend to AutoRound for deploying quantized models (e.g., CUDA/Marlin, Triton, CPU, HPU, ARK). Add Inference Backend is an agent skill from intel/auto-round, published by the product's own GitHub organization., CUDA/Marlin, Triton, CPU, HPU, ARK).

When should I use Add Inference Backend?

Add Inference Backend fits situations like: implementing QuantLinear kernels; registering backend capabilities; enabling quantized model inference on a new hardware platform.

How do I install Add Inference Backend in Claude Code?

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

How do I install Add Inference Backend in Codex?

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

Can I use Add Inference Backend 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-inference-backend -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-inference-backend, .gemini/skills/add-inference-backend, .github/skills/add-inference-backend and .opencode/skills/add-inference-backend in your project.

What does Add Inference Backend need to run?

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

Does Add Inference Backend 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 Inference Backend 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 Inference Backend use?

Add Inference Backend 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 Inference Backend use?

About 2.3k tokens (SKILL.md is roughly 9.2k 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 Inference Backend?

Skills that share tags, products or a category with Add Inference Backend: Benchmark Tune (Mesh-LLM/mesh-llm, 3.5k stars), Hugging Face Local Models (huggingface/skills, 11k stars), Quark Onnx Quant Plan (amd/Quark, 181 stars) and Kernel Microbenchmark (guqiong96/Lvllm, 464 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Inference Backend?

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.