WorksComputer Science
BitPrefill: W1.58A4 Tensor-Core Acceleration for Compute-Bound LLM Prefill
Abstract
Low-bit quantization reduces large language model (LLM) inference cost, yet implementations optimized for memory-bound decode can leave compute-bound prefill on BF16 tensor cores. This gap matters for input-heavy workloads, including long-context and multimodal applications, where prefill can account for a substantial fraction of inference latency. We propose a W1.58A4 operator that quantizes weights to ternary values and activations to 4-bit, while executing the linear projection on native INT4 general matrix multiply (GEMM) tensor cores, turning prefill from a full-precision matrix multiply into a low-bit one. We deploy the operator for BitNet-b1.58 on a single RTX 4090 and a Jetson Orin Nano edge device, and report GEMM-kernel latency, end-to-end LLMs prefill latency, and task accuracy against bf16 and BitNet/BitBLAS baselines. Our proposed kernel achieves ~1.42x acceleration compared to the original BF16 prefill phase, with negligible reduction on model accuracy.
Figure 1. Motivation for our proposed method. Input-heavy applications make prefill compute-bound, while batch-1 decode remains memory-bound. exploits INT4 Tensor Cores for faster prefill while retaining compressed kernels for decode.
Introduction
Efficient large language model (LLM) inference on constrained hardware has become increasingly important as LLMs move from data-center servers to consumer GPUs and edge platforms. Low-bit quantization is one of the primary techniques for reducing inference cost. Existing systems [1, 2, 3, 4, 5, 6] commonly quantize weights to 4 bits or below while keeping activations in BF16 or INT8, and execute the resulting linear layers using mixed-precision GEMM kernels. This design is highly effective for the decode stage, where the model generates one token at a time. In this regime, the GEMM has a very small token dimension ( per sequence), leading to low arithmetic intensity and memory-bound execution. Weight movement therefore becomes a dominant cost, so reducing weight precision directly lowers memory traffic and can substantially accelerate decode. However, the arithmetic itself typically still executes at a higher precision, such as INT8 or BF16 depending on the activation format.
The same approach is less effective for prefill, which is the gap targeted in this work. Prefill processes the entire input context before generation begins, producing GEMMs with a much larger token dimension and higher arithmetic intensity. As grows, execution becomes increasingly compute-bound, so reducing weight traffic alone provides diminishing returns. Thus, accelerating prefill requires lowering the arithmetic precision of the GEMM itself by reducing both weight and activation precision, rather than only compressing the stored weights.
This distinction is increasingly relevant for workloads with long input contexts relative to their outputs, including summarization [7], long-context reasoning [9], and multimodal inference [11]–[13]. For example, a image with patches produces 441 visual patch tokens before any model-specific compression, so multiple frames can quickly enlarge the prefill sequence. In such input-dominated workloads, prefill can become a major contributor to time-to-first-token and end-to-end latency.
This limitation is particularly important for ternary LLMs such as BitNet [2, 3]. A ternary weight takes one of three values, , corresponding to an information-theoretic precision of bits; hence the notation . Ternary models are attractive for edge inference because they substantially reduce model storage and weight-transfer cost. However, a W1.58A16 implementation still performs its dominant prefill computation on BF16 tensor cores because the activation operand remains BF16. Thus, it reduces memory traffic while leaving the compute roofline largely unchanged. On an RTX 4090, the theoretical peak throughput is roughly 1321 INT4 TOPS versus 165 BF16 TFLOPS, exposing an approximately 8× gap in available arithmetic throughput.
We therefore develop a W1.58A4 execution path in which BitNet weights remain algorithmically ternary but are represented using signed INT4 fields for hardware execution, while activations are quantized to INT4. This enables the prefill GEMM to execute on native INT4 tensor-core MMA instructions available on Ampere and Ada GPUs. W1.58 describes the algorithmic weight precision, whereas INT4 is the physical execution format required by current commodity tensor cores. We implement the operator using CUTLASS and evaluate it on both an RTX 4090 GPU and a Jetson Orin Nano edge device.
Achieving a fast INT4 GEMM alone is not sufficient for end-to-end acceleration. First, INT4 GEMM accumulates into INT32, and a separate dequantization kernel would require additional passes over the output. We therefore fuse per-channel weight scaling and per-token activation scaling into the GEMM epilogue using an Epilogue Visitor Tree (EVT), directly emitting BF16 outputs. Second, the optimal INT4 tile configuration depends strongly on the prefill token dimension . We therefore precompile a set of candidate tile configurations, select and cache the best configuration for each problem shape, and combine this with Stream-K [14] scheduling to improve utilization for irregular tile counts.
In summary, this paper makes three contributions:
We develop a W1.58A4 INT4 Tensor-Core operator for compute-bound LLM prefill, enabling ternary BitNet weights and 4-bit activations to execute through native INT4 GEMM on both RTX 4090 and Jetson Orin Nano platforms.
We introduce a shape-adaptive kernel selection (SAKS) strategy that selects among precompiled GEMM candidates for each shape and device, including tile geometry, pipeline depth, and optional Stream-K work decomposition to improve utilization across prefill lengths.
We propose an EVT-fused dequantization GEMM that applies per-channel weight scales and per-token activation scales directly in the epilogue, converting INT32 accumulators to BF16 outputs without materializing an intermediate INT32 tensor or launching a separate dequantization kernel.
Related Work
Low-bit Large Language Models
BitNet [15] introduced end-to-end 1-bit transformer training through a quantization-aware BitLinear layer, while BitNetb1.58 [3] extended this to ternary weights with absmean scaling and near full-precision perplexity. BitNet-b1.58-2B4T [1] is the largest open model in this family. Spectra [16] and ParetoQ [17] further show strong size–accuracy tradeoffs for ternary models, whereas PB-LLM [5], BiLLM [6], and OneBit [4] obtain 1-bit weights from pretrained models. However, these methods retain 8–16-bit activations, leaving GEMM execution at INT8/BF16 precision. BitNet a4.8 [18] introduces 4-bit activations through hybrid quantization and sparsification, but does not provide a released GPU kernel. Our work provides the required INT4 tensor-core operator for W1.58A4 execution and evaluates it end-to-end on consumer GPU and edge platforms.
On the systems side, bitnet.cpp [2] is the official CPU engine for ternary LLMs and builds on llama.cpp [19], which uses table lookups over precomputed low-bit partial sums to avoid explicit dequantization. LUT Tensor Core [20] extends this approach through hardware/software co-design. These works primarily target memory-bound decoding on CPUs or custom hardware, whereas we target compute-bound prefill on commodity GPU tensor cores.
GEMM Kernels for Low-bit LLMs
CUTLASS [21] exposes native INT4 MMA on Ampere/Ada GPUs through templated threadblock, warp, and instruction tiles, multi-stage cp.async pipelines, and runtime selection among pre-instantiated kernels. Stream-K [14] splits a GEMM into mainloop iterations shared equally among persistent threadblocks, with partial tiles reconciled through a workspace, so utilization no longer depends on how the tile count divides the SM count. It balances how work is distributed but not how efficient each tile is. BitBLAS [22] instead uses TVM-based compilation and per-shape JIT autotuning for mixed-precision GEMMs such as FP16INT4 and INT4INT4. The GEMM epilogue processes accumulator fragments after the matrix reduction and before storing the output. The Epilogue Visitor Tree (EVT) [23] represents GEMM post-processing as a compile-time expression tree executed over accumulator fragments within the epilogue. It supports composable broadcasts, type conversions, reductions, and element-wise operations, allowing post-processing that would otherwise require separate kernels to be fused into GEMM. We use EVT to apply per-token and per-channel scales to INT32 accumulators and directly emit BF16 outputs.
Proposed W1.58A4 Prefill Execution
System Overview and Hybrid Execution
A BitNet linear layer computes , where contains token representations, contains weights, and . Here, is the GEMM token dimension, including the batch dimension when multiple sequences are flattened. Prefill processes many tokens concurrently, producing a matrix–matrix multiply with high arithmetic intensity, whereas autoregressive decode typically has or a small effective batch and is dominated by weight movement. We therefore use a hybrid policy: prefill uses the proposed W1.58A4 Tensor-Core GEMM, while decode retains the weight-compressed GEMV or low-batch kernel from the original BitNet runtime.
Figure 2 shows the resulting prefill dataflow. Weights are ternarized, packed, and transformed into the kernel layout once at model load. During prefill, BF16 activations are quantized per token and packed into signed INT4 fields. The packed operands are consumed by an INT4 Tensor-Core GEMM with INT32 accumulation, and an EVT epilogue applies the activation and weight scales before directly emitting BF16 outputs. This avoids materializing an intermediate INT32 output tensor and launching a separate dequantization kernel.
Figure 2. Prefill dataflow through the memory hierarchy. Packed INT4 operands feed Tensor-Core GEMM, while the fused EVT epilogue directly produces scaled BF16 outputs, eliminating the intermediate INT32 output tensor and separate dequantization kernel.
Arithmetic-Intensity Motivation
Assuming each operand is read once and the output written once, the idealized GEMM arithmetic intensity is
where , , and are the physical bytes per activation, weight, and output element. Our packed INT4 GEMM with BF16 output uses and ; this estimate excludes online quantization, scale loads, and scheduling workspace traffic. When weight traffic dominates at , . Larger amortizes weight reads, approaching the compute-bound regime when , where and denote peak dense throughput at the chosen arithmetic precision and memory bandwidth. W1.58A4 therefore targets prefill by reducing operand traffic and enabling native INT4 computation. Realized gains also depend on quantization overhead, occupancy, and scheduling efficiency.
Ternary-to-INT4 Mapping and Activation Quantization
Ternary weights: We use a per-output-channel absmean scale
The reconstructed weight is , where . We store each ternary value in a signed INT4 field without changing its numerical value. W1.58 denotes the three-valued weight alphabet, whereas the execution representation occupies four bits per weight. This mapping enables the quantized activations and ternary weights to use the supported signed INT4INT4 Tensor Core instructions. It trades the storage density of a compact ternary encoding for direct execution on commodity Tensor Cores.
Per-token activation quantization: For token , we determine its dynamic range as
Here, prevents a zero activation scale. We then quantize the activation to the symmetric INT4 range:
Thus, . Per-token scaling adapts to input-dependent activation ranges without requiring a calibration dataset. The quantization kernel computes the rowwise maximum, derives , quantizes the row, and writes packed INT4 values in one kernel invocation so that the intermediate unpacked integer tensor is never materialized.
Integer accumulation: The Tensor Core mainloop computes
using signed INT4 activations and ternary weights stored in signed INT4 fields. Since and , each product has magnitude at most 7, and hence . For typical LLM dimensions ( on the order of –), this bound remains several orders of magnitude below the INT32 limit. The dequantized output is
Packed Storage and Tensor-Core Dataflow
Two signed INT4 values are packed into each byte. Within a logical row, elements and occupy the lower and upper nibbles of byte , respectively. Four-bit two’s-complement encoding represents as 0xF. For even , the packed activation and weight payloads occupy and bytes, excluding scales and any alignment padding.
Let denote the reduction depth processed in one mainloop iteration. A full output tile consumes a activation tile and a weight tile. Each activation is reused across output channels, while each weight is reused across tokens. The packed operand payload for this iteration is bytes, giving
This quantity describes computation per byte of staged operands, excluding output traffic and repeated shared-memory fragment accesses. Increasing or improves operand reuse, whereas increasing alone does not change this ratio. Instead, controls the operand-buffer size and the number of mainloop iterations. These distinct effects motivate considering output tiling and reduction depth separately.
Weights are quantized and packed during model initialization; the packed weights and channel scales are reused across requests. Activations are quantized and packed online using input-dependent token scales. Vectorized global-memory accesses transfer the packed operands into CUTLASS shared-memory layouts that support warp-level operand-fragment loading. The mainloop operates on output tiles using a -stage shared-memory pipeline. Prefetching subsequent operand tiles overlaps their transfer with computation on earlier stages. Warps load packed fragments into registers and issue mma.sync instructions with signed INT4 operands and INT32 accumulation, avoiding explicit expansion of the operands to BF16. At the instruction level, the dense m16n8k64 MMA form distributes a 16 64 activation fragment and a 64 8 weight fragment across a 32-thread warp. Each thread supplies four 32-bit registers containing packed activation values and two containing packed weight values, and holds four INT32 accumulators for the 168 output fragment. Larger warp output tiles are assembled from multiple such fragments. This mapping explains how packed INT4 operands are consumed directly while accumulator storage grows with the warp output-tile area.
Data-parallel execution completes each output tile within one threadblock. Stream-K [14] may instead materialize partial accumulators in a workspace when a tile spans multiple threadblocks. After the required partial sums have been reconciled, the fused epilogue applies the scales and stores the completed output directly in BF16.
Resource- and Shape-Adaptive Kernel Selection
The fastest kernel configuration depends on both the GEMM shape and the target GPU. Figure 3(a) summarizes our selection flow: generate a set of precompiled candidate kernels, discard candidates that violate hardware resource or alignment constraints, benchmark the remaining candidates, and cache the lowest-latency configuration for each shape and device. We represent a candidate as , where and are the threadblock and warp output tiles, respectively; is the reduction depth per mainloop iteration; is the compile-time CUTLASS software-pipeline stage count; and is the work-decomposition strategy. The stage count specifies the number of shared-memory operand buffers used to overlap cp.async transfers with MMA execution; it is not the physical Tensor-Core pipeline depth. For stages, the nominal shared-memory payload occupied by packed INT4 operands is bytes, excluding layout padding and any additional epilogue or synchronization storage. Increasing adds buffering for latency hiding, whereas increasing enlarges each operand tile and reduces the number of mainloop iterations; both increase shared-memory consumption. Register pressure is governed mainly by the accumulator tile: a warp output tile of size contains INT32 values distributed across 32 threads. Thus, even though INT4 operands reduce operand-buffer storage relative to BF16, INT32 accumulators can still limit occupancy.

