Hibana: Fast Agentic Inference on Unified-Memory Devices

On a unified-memory device, the model and every agent's history share one memory. Hibana co-designs the model, its memory, and its decoding so many agents run fast on a single DGX Spark.

Yahya Emara1*, Chi-Chih Chang1*, Anthony Fei1, Ahmed F. AbouElhamayed1, Chong-Yan Chen2, Hung-Yueh Chiang3, Kai-Chiang Wu4, Mohamed S. Abdelfattah1

1Cornell University2University of Illinois Urbana-Champaign3Independent researcher4National Yang Ming Chiao Tung University*Equal contribution

Building Hibana · 27.9 tokens/s

STEP 1 / 8

No speculation

27.9tok/s

Each idea adds speed. Decode throughput on Qwen3.8-Flash-Next at one request on one DGX Spark, as each optimization is added. Click a step to jump to it.
4.3×
higher decoding throughput
3.1×
more agentic tasks per hour
2.1×
faster for a single user

Qwen3.8-Flash-Next on one DGX Spark, against the fastest of vLLM, llama.cpp, and TensorFold.

The idea in a minute

Local agents extend long histories, pause for tools, and run side by side. On a unified-memory device such as the DGX Spark, the weights, the active requests, and every saved history share one 128 GB pool, and every generated token streams the weights through limited bandwidth. Hibana attacks both limits at once.

Model surgery. Edit the trained model to fit the hardware: 3-bit weights, INT8 recurrent state, and a 2-bit draft head, so each token reads fewer bytes.

Unified-memory management. Keep every agent's state across turns, spilling it to the SSD when GPU memory runs out, so a returning agent resumes instead of recomputing.

Adaptive speculation. Share experts across drafted tokens and draft only as far as acceptance pays for, so each weight read yields more tokens.

Model surgery

Decoding one request is bound by memory bandwidth, so the fastest token is the one that reads the fewest bytes.

Three-bit weights

Each group of 32 weights snaps to an 8-entry FP8 codebook, so each weight is stored as a 3-bit index. The kernel looks up the codes and feeds FP8 tensor cores directly.

Bits per weight
8
Bytes vs FP8
100%

Eight values per group, three bits per weight. Codes take 3 bits and each group of 32 adds one 8-bit scale: 3 + 8/32 = 3.25 bits per weight. The codebook here is fitted to the group for illustration.

Two-bit draft head

The drafter's output head scores every token in the vocabulary and is the largest matrix the drafter reads. A 2-bit copy is cheap but noisy, so Hibana uses it only to shortlist candidates, then rescores the shortlist in FP8.

STEP 1 / 4

Head weights read
100%

Shortlist in 2 bits, decide in FP8. Context: for i in range(. The served head shortlists 16 of over 100,000 tokens and agrees with the FP8 head on 99.76% of tokens.

Unified-memory management

Agents take turns. By the time an agent returns, other agents have usually pushed its state out of GPU memory.

SSD session cache

Discard an evicted agent's state and its next turn recomputes the whole context. Hibana spills the KV cache, recurrent state, and draft state to the SSD instead, and reads them back when the agent returns.

Agents
GPU memory · 4 sessions
SSD
This turn
…
Resumed from cache
0%
Prefill work per turn
…

Spill, don't discard. Illustration with 8 agents and room for 4 in GPU memory. On Qwen3.8-Flash-Next with 192 conversations, the SSD tier lifts cache hits to 80–98% and cuts time to first token by up to 42× against the baselines.

Adaptive speculation

A drafter proposes several tokens and the target checks them in one pass. Hibana makes each of these rounds cheaper and sizes it to what will be accepted.

Expert sharing

In a mixture-of-experts layer, verifying drafted tokens loads every expert any of them picked. Hibana gives the round a shared expert budget, so it reads fewer weights.

Experts loaded
4 / 12
Expert bytes vs top-2
50%
Tokens keeping own top-2
2 / 6
Routing mass kept
…

Fewer experts per round. Toy example: 6 tokens, 12 experts, top-2 routing. Shaded columns are the experts read from memory; ↺ marks a second choice replaced by one inside the budget.

Adaptive draft length

A longer draft can yield more tokens per round, but each extra draft token costs time to draft and verify. Hibana picks the draft length that maximizes expected tokens per unit time:

d⋆= arg⁡max1≤d≤dmax E[Nd]T(d) E[Nd]= ∑j=0dqj =1−qd+11−q , T(d)=1+c(d−1)
d
draft length: tokens drafted per round
q
probability that a drafted token is accepted, tracked per request
Nd
tokens emitted per round: the accepted prefix plus the target's own next token
T(d)
round time, relative to a round with d = 1
c
added cost of one more draft token
Best length d*
5
E[N] per round
…
Speed vs no drafting
…
vs. always 8
…

Draft only as far as acceptance pays for. Idealized model. Bars show E[Nd] / T(d) for each draft length; the red bar is d*. High acceptance earns long drafts.

Results

Four models on one DGX Spark against vLLM, Flare, TensorFold, and llama.cpp.

Speed and agentic throughput

Faster for one user, and for many. Left: SPEED-Bench with 16k prompts, one point per concurrency level; up and to the right is better. Right: AgentPerf-Local agent replay. Hover a point for its numbers.

Accuracy

GPQALCBIFBenchAIME25AIME26
Exact90.787.785.3100.0100.0
+ 3-bit weights90.4−0.385.4−2.383.3−2.099.2−0.899.2−0.8
+ Expert sharing90.4−0.385.4−2.383.3−2.099.2−0.899.2−0.8
+ Relaxed verif. (fast)89.1−1.684.6−3.181.7−3.699.2−0.899.2−0.8

Within 3.6 points of the exact model. Task accuracy (%) on Qwen3.8-Flash-Next as each lossy optimization is added; small numbers are the drop from the exact model.

Quick start

Install uv, then:

# the repository opens with the paper
git clone https://github.com/sharar-project/hibana && cd hibana
uv sync
uv run hibana serve 27b          # Qwen3.8-27B on http://127.0.0.1:30001
uv run hibana serve flashnext    # Qwen3.8-Flash-Next (125B MoE)
uv run hibana launch claude      # point a coding agent at it

OpenAI- and Anthropic-compatible APIs, 262K context, one Spark or two over ConnectX. Add --exact for the model's own outputs.

BibTeX

@misc{emara2026hibana,
  title  = {Hibana: Fast Agentic Inference on Unified-Memory Devices},
  author = {Emara, Yahya and Chang, Chi-Chih and Fei, Anthony and
            AbouElhamayed, Ahmed F. and Chen, Chong-Yan and Chiang, Hung-Yueh and
            Wu, Kai-Chiang and Abdelfattah, Mohamed S.},
  year   = {2026},
  note   = {Preprint}
}