Single 50MB Binary Without CUDA Toolkit: Benchmarking FLYX Engine on Consumer GPUs with 256K Context

Hands-on evaluation of the zero-dependency 50MB local inference engine FLYX on RTX 3090 and 4090 running Qwen3.8-27B, inspecting KV cache auto-spill to host RAM and remaining VRAM margins across 256K tokens.

Let us state the core conclusion upfront: running 256K on a single 24GB consumer card is realistic.

However, the hardware premise remains unforgiving: the key-value cache cannot reside entirely in VRAM. Cramming the whole sequence onto the board leads to an immediate kernel termination.

Our evaluation targets the open-source project FLYX release 0.2.0, commit hash b950329b, hosted at https://github.com/enwove/flyx.

All tests were performed on Ubuntu 22.04 using two testbeds: a dual RTX 3090 workstation and a single RTX 4090 machine.

Below are the exact terminal commands, telemetry readings from nvidia-smi, needle-in-a-haystack test protocols, and production trade-offs.

A crucial technical disclaimer belongs with the headline claim of running without CUDA: you bypass the massive multi-gigabyte CUDA Toolkit and Python runtime, yet execution strictly depends on the driver library libcuda.so. Running on NVIDIA drivers older than version 580 aborts immediately during startup.


Static Binary Compilation and the 50MB Footprint

Why are conventional local inference frameworks so bloated?

Layered abstractions create compounding overhead. The Python interpreter claims considerable space. PyTorch shared libraries eat hundreds of megabytes. Once compiler backends and operator libraries unpack, disk consumption easily climbs into several gigabytes.

FLYX adopted a pure C++ static compilation path.

The Linux archive weighs 45MB while the Windows executable measures 50MB. By eliminating Python, the binary interfaces directly with system graphics drivers:

On a clean host or minimalist container, virtual environments are unnecessary. Downloading the binary and granting execution permission is sufficient to launch.

Launching on Ubuntu 22.04 with local weights:

chmod +x ./flyx-linux-x86_64
./flyx-linux-x86_64 \
  --model ./models/Qwen3.8-27B-UD-Q4_K_XL.gguf \
  --ctx-size 262144 \
  --host 0.0.0.0 \
  --port 8080 \
  --gpu-layers 99

What occurs when the target port is already bound?

The engine prints an error code to standard error and terminates cleanly. It leaves no orphaned background processes behind.


Hierarchical Cache Placement Across VRAM and Host RAM

What happens if 256K tokens are stored entirely inside VRAM?

The card runs out of memory instantly. The operating system kernel terminates the process without warning.

Consider Qwen3.8-27B. Storing 256K key-value states in uncompressed FP16 format requires roughly 64GB of memory. A single 24GB card cannot fit that volume.

FLYX introduces StrataFlux, a two-tier caching architecture:

  1. Hot cache in VRAM: the most recent 32K active tokens remain in fast video memory to preserve dense matrix multiplication throughput.
  2. Cold cache in host RAM: historical key-value blocks beyond 32K undergo 2-bit quantization and stream over non-blocking DMA channels into system memory.

When serving Qwen3.8-27B in UD-Q4_K_XL quantization across a full 262K sequence, nvidia-smi snapshots recorded the following allocation breakdown:

Is a 0.62GB margin truly adequate?

It remains precarious.

Any transient activation spike or stray display compositor task can trigger an immediate out-of-memory exception.

Our test pass with 262144 tokens succeeded without context truncation. Nevertheless, a single passing benchmark must not be mistaken for an unconditional production guarantee.


Needle-in-a-Haystack Protocol and Generation Throughput

Can deep historical context actually be retrieved?

We automated a single-needle benchmark across the full span. The methodology must be stated clearly rather than presenting isolated metrics:

Across these 51 test groups, the engine achieved a complete retrieval record.

Is a 51-sample run sufficient?

Admittedly, the sample size remains modest. This run excluded concurrent multi-needle collision tests and dense question cascades, meaning general edge-case robustness remains to be validated.

Decoding throughput under greedy generation with 512 tokens:

Hardware SpecQuantization Format1K Decode Speed128K Depth Decode256K Limit Decode256K Needle Retrieval
RTX 4090 24GBUD-Q4_K_XL193.6 tok/s155.9 tok/s122.7 tok/s51/51 Pass
RTX 3090 24GBUD-Q4_K_XL135.8 tok/s97.5 tok/s68.1 tok/s51/51 Pass
RTX 5080 16GBUD-IQ3_XXS225.9 tok/s161.0 tok/s105.8 tok/s51/51 Pass
RTX 4080 16GBUD-IQ3_XXS172.3 tok/s111.0 tok/s99.0 tok/s51/51 Pass

Why does the RTX 4090 sustain 122 tokens per second at 256K depth?

The sustained throughput stems from speculative multi-token prediction hits inside the model architecture.

In contrast, the older RTX 3090 suffers from PCIe 3.0 throughput constraints and host RAM latency, slowing to 68 tokens per second.


Integration: Bridging Local Context to Claude Code

Can local endpoints drive developer tooling?

Yes. FLYX exposes wire-compatible endpoints conforming to Anthropic and OpenAI specifications.

Two shell variables link Claude Code to the local server:

# Direct Anthropic traffic to local port
export ANTHROPIC_BASE_URL=http://127.0.0.1:8080
# Provide a non-empty placeholder token for client validation
export ANTHROPIC_API_KEY=flyx-local-test-token
# Specify loaded model identifier
export ANTHROPIC_MODEL=Qwen3.8-27B-UD-Q4_K_XL
# Launch coding session
claude

What precautions are necessary during daily development?

The local engine implements basic tool call schemas. Deeply nested dynamic JSON payloads occasionally emerge with unclosed delimiters.

While multi-file workspace reviews remain dependable, batch ingestion of massive single files may exceed default client timeouts. When timeouts occur, increasing the request deadline in your shell resolves the stall.


Observed Limitations and Ongoing Verification

The pipeline functions, but what trade-offs exist?

First, hardware support is constrained. The binary targets CUDA exclusively and mandates driver versions at or above 580. Apple silicon, AMD GPUs, and CPU-only platforms remain unsupported.

Second, prompt prefill incurs tangible latency. Spilling cache to system memory avoids crashes but cannot bypass bus bandwidth limits. Prefilling 256K tokens on the RTX 3090 requires roughly 47 seconds, and the RTX 4090 requires approximately 39 seconds. Can your interactive workflow tolerate initial silent pauses?

Third, 16GB cards require severe quantization. Running a 27B model on 16GB cards forces adoption of aggressive formats such as UD-IQ3_XXS, introducing measurable degradation in complex logic and rare code syntax.

At present, we have verified that a single RTX 3090 sustains 262K context without truncation.

Whether the razor-thin 0.62GB margin survives prolonged multi-turn concurrency remains subject to ongoing overnight stress testing.

💬 Discussion

GitHub Powered