AI

openset-llm on Linux: Run a 27B Model on CPU in 8 GB RAM

Most guides to running a big model on a small box assume a general engine. openset-llm assumes the opposite. It is one 27B ternary model, a handful of hand-written CPU kernels and a llama.cpp fork that serves an OpenAI-compatible API. Its README claims 17 to 20 tokens per second on an AVX-512 server CPU in under 8 GB of RAM. We installed it on two 8 GB Linux VMs, one with AVX-512 and one with AVX2 only, and measured what you actually get on a plain cloud machine.

Original content from computingforgeeks.com - post 203709

The short version: the memory claim holds, the install is clean, the OpenAI API works the first time, and the speed claims did not reproduce on our hardware. The behavior described here was checked against the current release, v0.3.6, in December 2026, and every figure below carries that version and the lab date, 2026-12-04.

What openset-llm is and what it is not

openset-llm is a single-purpose bundle: a pinned build of PrismML’s llama.cpp fork, custom ternary kernels, and one model file (Ternary-Bonsai-2-27B-PTQ1_0, 5.95 GB) with a multi-token-prediction head grafted on for speculative decoding. It isn’t a general inference engine, and that single fact answers most of the questions people search for. Three answers sit at the top of everything else here:

  • What it is: one model on a llama.cpp fork, served by llama-server, so the HTTP surface is the one you already know from llama.cpp.
  • How fast it ran (v0.3.6, 2026-12-04): 7.1 tokens per second median on the Ice Lake VM with speculation off, 8.9 with it on, and 2.6 to 3.6 on the AVX2-only EPYC VM.
  • How to call it: plain /v1/chat/completions on port 8080, so the stock OpenAI Python client works with a changed base URL.

We’ll explain the mechanism behind each of those, because the reasons matter more than the numbers: they tell you which of your machines will behave like ours. The project lives at github.com/opensetlabs/openset-llm under an MIT licence, and the release we tested is on its releases page.

How the install works on Linux

The installer is a shell script that needs glibc 2.35 or newer, plus curl, tar and Python 3. Our labs ran Ubuntu 24.04 (glibc 2.39), so that floor wasn’t an issue. Run it as a normal user, because everything lands under ~/.local/share/openset-llm and nothing needs root:

curl -fsSL https://raw.githubusercontent.com/opensetlabs/openset-llm/main/get.sh | bash

The script downloads the engine archive, then pulls the model (5.95 GB, which is 5.67 GiB), then grafts the multi-token-prediction head from a separate Q4_0 file onto it. The graft is why you end up with a 5.8 GiB file on disk holding 851 base tensors plus 15 grafted ones. The whole thing took 2 minutes 36 seconds on node-a and 2 minutes 22 seconds on node-b, both on a fast GCP link.

Terminal output of the openset-llm get.sh installer downloading the engine and model on Ubuntu 24.04

Before you load anything, ask the tool what it thinks of your CPU. openset-llm check reads the CPU flags and picks a kernel path, and this is the step that decides how fast everything afterwards will be. The installer puts the command in ~/.local/bin, which may not be on your PATH yet, so add it for the session with export PATH=$HOME/.local/bin:$PATH. On the Ice Lake-class VM it reports the full AVX-512 VNNI and VBMI path:

openset-llm check on an Intel Xeon reporting the AVX-512 VNNI and VBMI full fast path with 7932 MiB RAM

On the AMD EPYC 7B13 VM the same command falls back to the 256-bit kernels and tells you so, including a rough 0.7x figure for plain decoding against the AVX-512 path. The vendor measured that ratio on an Ice Lake server with AVX-512 switched off, which matters, as the results section shows.

openset-llm check on an AMD EPYC 7B13 reporting the AVX2 256-bit kernel path

Both VMs showed 7932 MiB of RAM and no swap, so what follows is a fair picture of an 8 GB machine, not a 16 GB one with a limit set.

Why a 27B model fits in 8 GB, and where the room runs out

