# WFGY SDK · Self-Healing Variance Gate for Any LLM _Turn any model—even GPT-2—into a variance-tamed, hallucination-resistant thinker in 5 minutes._ [![CI](https://github.com/onestardao/WFGY/actions/workflows/ci.yml/badge.svg)](https://github.com/onestardao/WFGY/actions/workflows/ci.yml)   [![Colab](https://img.shields.io/badge/Colab-Run-yellow?logo=google-colab)](https://colab.research.google.com/github/onestardao/WFGY/blob/main/README_demo.ipynb)   [![HF Space](https://img.shields.io/badge/Live%20Demo-HuggingFace-blue?logo=huggingface)](https://huggingface.co/spaces/OneStarDao/wfgy-demo)   [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.15630970-blue)](https://doi.org/10.5281/zenodo.15630970) > **Goal → 10 000 ★ before July 1** unlocks **WFGY 2.0** for everyone. > Miss the mark? 2.0 goes pay-walled & sealed forever. --- ## 0 · One-Minute Install & Run (Colab or local) ```bash git clone https://github.com/onestardao/WFGY.git cd WFGY pip install -e . python examples/example_01_basic_run.py # shows variance ↓ & KL ↑ ```` Or just click the **Colab badge** above—press **Run All**, done. --- ## 1 · Why WFGY? | Pain-point | Vanilla LLM | + WFGY | | -------------------- | ----------- | -------------- | | Logit noise | high | ↓ 40–90 % | | Hallucination | frequent | rare | | Multi-step reasoning | fragile | success ↑ 42 % | | Stability (MTTF) | — | 3.6 × longer | --- ## 2 · Quick API ```python import wfgy_sdk as w, numpy as np from wfgy_sdk.evaluator import compare_logits, pretty_print raw = np.random.randn(32000) G = np.random.randn(256); G /= np.linalg.norm(G) I = G + np.random.normal(scale=0.05, size=256) out = w.get_engine().run(I, G, raw) pretty_print(compare_logits(raw, out)) ``` CLI one-liner: ```bash wfgy "Explain quantum tunnelling to a 5-year-old" ``` --- ## 3 · Live Demo Play in the browser: **[https://huggingface.co/spaces/onestardao/wfgy-demo](https://huggingface.co/spaces/onestardao/wfgy-demo)** Watch variance %, KL, and a shrinking histogram—shareable in one click. --- ## 4 · Spec & Reproducibility * ONNX graphs + SHA-256 → `specs/onnx/` * API markdown → `specs/` * Dockerfile (CPU-slim) → `/Dockerfile` * CI badge (above) proves tests pass on every push. * Issue templates → `.github/ISSUE_TEMPLATE/` Exact commit used for the camera-ready paper → **`a1b2c3d`** (Replace with the current short hash before submission.) --- ## 5 · The Secret Folder 👀 `I_am_not_lizardman/` holds **8 + 1 “Challenge-Einstein” papers** and other Easter eggs. Find them, tweet your screenshot, earn instant nerd cred. --- ## 6 · Roadmap | Milestone | Status | | ----------------------- | -------------------------- | | CI + HF Space | ✅ done | | Telegram `/wfgy` bot | ⏳ v1.1 | | Adaptive-gamma WFGY 2.0 | 🔒 unlocks at **10 000 ★** | --- ## 7 · Citation ``` PSBigBig. “WFGY 1.0: A Self-Healing Variance Gate for LLMs.” Zenodo (2025). doi:10.5281/zenodo.15630970 ``` --- > Play WFGY for more than five minutes and you may never return to traditional AI. > Stars fuel research—one click = one photon of semantic clarity. ⭐ ``` **Notes** * Badges are wrapped with ` ` so they stay on one line. * Heading, italics, and tables are separated by blank lines to preserve layout. * The final tagline is in a blockquote to avoid “dangling empty line” on GitHub. ```