GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - oney-erge/Afterimage: A research toolbox for running and studying LLMs on constrained hardware, with memory, placement, inference, and benchmarking methods.

BranchesTags
Open more actions menu

Latest commit

 

History

154 Commits
154 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.repo
.repo
 
 
afterimage
afterimage
 
 
configs
configs
 
 
docs
docs
 
 
evidence/h65-paper1
evidence/h65-paper1
 
 
results
results
 
 
scripts
scripts
 
 
tests
tests
 
 
.dockerignore
.dockerignore
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CITATION.cff
CITATION.cff
 
 
CLAUDE.md
CLAUDE.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
compose.nvidia.yaml
compose.nvidia.yaml
 
 
docker-compose.yml
docker-compose.yml
 
 
pyproject.toml
pyproject.toml
 
 
run.bat
run.bat
 
 
run.command
run.command
 
 
run.ps1
run.ps1
 
 
run.sh
run.sh
 
 
uv.lock
uv.lock
 
 

Repository files navigation

Afterimage logo

Afterimage

Run BF16 language models that are larger than your GPU, without quantizing their weights.

CI Apache-2.0 Python 3.11+

Quick start · Results · Usage · H6.5 paper · Documentation

Afterimage stores model weights losslessly and streams them through limited GPU memory. In one measured setup, it ran Qwen3-14B's 29.5 GB BF16 checkpoint on an 8 GB RTX 3080 Laptop GPU. Fixed speculative decoding took 9.150 seconds per token, versus 26.828 for AirLLM 3.2.0, on four forced greedy tokens across four prompt families. See results and reproduction for the full setup and tradeoffs. The AirLLM refresh was measured with uncommitted repository-hygiene changes; clean-tree confirmation is pending. Exact modes retain the original weights.

This is for research, evaluation, and offline generation when the original checkpoint matters more than interactive speed. A streamed model remains disk-bound, so expect seconds per token. If the model fits in GPU memory, or a quantized runtime meets your needs, an in-memory or quantized engine will usually be faster.

Quick start

git clone https://github.com/oney-erge/Afterimage.git
cd Afterimage
./run.sh       # Linux; macOS: ./run.command

On Windows, double-click run.bat, or use ./run.sh inside WSL2. The launcher sets up its managed environment, starts the server after its health check, and starts the web UI at http://127.0.0.1:8420. First run installs dependencies; later runs reuse them. Open that address in a browser; press Ctrl-C to stop.

For a first end-to-end check, open a second terminal in the checkout and run:

.venv/bin/afterimage quickstart             # Linux, macOS, WSL2

On Windows, run .venv\Scripts\afterimage.exe quickstart. This explicitly downloads the small Qwen3-0.6B model (about 2 GB including preparation), compresses it, generates text, and reports measurements for your machine. No model is downloaded until you request it. Use doctor, repair, docker, logs, or stop after the launcher name when needed. The full launcher, Docker, and pip instructions are in Usage.

Run a model

Activate the launcher's environment in a second terminal with source .venv/bin/activate (Linux/macOS/WSL2) or .venv\Scripts\Activate.ps1 (Windows PowerShell). Then compress a supported checkpoint and set the GPU-memory budget explicitly:

afterimage compress Qwen/Qwen3-14B
afterimage run Qwen/Qwen3-14B \
  "Explain why the sky appears blue in two sentences." \
  --vram-budget-gb 4 --stats

afterimage compress Qwen/Qwen3-14B --dry-run estimates download size, compressed-store size, and peak disk use before downloading. A real 14B model can take substantial time to download and prepare; the reference run took about 30 minutes to download and 6 minutes to compress, but hardware and network speed matter.

See Usage for speculative decoding, the CLI, Python API, server, model-store, and configuration reference.

Results

Qwen3-14B (29.536 GB BF16), RTX 3080 Laptop GPU (8 GB), WSL2/CUDA, cold page cache, four prompt families with four forced greedy tokens:

Peak VRAM versus seconds per token for the six configurations below

Configuration Peak VRAM Seconds/token vs AirLLM Exactness
Afterimage + fixed speculation 3.813 GB 9.150 2.93x Greedy-token exact at T=0
Hugging Face Accelerate GPU/CPU/disk 3.800 GB 14.318 1.87x Same BF16 checkpoint and token IDs
Afterimage exact + 4 GB residency 3.934 GB 17.360 1.55x Reference-execution equivalent
AirLLM 3.2.0 1.583 GB 26.828 1.00x Same BF16 checkpoint and token IDs
Afterimage chunked output head 0.901 GB 29.606 0.91x Approximate BF16 matmul
Afterimage exact minimum-memory 1.723 GB 32.514 0.83x Reference-execution equivalent

The practical reading is simple: AirLLM is faster at the exact lowest-memory point, Accelerate is faster near 4 GB without speculation, and this fixed speculative configuration is fastest in this measured suite. These are single-machine research results, not universal performance claims. The full methods, raw JSON, controls, and cross-model results are linked in Results and the evidence record.

Compatibility and limits

  • Dense Qwen, Llama, and Mistral are the release-verified model families. Qwen packed-MoE and Qwen3-VL are implemented but experimental. See supported architectures.
  • macOS is CPU-only. AMD/ROCm has not been verified on real AMD hardware, and WSL2 is the better-tested NVIDIA route than native Windows CUDA.
  • The optional --quantize q8 and --lm-head-slice-rows paths are explicitly approximate. They are not the default exact path.
  • Exact low-memory generation is slow because most weights are read or reconstructed for each target pass.

Research and documentation

Afterimage also contains an opt-in research workspace. Its current and historical candidate results live in the research record; they do not replace the stable runtime defaults.

The H6.5 work is a separate, schedule-aware placement method for large models under limited memory, with confirmatory live evidence on Llama-3.3-70B. Start with the H6.5 paper guide, which links its frozen measurements and reproduction material.

Documentation home points to setup, usage, configuration, FAQ, troubleshooting, architecture, and reproduction material. If you use the software or H6.5, cite the entries in CITATION.cff.

Apache-2.0. Built by Oney Erge.

About

A research toolbox for running and studying LLMs on constrained hardware, with memory, placement, inference, and benchmarking methods.

oneyerge.com/#project-afterimage-full-precision-llm-inference

Topics

bfloat16cudagpullm-benchmarkingllm-inferencelocal-llmlossless-compressionmodel-compressionmodel-offloadingopenai-compatible-apipytorchreproducible-researchspeculative-decodingvramweight-streaming

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.