Memory is the part that holds up, because the weights are ternary, so 27 billion parameters come to a 5.95 GB file, under 2 bits per weight. The server runs with a 4096-token context, and the process arguments show --cache-ram 0, so it keeps no prompt cache beyond the live one. What you pay is anonymous memory, and that is what we measured. With default speculation the server’s RssAnon was 6.99 GiB at idle and the systemd cgroup peaked at 7.2 GB, which lines up with the README’s own 6.99 GiB figure.

The catch is the headroom that is left. With speculation on, the draft head and its extra buffers take about 0.8 GiB more than the --no-spec process, and MemAvailable on a freshly started 8 GB VM sat at 0.13 GiB. You’ve got no slack for anything else, and that’s the number to watch. The AVX2-only node-b ran with speculation off by default, so it kept about 1.2 GiB free through the same 4k prompt:

Setup (v0.3.6, 2026-12-04)Idle RssAnonIdle MemAvailableRssAnon after 4k promptMemAvailable after 4k prompt4k prompt result
node-a, default (speculation on)6.99 GiB0.13 GiB7.21 GiB0.03 GiBone OOM kill, one rerun at 0.91 tok/s
node-a, --no-spec6.16 GiB0.90 GiB6.20 GiB0.85 GiBfinished, 133.9 s at 6.97 tok/s
node-b, default (speculation off on AVX2)5.84 GiB1.24 GiB5.89 GiB1.20 GiBfinished, 401.3 s at 2.81 tok/s

The default mode did not survive a 2858-token prompt cleanly. On our first attempt the kernel’s OOM killer took out llama-server (dmesg shows an anon-rss of 7437948 kB, about 7.1 GiB) and the client got a connection error. On the rerun the process lived, but only just: MemAvailable fell to 27 MB and decode dropped to 0.91 tokens per second, against 6.97 with --no-spec on the same prompt. The README turns speculation off by itself only when the configured context is above 4096 on machines under 12 GB, and we ran at the default 4096, so that guard never fired. It’s the reason we recommend --no-spec on a strict 8 GB box. The screenshot below shows the memory lines for the default run next to the OOM entry.

Memory lines for the default openset-llm run on an 8 GB VM with 0.13 GiB available and a kernel OOM kill after a 4k prompt

With --no-spec the same VM kept about 0.9 GiB free through the whole run, including the 4k prompt. So the 8 GB claim is true in the sense that matters for planning: the model loads and answers. It’s only fully safe with speculation off.

openset-llm started with --no-spec keeping 0.9 GiB free and finishing a 2858-token prompt at 6.97 tokens per second

We reran the whole comparison once more at four threads on the four-core, eight-thread VM. Dropping from 8 threads to 4 cost only about 9 percent (vendor-prompt median 6.46 against 7.13), which suggests the decode loop is bound by memory bandwidth, not by core count.

What speed you can expect, measured against the README

Three separate numbers circulate for this project, and they measure different things, so keep them apart. The README’s llama-bench figure for AVX2 is 6.1 to 7.7 tokens per second, and llama-bench times raw token generation in isolation. The README’s ./serve plain-decode figure is 5.8 to 7.2 for AVX2 and 17 to 20 for AVX-512 VNNI, which includes the server path. Our own numbers come from the project’s bench/quick.sh and from timed requests to the running server, and they are the third set:

Setup (v0.3.6, 2026-12-04)Decode tok/sPrompt tok/sREADME figure
node-a Ice Lake, ./serve default, quick.sh5.11 (3.81 to 7.04)22.717 to 20
node-a, default, vendor prompts, median of 68.94 (6.99 to 10.04)n/a17 to 20
node-a, --no-spec, quick.sh6.94 (6.85 to 7.02)24.210.01 (README, no-spec)
node-a, --no-spec, vendor prompts, median7.13n/an/a
node-b EPYC 7B13, default (speculation off), quick.sh2.81 (2.79 to 3.05)7.85.8 to 7.2

On the Ice Lake VM, speculation helps short answers (the six vendor prompts median 8.94 against 7.13 without it) but hurts the quick.sh average (5.11 against 6.94). Only 67 percent of drafts were accepted, and a rejected draft is wasted work on a CPU with no spare cycles. The AVX-512 headline of 17 to 20 tokens per second is also more than double the best number we saw. A cloud VM’s vCPU is a shared hyperthread on a noisy host, so a bare-metal Ice Lake or Sapphire Rapids box may do better, but we can only report what this one did.

