WFGY/wfgy_sdk
PSBigBig × MiniPS 9adf73869a
Some checks failed
WFGY-CI / test (push) Has been cancelled
Rename Trickster_Slime_King.png to Trickster_Slime_King.png
2026-02-06 17:28:46 +08:00
..
Adventure Rename Trickster_Slime_King.png to Trickster_Slime_King.png 2026-02-06 17:28:46 +08:00
.gitkeep Create .gitkeep 2025-06-07 20:12:57 +08:00
__init__.py Update __init__.py 2025-09-27 16:10:28 +08:00
bbam.py Update bbam.py 2025-09-27 16:10:57 +08:00
bbcr.py Update bbcr.py 2025-09-27 16:11:03 +08:00
bbmc.py Update bbmc.py 2025-09-27 16:11:17 +08:00
bbpf.py Update bbpf.py 2025-09-27 16:11:25 +08:00
cli.py Update cli.py 2025-09-27 16:11:32 +08:00
evaluator.py Update evaluator.py 2025-09-27 16:11:39 +08:00
initializer.py Update initializer.py 2025-09-27 16:11:46 +08:00
README.md Update README.md 2025-08-14 22:07:07 +08:00
reporter.py Update reporter.py 2025-09-27 16:11:51 +08:00
utils.py Update utils.py 2025-09-27 16:11:57 +08:00
visual.py Update visual.py 2025-09-27 16:12:02 +08:00
wfgy_engine.py Update wfgy_engine.py 2025-09-27 16:12:08 +08:00

WFGY SDK ─ Inside the Engine Room

A tiny, self-contained Python package that powers every variant-gate demo in the repo.

Already cloned the whole repo?
You do not need to install anything else the SDK is editable-installed by
pip install -e . at the project root.
Jump back to the top-level README.md for one-click Colab / HF Space guides.


1Quick start (stand-alone)

python -m venv wfgy_env && source wfgy_env/bin/activate
pip install wfgy-sdk           # PyPI name
python - <<'PY'
from wfgy_sdk import get_engine, evaluator
import numpy as np

engine = get_engine()          # singleton
old = np.random.randn(32000).astype(np.float32)
g   = np.random.randn(256).astype(np.float32)
i   = g + np.random.normal(scale=0.05, size=256).astype(np.float32)

new = engine.run(i, g, old)
print(evaluator.compare_logits(old, new))
PY

Output guarantees ≥ 30 % variance drop ('std_ratio' < 0.7) which is exactly what the CI checks.


2Directory tour

File Purpose
wfgy_engine.py Single source of truth the variance gate. Keep the public signature run(input_vec, ground_vec, logits) stable.
evaluator.py Metric helpers: compare_logits, plot_histogram, pretty_print.
bbam.py, bbpf.py, bbcr.py, bbmc.py Tiny stubs for the four “BigBig” sub-formulas. In v1 they forward to the core scaler; in v2 they will host real kernels.
initializer.py Central place for default hyper-parameters, RNG seeding, and future config loading.
utils.py Misc. helpers (array normalisation, safe softmax, etc.).
visual.py Matplotlib styles used by CLI / Colab.
cli.py Minimal REPL: python -m wfgy_sdk.cli.
reporter.py Prints coloured tables & JSON logs for batch runs.
tests/ Repo-local unit tests. Do not delete CI depends on them.
__init__.py Re-exports get_engine, compare_logits, package __version__.

3Public API surface

from wfgy_sdk import (
    get_engine,              # -> WFGYEngine singleton
    compare_logits,          # quick metrics
    plot_histogram,          # matplotlib.Figure
    pretty_print             # tty-friendly formatter
)

engine = get_engine()
new_logits = engine.run(I, G, old_logits)
  • I, G are 256-D float32 vectors (semantic fingerprint & anchor).
  • old_logits + return value share the same shape (vocab,).
  • No in-place mutation; function is 100 % pure.

4Coding guidelines

  1. Zero heavy deps inside the core NumPy only.

  2. Keep every public symbol documented with Google-style docstrings; tests import the docs to build the API table.

  3. Target Python ≥ 3.9. Our CI uses 3.10.

  4. A pull request must keep pytest green:

    pip install -e ."[dev]"   # adds pytest + coverage
    pytest -q
    

5Versioning & license

*Current tag: WFGY 1.0.0* commits are semantic-versioned (PEP 440). Licensed under MIT see ./LICENSE.


6Roadmap

Milestone ETA Note
Adaptive-gamma gate Aug 2025 (v2) opens after 10 k★
Multimodal vectors Sep 2025 512-D fused vision-text anchors
Training-time plugin Q4 2025 PyTorch Lightning callback

Stars fuel research one click = one photon of semantic clarity.


🧭 Explore More

Module Description Link
WFGY Core WFGY 2.0 engine is live: full symbolic reasoning architecture and math stack View →
Problem Map 1.0 Initial 16-mode diagnostic and symbolic fix framework View →
Problem Map 2.0 RAG-focused failure tree, modular fixes, and pipelines View →
Semantic Clinic Index Expanded failure catalog: prompt injection, memory bugs, logic drift View →
Semantic Blueprint Layer-based symbolic reasoning & semantic modulations View →
Benchmark vs GPT-5 Stress test GPT-5 with full WFGY reasoning suite View →
🧙‍♂️ Starter Village 🏡 New here? Lost in symbols? Click here and let the wizard guide you through Start →

👑 Early Stargazers: See the Hall of Fame
Engineers, hackers, and open source builders who supported WFGY from day one.

GitHub stars WFGY Engine 2.0 is already unlocked. Star the repo to help others discover it and unlock more on the Unlock Board.

WFGY Main   TXT OS   Blah   Blot   Bloc   Blur   Blow