# IST-DASLab/marlin

FP16xINT4 LLM inference kernel that can achieve near-ideal ~4x speedups up to medium batchsizes of 16-32 tokens.

Repository: https://github.com/IST-DASLab/marlin
Canonical: https://ross.abutalabs.com/products/marlin
Language: Python
License: Apache-2.0
License Family: permissive
Topics: 4bit, kernel, llm, quantization
Last push: 2024-09-04T13:35:00+00:00

## Health v2 (maintenance only)
Score: 26/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 68
- inputs: {"age_days": 959, "days_push": 728, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1136, forks 91 (observed 2026-08-28T04:03:43.718387+00:00)

## What it is
Marlin is a highly optimized FP16xINT4 matrix multiplication CUDA kernel for LLM inference that achieves near-ideal 4x speedups at batch sizes up to 16-32 tokens. It uses advanced GPU optimization techniques to fully saturate memory, cache, and tensor core resources simultaneously.

## Use cases
- speed up LLM inference with 4-bit quantized weights
- serve quantized models at medium batch sizes
- accelerate speculative decoding
- run multi-inference schemes like CoT-Majority efficiently
- integrate a fast FP16xINT4 matmul kernel into inference frameworks

## When to choose
- you need near-4x speedups from weight-only 4-bit quantization at batch sizes of 16-32 tokens
- you are serving quantized LLMs at larger scale or with speculative decoding
- prior kernels only give speedups at batch size 1-2 and you need more throughput

## When to avoid
- you need very large batch sizes where the kernel's advantage diminishes
- you need mixed FP16xINT4 support on non-NVIDIA or older GPUs
- you want a full inference engine rather than a single matmul kernel

## Facets
- artifact type: library
- maturity: active
- function: llm-inference, gpu-computing, machine-learning
- domain: large-language-models, deep-learning, gpu-computing
- platform: python
- tags: quantization, 4bit-weights, cuda-kernel, matmul, weight-only-quantization, gpu, linux

## Member repositories
- IST-DASLab/marlin (main) score 26

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:43.718387+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:36:25.798814+00:00, confidence not recorded.
  - readme: https://github.com/IST-DASLab/marlin (fetched 2026-08-28T04:03:43.718387+00:00, sha fca58d990c88)
- Data as of 2026-08-30T08:39:29.467469+00:00.