bench/quick.sh result table on the AVX-512 VM comparing ./serve and ./serve --no-spec decode and prompt speeds

The AVX2 row is the larger gap. The README’s AVX2 numbers came from Ice Lake servers with AVX-512 disabled, and the EPYC 7B13 we used is a different microarchitecture with different memory behaviour. It decoded at 4.18, 2.94 and 3.61 tokens per second on three short prompts, and the 2858-token prompt took 401 seconds to read at 7.87 tokens per second. If your only machine is an AVX2 laptop or a Zen server, plan for about 3 tokens per second and slow prompt reading, not 6.

openset-llm benchmark on an AMD EPYC 7B13 AVX2 VM showing 2.94 to 4.18 tokens per second decode

Prompt reading deserves its own warning, because it is the cost people forget. At 22 to 24 tokens per second on the AVX-512 VM, a 3k-token document takes two minutes before the first output token appears. At 7.8 on AVX2, it takes more than six. Short chat turns are fine; long-document summarising is where this setup stops being pleasant.

How to call openset-llm through the OpenAI API

Because the server is llama-server underneath, the OpenAI-compatible route works with no adapter. Start it in the background with the web UI turned off (the systemd section below makes this permanent), then send a chat completion with curl. Run this first:

cd ~/.local/share/openset-llm && nohup ./serve --no-webui --port 8080 > ~/serve.log 2>&1 &

Wait for the health endpoint to answer, since the model needs a minute or so to page in. The model name in the request is a label, and any string is accepted:

curl -s http://127.0.0.1:8080/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"openset-llm","messages":[{"role":"user","content":"In one sentence, what is a CPU cache miss?"}],"max_tokens":64,"temperature":0}'

The curl call took about 6 seconds end to end. Its JSON carries a timings block, where our rates come from: 8.8 tokens per second decode and 8.65 prompt tokens per second for a 23-token prompt. The system_fingerprint names the fork build (b10777-e3de71522).

curl request to the openset-llm chat completions endpoint returning a JSON reply with timings

The official Python client needs only a changed base URL and a dummy key. Install it into a virtual environment so it stays out of the system Python:

python3 -m venv ~/oc && ~/oc/bin/pip install -q openai

Save this as ~/client.py. It is the exact file we ran:

vim ~/client.py

Add the following content, then run it with ~/oc/bin/python ~/client.py:

from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:8080/v1", api_key="unused")
print(client.chat.completions.create(model="openset-llm",
      messages=[{"role": "user", "content": "In one sentence, what is a CPU cache miss?"}]).choices[0].message.content)

The client prints a one-sentence answer, which confirms the full request path works end to end:

Python OpenAI client printing a one sentence answer from the local openset-llm server

If you’ve used this pattern with another local runtime, nothing new happens here. We covered the shared mechanics in LocalAI’s OpenAI-compatible API, and the trade-offs between runtimes are in Ollama vs vLLM vs llama.cpp.

How to keep it running with a systemd user service

A user unit is the right fit because the whole install lives in your home directory. Create the directory first, and replace /home/gedion with your own home path in the unit that follows:

mkdir -p ~/.config/systemd/user

Open the unit file in your editor:

vim ~/.config/systemd/user/openset-llm.service

Add this configuration, which is the unit we ran. It binds to loopback only, so nothing is exposed to the network:

[Unit]
Description=openset-llm local OpenAI-compatible server
After=network.target

[Service]
Type=simple
WorkingDirectory=/home/gedion/.local/share/openset-llm
ExecStart=/home/gedion/.local/share/openset-llm/serve --no-webui --host 127.0.0.1 --port 8080
Restart=on-failure
RestartSec=5

[Install]
WantedBy=default.target

Linger keeps a user service alive after you log out, and without it the server dies with your SSH session. Enable linger, reload the manager and start the service:

sudo loginctl enable-linger $USER
systemctl --user daemon-reload
systemctl --user enable --now openset-llm

Once it is up, the service shows active, 7.1 GB of memory with a 7.2 GB peak, and the health endpoint answers. That memory line is the default-speculation mode again, which is why we would add --no-spec to the ExecStart line on an 8 GB machine. We tested the unit as written above, and ran the --no-spec comparisons as foreground ./serve --no-spec processes.

