# Keeping the most-used experts on the graphics card

- [Project](https://deepnile.org/)
- [The Lab](https://deepnile.org/lab/)
- [Memory and the graphics card](https://deepnile.org/lab/?topic=memory)

Kept Tried 4 times · 5 Nov 2026 to 5 Nov 2026 · Qwen3.6-35B-A3B

On one computer we keep the experts the model calls most on the graphics card, and the processor works out the others at the same time. Answers came 22% faster than with llama.cpp as it comes, 47.2 tokens (pieces of words) a second where it gave 38.2 and 39.0 in the same session.

39.0 → 47.2

tokens a second on one computer, llama.cpp as it comes (its faster run) against our manager at its best, in the same session

*Measured*

## The idea

Qwen3.6-35B-A3B is made of experts. Each of its 40 layers holds 256 of them, and each token uses only 8, so most of the model sits idle at any moment. A home graphics card is fast and small, and this model doesn't fit on one. llama.cpp as it comes puts the experts of whole layers on the processor and keeps the rest on the card.

So we wrote a manager inside llama.cpp that picks experts one by one instead of whole layers. It seats the most-called experts of every layer on the card, and the processor computes the rest from the computer's memory. Every 32 tokens it looks at what was called lately and changes the seats. Nothing is skipped or approximated. An expert that isn't on the card is still computed, only somewhere slower.

The part of the protocol it belongs to

[Parts and loading, in the docs](https://docs.deepnile.org/protocol/parts/)

### Why we tried it

We logged which experts each token called and gave the log to a simulator. With whole layers on the card, the card does a quarter of the experts' work. Choosing experts one by one, the same card memory would do 57 to 60% of it.

25% → 57-60%

share of the experts' work on the graphics card, whole layers against experts chosen one by one, worked out by our simulator

*Simulated*

## What we predicted, and what happened

Each prediction below was written into our register before its run, and has not been edited since.

First try

5 Nov 2026

The manager, built into llama.cpp. The most-called experts of every layer sit on the card, the processor computes the rest, and the two results are added. We tried seats that follow the calls, a fixed set, and seats learned from nothing.

We predicted

Before this try the simulator said 45 to 46 tokens a second with a fixed set, and 47 to 48.5 with seats that follow the calls. It put llama.cpp as it comes at 37.6.

What happened

41.3 tokens a second with seats that follow the calls and 41.8 with a fixed set, against 34.7 for llama.cpp as it comes in the same session. That is 20% faster, and short of the forecast. Seats learned from nothing gave 35.2. The card now did 67.6% of the experts' work, where it had done 25%.

- Against the prediction

Second try

5 Nov 2026

The card and the processor working at the same time. As soon as a layer knows which experts it needs, a helper on the processor starts on its share while the card computes the seated ones. Before, they took turns.

We predicted

The simulator's forecast from before the first try still stood, 47 to 48.5 tokens a second with seats that follow the calls.

What happened

44.6 tokens a second, short of the forecast, against 40.2 when the card and the processor took turns and 38.2 and 39.0 for llama.cpp as it comes. Only with the helper on 5 threads did it reach the forecast, at 47.2. The numbers the model computed came out identical to the manager's before the change.

- Held in part

Third try

5 Nov 2026

Copying experts to the card before they're needed. The next layer's router, the part that picks its experts, runs early on this layer's input and guesses which ones it will call. Those are copied to the card in advance.

We predicted

The simulator said 55 to 57 tokens a second, with the card doing 81 to 83% of the experts' work.

What happened

The guesses were good. About 90% of the copied experts were then called, and the card's share rose to 78.3%. Answers still got slower, 44.2 tokens a second with one copy a layer, 43.7 and 41.8 with two and three, against 44.3 to 46.8 without copying.

- Against the prediction

Fourth try

5 Nov 2026

A model bigger than the computer's memory. We limited the memory left for the experts, kept the most recently used ones in a fixed space in memory, and read the others from the drive. We also tried reading experts ahead into that space from the router's guess.

We predicted

The simulator said that with a model far bigger than the memory, the size of that space would decide the speed, and reading ahead from the router's guess would add 7 to 18%.

What happened

With 12 GB for the experts, about 65% of them, the manager answered at 33.4 tokens a second. llama.cpp as it comes gave 32.1 with all the memory free. With about the same memory it gave 14.7, 2.3 times slower, but its runs moved a lot here (at 8 GB it gave 19.1 in one run and 28.1 in another). In a fairer race the next day, with the same free memory for both, the manager was about 12% faster at 10.5 GB (21.0 and 22.6 tokens a second against 18.1 and 20.7). Reading ahead gave nothing at 8 GB (17.8 with it, 17.6 without) and hurt at 4 GB (8.2 against 9.6).

- Against the prediction

**More figures**

In the next two days, 6 and 7 Nov 2026, some rules sounded right and were wrong. Keeping the experts called most (the first also read experts ahead) lost to letting the one unused for longest leave. With 10.5 GB of memory free it gave 12.0 and 14.2 tokens a second against 21.0 and 22.6, because a freshly read expert scored low and left at once, and was missed when it was called again a few tokens later. On Qwen3.5-122B-A10B the same rule halved the speed (1.29 and 1.31 against 2.49 and 2.45). Reading the question through that space pushed the answer's experts out and cut answering speed by 33%. Streaming the question's experts to the card through three small buffers fixed it. A 222-token question and a 128-token answer then took 10.7 seconds with 10.5 GB free, where llama.cpp took 37.9.

## Why it worked

The card's memory went where the work is. Each token calls 8 experts of 256 in a layer, and the next token calls the same one again in 31 to 38% of cases. A card holding the busiest experts of every layer does far more of the work than one holding whole layers, 67.6% of it against 25%. Then the card and the processor stopped taking turns.

The model's sums stay its own. Against a reference worked out wholly on the processor, the manager moved the numbers as much as llama.cpp does when it puts the first layers on the card, and both picked the same top token in 98.43% of places. The small difference comes from how the card rounds. Copying experts ahead was the part that failed. The copies came from ordinary memory, which the card's driver passes through the processor, and they slowed everything else more than they saved.

25% → 67.6%

share of the experts' work on the graphics card, llama.cpp as it comes against our manager, measured

*Measured*

## What is left to do

- The processor is now the slower half. Even with both working at once, the card waits for it about 80 to 100 microseconds in every layer.
- Copying experts ahead could still pay if they sat in memory the card can read by itself (pinned memory). We haven't tried that yet. Pinning a large space of memory for the card failed on our computer at 8.5 GB and above.

## How it was measured

**The model**

Qwen3.6-35B-A3B (the UD-Q4_K_XL file), with 40 layers of 256 experts and 8 used for each token. One home computer with one graphics card.

**The questions**

In the first three tries, one prompt and a 256-token answer, every setting in the same session. In the fourth, a 454-token prompt and a 96-token answer.

**The number**

Tokens a second while the answer is written. Also the share of the experts' work done on the card, and how closely the numbers match a reference worked out wholly on the processor.

**The runs**

Every setting beside llama.cpp as it comes, in the same session. In the fourth try a helper program held memory back on purpose, to copy a computer that has less of it. It left llama.cpp about 2.5 GB more than the target, so llama.cpp's figures there are on the generous side.

## Think we missed something?

[Discuss this idea in the Community](https://community.deepnile.org/new-topic?title=Keeping%20the%20most-used%20experts%20on%20the%20graphics%20card&body=https%3A%2F%2Fdeepnile.org%2Flab%2Fmost-used-experts-on-the-graphics-card%2F%0A%0A&category=lab)

The button opens a new topic in the Community's Lab category, with this idea's name and this page's address already filled in. Nothing is posted until you post it.

- [Back to the Lab](https://deepnile.org/lab/)

---

DeepNile is published by MT THEMES LTD, a company registered in England and Wales, number 17281540.

© 2026 MT THEMES LTD. Text and figures under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/); the DeepNile name and mark are not.

Contact: hello@deepnile.org · security@deepnile.org · support@deepnile.com · network@deepnile.net