Figure 3. Shape-adaptive execution and fused dequantization. (a) The lowest-latency valid configuration is selected and cached for each shape and device. (b) EVT applies token and channel scales in the GEMM epilogue and directly emits BF16, avoiding an intermediate INT32 output tensor and a separate dequantization kernel.
Candidates that exceed the target GPU’s register, shared-memory, thread, or operand-alignment limits are excluded. For a valid candidate , we approximate the resident threadblocks per SM as
where , , and are the registers, shared-memory bytes, and threads required by one threadblock, and , , and are the corresponding per-SM capacities. Because tile size, pipeline depth, and occupancy interact non-monotonically, this model is used to filter invalid candidates rather than to analytically choose the final kernel.
For data-parallel execution, the number of output tiles is . Assuming one resident threadblock per SM and equal tile execution times, the idealized wave utilization on SMs is . A partially occupied final wave reduces this utilization. Stream-K can improve utilization by partitioning the finer-grained tile-iteration work across threadblocks, but it may introduce workspace traffic and synchronization to reconcile partial INT32 accumulators. Its benefit therefore depends on the full shape, not only on the number of output tiles, so we evaluate both work-decomposition strategies when they are valid.
During initialization or warm-up, the runtime benchmarks the valid candidates and records
where identifies the target GPU and includes the fused epilogue and any scheduling-related reduction overhead. Subsequent invocations retrieve the cached configuration and dispatch directly to .
EVT-Fused Two-Sided Dequantization
As illustrated in Figure 3(b), a conventional implementation materializes the INT32 accumulator tensor and launches a separate dequantization kernel, whereas EVT applies the scales in the GEMM epilogue and directly emits BF16. Excluding scale-vector loads and any Stream-K partial-reduction workspace traffic, the output-side transfers are
Thus, EVT fusion eliminates bytes of intermediate traffic, reducing these output-side transfers by 80%. We implement (5) through an Epilogue Visitor Tree that converts the completed INT32 accumulator to FP32, applies the channel and token scales, and casts the result to BF16:
The channel scale is broadcast along the dimension and the token scale is broadcast along the dimension. Scaling is performed in FP32 on register-resident accumulator fragments before the result is converted to BF16.
For an interior output tile, the epilogue requires distinct token scales and distinct channel scales. Each token scale applies to outputs, while each channel scale applies to outputs. The visitors associate these scales with the logical coordinates of the accumulator fragments, forming scale products as the fragments are processed. This requires only the two scale vectors, without materializing an matrix of scale products. When Stream-K divides a tile across threadblocks, its accumulator can be written as , where indexes the contributing reduction partitions. Since is independent of the partition, scaling can follow the completed integer reduction. Keeping partial sums in INT32 preserves the integer result under the accumulator bound established earlier and avoids rounding individual contributions to BF16 before summation. The fused epilogue therefore eliminates the output buffer used solely for dequantization while retaining any workspace required for partial-sum reconciliation. Because the EVT inherits the output-fragment layout of its parent GEMM, the same dequantization expression is instantiated for every candidate kernel configuration.
End-to-End Operator Boundary
The reported W1.58A4 prefill latency includes online activation-scale computation, activation quantization and packing, INT4 Tensor Core GEMM, scale application, and BF16 output storage. Offline weight quantization, persistent weight packing, and one-time kernel configuration search are excluded from steady-state inference latency because their costs are amortized across requests. Nonlinear operations, attention, normalization, residual connections, embeddings, and the output head retain their original model precision unless otherwise stated. This boundary distinguishes operator latency from end-to-end model latency and supports analysis of quantization, GEMM, and epilogue costs.
Experiment
We evaluate the proposed method at three levels: the INT4 GEMM kernel in isolation, the full BitNet-b1.58 forward pass (prefill / decode), and ablation study on the proposed shape-adaptive kernel selection and EVT-fused dequantization.
Experimental Setup
Hardware: Experiments are conducted on an NVIDIA RTX 4090 (Ada Lovelace, 128 SMs, 24 GB GDDR6X, 1008 GB/s) and a Jetson Orin Nano 8GB (Ampere, 8 SMs, 8 GB LPDDR5, 68 GB/s), both supporting native INT4 tensor-core MMA. These platforms represent distinct execution regimes: the RTX 4090’s high parallelism makes incomplete threadblock waves important for small and irregular GEMMs, whereas the Jetson’s limited SM count, shared memory, and power budget emphasize tile resource usage and occupancy. We therefore optimize kernel configurations independently for each device. We use CUDA 12.6, CUTLASS 4.6.0, with JetPack 6.2.2 on Jetson.
Model: We evaluate the proposed kernel on BitNet-b1.58 [3] model. On RTX 4090, we evaluate the original 3B model with all kernels. On Jetson Orin Nano with 8 GB DRAM, we evaluate the 3B model with our method and the 700M model across the runnable baselines, as the evaluated BF16 and BitNet implementations exceed the available memory when running the 3B model.
Supervised Fine-Tuning: We perform quantization-aware SFT on pretrained ternary BitNet b1.58 models (700M and 3B), following the 1bitLLM reproduction [3], with activations further quantized to 4 bits (A4). The 85,805-example corpus combines instruction-following, multi-turn dialogue, and reasoning data from ShareGPT [24], Alpaca [25], GSM8K [26], Anthropic HH [27], and OpenAssistant [28]. Training uses a maximum length of 2048 tokens, 3 epochs, AdamW, a peak learning rate of , cosine scheduling, and a 0.1 warmup ratio.
Baselines: We compare the proposed kernel with the following: i) BF16: cuBLAS bf16 kernel for both prefill and decode phases, ii) BitNet [3]: the official BitNet-b1.58 implementation, which deploys W1.58A8 ‘dp4a’ kernel for decode phase while bf16 kernel for prefill phase, and iii) BitBLAS [22]: BitBLAS dynamically generated kernels for prefill.
Metrics: We report four metrics: (1) Latency: Kernel latency is averaged over 50 timed launches after warm-up; model-level prefill and decode latencies are averaged over three warmed-up runs of the full generation pipeline with batch size 1 and 32 generated tokens. (2) GPU power: Mean power is measured by replaying each phase’s captured CUDA graph during 3 s, sampled every 20 ms (NVML board power). (3) Energy: We report energy per prefill and generated token, using NVML’s cumulative energy counter on RTX 4090 and mean rail power multiplied by per-call time on Jetson, which lacks an energy counter. (4) Perplexity (PPL): WikiText-2 [29] PPL measures quantized-model accuracy relative to the baselines under each configuration.
Kernel-Level Comparison
We firstly conduct kernel-level comparison for INT4xINT4 GEMM-kernel, i.e., BitBLAS and ours kernel, v.s. BF16 cuBLAS kernel. As a strongest baseline, BitBLAS runs the same INT4xINT4 matrix multiply-accumulate on the same packed operands. The core difference between BitBLAS kernel and our method is that BitBLAS is a general mixed-precision library, whose ladder type system and TileLang code generator simultaneously serve FP16xINT4, INT8xINT2 weight-only GEMMs, dequantizing GEMVs for decode, and native INT4xINT4 GEMM kernel. All are derived from one generic matmul template whose tiles and pipeline are proposed by a hardware-cost-model heuristic and then ranked by latency, while the dequantization is built around weight dequantization (group scales, zero points) instead of activation dequantization. Our kernel is optimized for W1.58A4 prefill, and two mechanisms of Sec. III follow from it. We breakdown each kernel into three phases: ‘Quant+Pack’, ‘GEMM INT4xINT4 Matrix-Multiply Accumulate’, and ‘Dequant’. For BF16, there is no quantization/pack and dequantization operations, while our method fuse dequantization into GEMM. As shown in Table I, our dequantization-fused GEMM kernel achieves about acceleration compared to BitBLAS kernel.
| Kernel | Quant+Pack (s) | GEMM (s) | Dequant (s) | Total (s) | |
| 64 | BF16 | - | 12.8 | - | 12.8 |
| BitBLAS | 3.0 | 6.3 | 9.5 | 18.8 | |
| Ours | 4.2 | 7.6 | 11.8 | ||
| 512 | BF16 | - | 57.8 | - | 57.8 |
| BitBLAS | 5.6 | 17.1 | 20.2 | 42.9 | |
| Ours | 7.8 | 18.8 | 26.6 | ||
| 1024 | BF16 | - | 95.6 | - | 95.6 |
| BitBLAS | 8.0 | 24.5 | 30.8 | 63.3 | |
| Ours | 9.8 | 29.9 | 39.7 | ||
| 2048 | BF16 | - | 183.0 | - | 183.0 |
| BitBLAS | 27.9 | 49.4 | 61.4 | 138.7 | |
| Ours | 15.6 | 44.5 | 60.1 |
Table I. Kernel Level Comparison. All kernels are evaluated with the shape while and are fixed to 2560. Experiments are conducted on a single RTX 4090.
LLM Benchmark
We run the full LLM model with a 512-token prompt and report latency, GPU power, energy for prefill and decode phase, respectively. We also report perplexity (PPL) as the accuracy benchmark of the model integrated with each kernel. For the W1.58A4 configuration, we follow the BitNet quantization-aware training (QAT) scheme and quantize activations to 4 bits during SFT. Specifically, activations are dynamically quantized using a per-token absmax scaling factor, while a straight-through estimator (STE) [30] is applied through the quantization operation during backpropagation in SFT process. Perplexities are evaluated without additional post-training quantization or calibration is applied after SFT. All methods are measured on a RTX4090 and Jetson Orin Nano, respectively. Additionally, the Jetson Orin Nano has only 8GB unified memory, which cannot hold the half-precision (BF16) BitNet1.58b-3B and the BitNet (W1.58A8), while there is no supported BitBLAS kernel on Jetson. Our method is the only configuration that can deploy the BitNet1.58b-3B model on Jetson. To compare with other baselines on Jetson, we also report a smaller model BitNet1.58-700M with reduced number of layers and vocabulary size. As shown in Table II, our method reduces 3B-model prefill latency on RTX 4090 from 41.10 to 28.94 ms (1.42×), while lowering prefill GPU power and energy relative to all evaluated baselines. Decode retains the BitNet kernel and matches its 5.73 ms latency. On Jetson Orin Nano, the 700M model achieves a 1.13× prefill speedup over BF16.
| Device | Model | Kernel | Latency (ms) ↓ | GPU Power (W) ↓ | Energy (J) ↓ | PPL↓ | |||
| Prefill | Decode | Prefill | Decode | Prefill | Decode | ||||
| RTX 4090 | BitNetb1.58-3B | BF16 | 41.10 | 11.79 | 350.44 | 268.97 | 17.12 | 2.97 | 10.04 |
| BitNet [3] | 41.14 | 5.73 | 337.86 | 215.53 | 17.55 | 1.02 | 9.91 | ||
| BitBLAS [22] | 36.34 | 11.81 | 346.59 | 264.89 | 13.21 | 3.00 | 9.97 | ||
| Ours | 28.94 (1.42×) | 5.73 (2.06×) | 274.64 | 202.18 | 9.99 | 1.04 | 10.05 | ||
| Jetson Orin Nano | BitNetb1.58-3B | BF16 | Out of Memory | ||||||
| BitNet [3] | Out of Memory | ||||||||
| BitBLAS [22] | Unsupported on Jetson platform | ||||||||
| Ours | 276.69 | 33.98 | 6.58 | 6.87 | 1.82 | 0.23 | 10.05 | ||
| BitNetb1.58-700M | BF16 | 120.52 | 18.52 | 9.33 | 7.89 | 1.12 | 0.15 | 12.33 | |
| BitNet [3] | 117.57 | 7.45 | 8.98 | 7.51 | 1.05 | 0.06 | 12.87 | ||
| BitBLAS [22] | Unsupported on Jetson platform | ||||||||
| Ours | 106.24 (1.13×) | 7.34 (2.52×) | 6.06 | 6.83 | 0.64 | 0.05 | 12.66 |
Table 2. LLM full benchmark. All methods are measured for a single round response with prompt length 512. ‘()’ shows the speedup v.s. BF16 baseline.
Ablation Study
Module Discussion: We conduct the ablation study to investigate the improvement brought by our proposed Shape-Adaptive Kernel Selection (SAKS) and Epilogue Visitor Tree fused dequantization (EVT-deq). As shown in Table III, SAKS reduces the latency from 33.59 ms to 29.35 ms, Stream-K reduces the latency from 33.59 ms to 32.13 ms, and reduce the GPU power from 324.10 W to 275.71 W. With applying EVT-fused dequantization, the latency is reduced from 33.59 ms to 31.43 ms. By integrating all these two modules, our method finally achieves the lowest latency and GPU power.
Prompt Length Discussion: As discussed in Sec. III-B, increasing would amortize weights read across more tokens and increase arithmetic intensity. Ideally, prefill will benefit from our INT4xINT4 GEMM kernel much more with increasing. We conduct such ablation study and report different settings, i.e., prompt length, for each kernel method. As shown in Figure 4, our method achieves the best performance for various from 64 to 2048.
Figure 4. Prompt Length Sweeping. Latency, GPU Power, and Energy are reported for prefill phase of BitNetb1.58-3B model running on RTX 4090. Ours method achieves the best performance over latency, GPU power, and Energy consumption.
| GEMM | SAKS | Stream-K | EVT-deq | Latency (ms)↓ | GPU Power (W) ↓ |
| ✓ | × | × | × | 33.59 | 324.10 |
| ✓ | ✓ | × | × | 29.35 | 275.71 |
| ✓ | × | ✓ | × | 32.13 | 282.82 |
| ✓ | × | × | ✓ | 31.43 | 344.00 |
| ✓ | ✓ | ✓ | ✓ | 28.94 | 274.64 |
Table 3. Module discussion. The latency and GPU power are reported for prefill phase with prompt length 512 of BitNetb1.58-3B model running on RTX 4090.
Tile-size Hit Analysis: We analyze the latency and energy consumption for different candidate tile-sizes. As shown in Figure 5, our proposed Shape-Adaptive Kernel Selection (SAKS) hits the optimal tile size for various kernel shapes.
Figure 5. Tile-size hit analysis for SAKS. Our proposed SAKS module could pick the optimal candidate tile size in various kernel shape settings.
Conclusion
We presented a W1.58A4 operator that moves the compute-bound prefill of ternary LLMs onto native INT4 tensor cores, where weight-only quantization brings no gain. Shape-adaptive kernel selection with Stream-K keeps the tensor cores occupied across prefill lengths, and an EVT-fused epilogue applies the per-token and per-channel scales in registers, removing the separate dequantization pass that limits BitBLAS at long prompts. On an RTX 4090 the operator is about 2× faster than BitBLAS and accelerates BitNet-b1.58-3B prefill by 1.42× over BF16 at 42% less energy, with similar perplexity; on a Jetson Orin Nano it is the only configuration that fits the 3B model in 8 GB.
References
- [1]S. Ma, H. Wang, S. Huang, X. Zhang, Y. Hu, T. Song, Y. Xia, and F. Wei, “BitNet b1.58 2b4t technical report,” 2025. [Online]. Available: https://arxiv.org/abs/2504.12285
- [2]J. Wang, H. Zhou, T. Song, S. Cao, Y. Xia, T. Cao, J. Wei, S. Ma, H. Wang, and F. Wei, “Bitnet.cpp: Efficient, expressive and generalizable 1-bit llms,” in Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2025, pp. 9305–9322.
- [3]S. Ma, H. Wang, L. Ma, L. Wang, W. Wang, S. Huang, L. Dong, R. Wang, J. Xue, and F. Wei, “The era of 1-bit llms: All large language models are in 1.58 bits,” 2024. [Online]. Available: https://arxiv.org/abs/2402.17764
- [4]Y. Xu, X. Han, Z. Yang, S. Wang, Q. Zhu, Z. Liu, W. Liu, and W. Che, “Onebit: Towards extremely low-bit large language models,” Advances in Neural Information Processing Systems, vol. 37, pp. 66 357–66 382, 2024.
- [5]Z. Yuan, Y. Shang, and Z. Dong, “Pb-llm: Partially binarized large language models,” in The Twelfth International Conference on Learning Representations, 2024.arxiv.org/abs/2310.00034
- [6]W. Huang, Y. Liu, H. Qin, Y. Li, S. Zhang, X. Liu, M. Magno, and X. Qi, “Billm: Pushing the limit of post-training quantization for llms,” 2024. [Online]. Available: https://arxiv.org/abs/2402.04291
- [7]H. Zhang, P. S. Yu, and J. Zhang, “A systematic survey of text summarization: From statistical methods to large language models,” ACM Computing Surveys, vol. 57, no. 11, pp. 1–41, 2025.arxiv.org/abs/2406.11289
- [9]Y. Bai, S. Tu, J. Zhang, H. Peng, X. Wang, X. Lv, S. Cao, J. Xu, L. Hou, Y. Dong et al., “Longbench v2: Towards deeper understanding and reasoning on realistic long-context multitasks,” in Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2025, pp. 3639–3664.arxiv.org/abs/2412.15204
- [11]S. Wu, H. Fei, L. Ou, W. Ji, and T.-S. Chua, “Next-gpt: Any-to-any multimodal llm,” arXiv preprint arXiv:2309.05519, 2023.arxiv.org/abs/2309.05519
- [13]R. Islam and O. M. Moushi, “Gpt-4o: The cutting-edge advancement in multimodal llm,” in Intelligent Computing-Proceedings of the Computing Conference. Springer, 2025, pp. 47–60.DOI
- [14]M. Osama, D. Merrill, C. C. Ceka, M. Garland, and J. D. Owens, “Stream-k: Work-centric parallel decomposition for dense matrix-matrix multiplication on the gpu,” in Proceedings of the 28th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming, 2023, pp. 429–431.
- [15]H. Wang, S. Ma, L. Dong, S. Huang, H. Wang, L. Ma, F. Yang, R. Wang, Y. Wu, and F. Wei, “Bitnet: Scaling 1-bit transformers for large language models,” 2023. [Online]. Available: https://arxiv.org/abs/2310.11453
- [16]A. Kaushal, T. Vaidya, A. K. Mondal, T. Pandey, A. Bhagat, and I. Rish, “Spectra: Surprising effectiveness of pretraining ternary language models at scale,” 2024. [Online]. Available: https://arxiv.org/abs/2407.12327
- [17]Z. Liu, C. Zhao, H. Huang, S. Chen, J. Zhang, J. Zhao, S. Roy, L. Jin, Y. Xiong, Y. Shi et al., “Paretoq: Improving scaling laws in extremely low-bit llm quantization,” Advances in Neural Information Processing Systems, vol. 38, pp. 91 311–91 336, 2026.arxiv.org/abs/2502.02631
- [18]H. Wang, S. Ma, and F. Wei, “Bitnet a4.8: 4-bit activations for 1-bit llms,” 2024. [Online]. Available: https://arxiv.org/abs/2411.04965
- [19]J. Wei, S. Cao, T. Cao, L. Ma, L. Wang, Y. Zhang, and M. Yang, “T-mac: Cpu renaissance via table lookup for low-bit llm deployment on edge,” in Proceedings of the Twentieth European Conference on Computer Systems, 2025, pp. 278–292.DOI
- [20]Z. Mo, L. Wang, J. Wei, Z. Zeng, S. Cao, L. Ma, N. Jing, T. Cao, J. Xue, F. Yang et al., “Lut tensor core: A software-hardware co-design for lut-based low-bit llm inference,” in Proceedings of the 52nd Annual International Symposium on Computer Architecture, 2025, pp. 514–528.DOI
- [21]V. Thakkar, P. Ramani, C. Cekca, A. Shivam, H. Lu, and E. Yan, “Cutlass.” [Online]. Available: https://github.com/NVIDIA/cutlass
- [22]L. Wang, Ma, S. Cao, Q. Zhang, J. Xue, Y. Shi, N. Zheng, Z. Miao, F. Yang, T. Cao et al., “Ladder: Enabling efficient low-precision deep learning computing through hardware-aware tensor transformation,” in 18th USENIX Symposium on Operating Systems Design and Implementation (OSDI 24), 2024, pp. 307–323.
- [23]Z. Chen, A. Kerr, R. Cai, J. Kosaian, H. Wu, Y. Ding, and Y. Xie, “Evt: Accelerating deep learning training with epilogue visitor tree,” in Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3, 2024, pp. 301–316.DOI
- [24]W.-L. Chiang, Z. Li, Z. Lin, Y. Sheng, Z. Wu, H. Zhang, L. Zheng, S. Zhuang, Y. Zhuang, J. E. Gonzalez, I. Stoica, and E. P. Xing, “Vicuna: An open-source chatbot impressing gpt-4 with 90%* chatgpt quality,” https://lmsys.org/blog/2023-03-30-vicuna/, 2023.
- [25]R. Taori, I. Gulrajani, T. Zhang, Y. Dubois, X. Li, C. Guestrin, P. Liang, and T. B. Hashimoto, “Alpaca: A strong, replicable instruction-following model,” https://crfm.stanford.edu/2023/03/13/alpaca.html, 2023.
- [26]K. Cobbe, V. Kosaraju, M. Bavarian, M. Chen, H. Jun, L. Kaiser, M. Plappert, J. Tworek, J. Hilton, R. Nakano, C. Hesse, and J. Schulman, “Training verifiers to solve math word problems,” arXiv preprint arXiv:2110.14168, 2021.arxiv.org/abs/2110.14168
- [27]Y. Bai, A. Jones, K. Ndousse, A. Askell, A. Chen, N. DasSarma, D. Drain, D. Ganguli, T. Henighan, N. Joseph, S. Kadavath et al., “Training a helpful and harmless assistant with reinforcement learning from human feedback,” arXiv preprint arXiv:2204.05862, 2022.arxiv.org/abs/2204.05862
- [28]A. Köp f, Y. Kilcher, D. von Rütte, S. Anagnostidis, Z.-R. Tam, K. Stevens, A. Barhoum, N. M. Duc, O. Stanley, R. Nagyfi et al., “Openassistant conversations—democratizing large language model alignment,” in Advances in Neural Information Processing Systems, 2023.arxiv.org/abs/2304.07327
- [29]S. Merity, C. Xiong, J. Bradbury, and R. Socher, “Pointer sentinel mixture models,” in International Conference on Learning Representations (ICLR), 2017.arxiv.org/abs/1609.07843
- [30]Y. Bengio, N. Léonard, and A. Courville, “Estimating or propagating gradients through stochastic neurons for conditional computation,” arXiv preprint arXiv:1308.3432, 2013.arxiv.org/abs/1308.3432



