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:
- Runtime link: the host environment only needs to supply
libcuda.so.1 - Execution dispatch: embedded operator dispatch kernels target Ada and Ampere architectures
- Weight ingestion: unified parsers map safetensors and GGUF formats directly into memory
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:
- Hot cache in VRAM: the most recent 32K active tokens remain in fast video memory to preserve dense matrix multiplication throughput.
- 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:
- Model weights: 17.24GB VRAM
- 32K hot KV cache: 6.14GB VRAM
- Remaining safety margin: 0.62GB VRAM
- Spilled cold cache: 6.94GB host system memory
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:
- Evaluation set: 51 test groups distributed from 5% to 95% depth
- Needle mechanism: each test inserts a unique UUID token sequence
- Sampling parameters: fixed prompt template, greedy decoding at
temperature=0,max_tokens=32 - Success criteria: the generated string must contain an exact substring match for the target UUID
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 Spec | Quantization Format | 1K Decode Speed | 128K Depth Decode | 256K Limit Decode | 256K Needle Retrieval |
|---|---|---|---|---|---|
| RTX 4090 24GB | UD-Q4_K_XL | 193.6 tok/s | 155.9 tok/s | 122.7 tok/s | 51/51 Pass |
| RTX 3090 24GB | UD-Q4_K_XL | 135.8 tok/s | 97.5 tok/s | 68.1 tok/s | 51/51 Pass |
| RTX 5080 16GB | UD-IQ3_XXS | 225.9 tok/s | 161.0 tok/s | 105.8 tok/s | 51/51 Pass |
| RTX 4080 16GB | UD-IQ3_XXS | 172.3 tok/s | 111.0 tok/s | 99.0 tok/s | 51/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.