systemctl --user status openset-llm showing active running with 7.1G memory and a health check returning status ok

Expect a minute or two on first start while the 5.8 GiB file is paged in, so the unit can read active before the health endpoint answers.

Why mainline llama.cpp and Ollama refuse the model file

People ask whether the same file loads in tools they already run. It doesn’t, and the reason is mechanical. The ternary tensors use a custom ggml type number, 143, which only the fork knows. Mainline llama.cpp (built from the default branch on 2026-12-04, build ID not recorded) rejects the file at load time, and Ollama refuses it while importing the GGUF:

llama.cpp failing with invalid ggml type 143 and Ollama failing with unsupported tensor output.weight on the openset model file

The mainline error is tensor 'output.weight' has invalid ggml type 143. should be in [0, 44), and Ollama 0.40.21 ends with unsupported tensor "output.weight" size overflows. So the usual escape hatch of pointing a Modelfile at the GGUF is closed. If you already run Ollama, our walkthrough of a similar small-model setup in Inkling 2 Mini on Ollama shows the path that does work there.

We ran two follow-up experiments on 2026-12-04 against v0.3.6’s model file. The unmodified PrismML fork (commit e3de715) does load the file, but at -c 2048 with no tuning it decoded at 1.00 tokens per second and read prompts at about 1.1. The fork alone isn’t the product: the kernels and flags that openset-llm ships are where the 7 tokens per second come from. Mainline llama.cpp on its own 7.63 GB (7,626,008,928 bytes) Q2_0 file of the same model never produced a completion in 280 seconds, because the file is larger than the RAM that is left after the OS and the machine pages from disk at 86 to 90 percent iowait.

Where this breaks down

Our mental model is that openset-llm trades generality for fit. It’s a good answer to “I have one 8 GB Linux machine and want a 27B-class model behind an OpenAI endpoint”, and a poor answer to almost everything else. It doesn’t run other models, mainline tooling can’t load its file, and long prompts are slow because prompt reading is a fraction of decode speed on CPU.

Three misconceptions are worth dropping, in order:

  1. “8 GB is enough”: that’s true for loading and false for headroom. With default speculation you’ve got 0.13 GiB free, and a 4k prompt either got the process killed or crawled at 0.91 tokens per second, so run --no-spec or add RAM.
  2. “AVX2 is only 0.7x slower”: that depends on whose AVX2. Our EPYC VM ran at roughly 2.8 tokens per second where the README’s AVX2 figure is 5.8 to 7.2.
  3. “17 to 20 tokens per second”: that’s a ceiling for a specific machine class, not a promise. Our Ice Lake VM reached 8.9 on the friendliest prompts and 5.1 on a mixed set.

Treat the README numbers as an upper bound for that CPU class and the figures here as what a stock cloud VM does.

If speed is what you care about, the cheaper fix is hardware, not tuning: more memory bandwidth and 16 GB of RAM change this picture more than any flag. Our picks for small boxes that can host models like this are in the best mini PCs for a homelab, with current street prices tracked on the mini PC price page. The model weights are published on Hugging Face if you want to read the model card yourself.

Keep reading

Run Amazon Ergo Locally: Hardware Requirements and vLLM Setup AI Run Amazon Ergo Locally: Hardware Requirements and vLLM Setup Open Source LLM Comparison Table (2026) AI Open Source LLM Comparison Table (2026) Ollama Models Cheat Sheet: Best Models by VRAM, Tested (PDF) AI Ollama Models Cheat Sheet: Best Models by VRAM, Tested (PDF) ARTEX AI Penetration Testing: Self-Hosted Install Guide AI ARTEX AI Penetration Testing: Self-Hosted Install Guide Best Prebuilt PC for Local AI: RTX 5070 Ti to 5090 by VRAM AI Best Prebuilt PC for Local AI: RTX 5070 Ti to 5090 by VRAM Set Up Claude Code in GitHub Actions for Infrastructure Review AI Set Up Claude Code in GitHub Actions for Infrastructure Review

Leave a Comment

Press ESC to close