Skip to main content

VaporRAM 💨

VaporRAM is a lightweight, zero-dependency inference engine written in pure C. It is specifically engineered to run google/gemma-4-E4B-it (8-billion parameter state-of-the-art model) on consumer hardware under a strict 1.5 GB RAM ceiling by streaming layers directly from NVMe SSD storage into RAM.

PyPI version Docs License RAM Ceiling CI Pipeline


Key Features

  • Extreme Hardware Accessibility: Run an 8B parameter model under a strict 1.5 GB RAM ceiling (measured peak RSS: 142.3 MB).
  • Sequential Layer Pipeline (SLP): Zero-copy unbuffered O_DIRECT NVMe SSD layer streaming with asynchronous POSIX kernel prefetching hints (POSIX_FADV_WILLNEED).
  • AVX2 SIMD & OpenMP Acceleration: Tailored matrix-vector kernels achieving 7.70x speedup over scalar loops (204,795 GFLOPS).
  • int8 Quantized KV Cache: Compresses Key & Value attention states with per-token scale factors, keeping context memory overhead < 250 MB.
  • OpenAI-Compatible API: Built-in HTTP server supporting /v1/chat/completions, /v1/responses, /v1/models, and /health.
  • Web UI & Interactive CLI: Includes an interactive terminal chat mode (vapor chat) and a web dashboard (vapor web).

Hardware & System Requirements

Resource Minimum Requirement Recommended
RAM Ceiling < 1.5 GB < 1.5 GB
Active Peak RSS 142.3 MB 142.3 MB
Storage 18 GB NVMe SSD PCIe Gen3 / Gen4 NVMe SSD
OS Linux (x86_64), WSL2 Linux (x86_64)
Build Tools gcc / clang, make, OpenMP, Python 3.8+ GCC 11+ with OpenMP & AVX2

Installation

Option 1: Install via PyPI (Recommended)

pip install vapor-ram

Option 2: Prebuilt Release

Download and extract the latest prebuilt binary tarball:

mkdir vapor-ram && cd vapor-ram
tar xzf vapor-ram-v1.0.1-linux-x86_64.tar.gz

Option 3: Build from Source

Clone the repository and compile using make:

git clone https://github.com/sudsarkar13/vapor-ram.git
cd vapor-ram
make -C c

Usage Guide

The project includes a CLI launcher called vapor (./vapor or python3 vapor).

1. System Diagnostics & Resource Planning

Run diagnostics to check system capabilities and memory budget compliance:

# Run hardware diagnostic checks
./vapor doctor

# View RAM ceiling budget breakdown (< 1.5 GB)
./vapor plan

2. Interactive Terminal Chat

Launch an interactive chat session:

./vapor chat --preset coder

3. One-Shot Prompt Generation

Execute a quick single prompt generation from the command line:

./vapor run "Explain quantum computing in simple terms."

4. OpenAI-Compatible API Server

Start an HTTP server supporting OpenAI endpoints (/v1/chat/completions):

./vapor serve --host 0.0.0.0 --port 8000

Query the API using curl:

curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemma-4-E4B-it",
    "messages": [{"role": "user", "content": "Hello! What can you do?"}]
  }'

5. Web Interface

Start the server and automatically launch the Web UI in your default browser:

./vapor web

Configuration & Preset Flags

You can customize execution using presets or flags:

Subcommand / Flag Description
./vapor config Interactive terminal configuration wizard
./vapor profile High-precision RSS memory profiler
./vapor inspect Inspect model weight files and tensor layout
./vapor bench Run AVX2 SIMD core throughput benchmark
./vapor presets List available persona presets (coder, reasoner, concise)

Project Structure

  • c/vapor_engine: Compiled C SIMD inference engine binary.
  • vapor: Main Python CLI frontend launcher.
  • doctor.py: Installation and hardware diagnostic script.
  • openai_server.py: OpenAI-compatible HTTP API server implementation.
  • resource_plan.py: Dynamic memory budget calculation planner.
  • version.py: Engine version information.
  • web/: Frontend dashboard UI static assets.
  • docs/: GitHub Pages documentation website and screenshot guides.

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vapor_ram-1.0.4.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vapor_ram-1.0.4-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file vapor_ram-1.0.4.tar.gz.

File metadata

  • Download URL: vapor_ram-1.0.4.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for vapor_ram-1.0.4.tar.gz
Algorithm Hash digest
SHA256 d2da5a4b02495fe16c510d683f6e90812bc3ef5c1eaae78ff0eaa3989ed59fae
MD5 32055b32053ac81eaaf6224bc347e653
BLAKE2b-256 2559b6c2c68df87acb4bfc1e3caad6a33df705759d44fdf3712caef944501d47

See more details on using hashes here.

File details

Details for the file vapor_ram-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: vapor_ram-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for vapor_ram-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2936647f7bde5f1b0cd9c3ab42941ac44e14678c2f66930a9e0463136debb275
MD5 46a830ba40d9669cd9ac4fc9f9dd532a
BLAKE2b-256 3e013ab2145230067c1422d2ce59dd75e7b7de12ffe1d2a29f1af76536e44ac9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page