EigenCore
A CPU-first Python runtime for local language models, hardware-aware inference, and agent building blocks.
EigenCore profiles a machine, estimates whether a local model fits, and runs inference through llama-cpp-python (llama.cpp). It also ships a benchmark harness, a terminal chat, and agent building blocks with a tool policy layer. The transformer math is llama.cpp's; EigenCore owns the judgement around it.
Reality check: a dense 30–40B model at 4-bit is roughly 18–24 GB of weights, more than 8–16 GB of RAM before any KV cache. It can only run by paging from SSD, and decode is then expected to be well under 1 token/s (estimate). Even when a model fits, CPU decode is memory-bandwidth-bound: tok/s ≤ bandwidth ÷ weight bytes. The realistic route to 30B-class models on a 16 GB laptop is a Mixture-of-Experts model, which is planned and not yet measured. See the review for the arithmetic. No speed figure in this repository is a measurement until a named-hardware run is published.
Quick start
Install from PyPI:
# core CLI (no compiler needed):
python -m pip install eigencore
# + the native inference backend (llama.cpp has no Windows wheel on PyPI,
# so use the prebuilt index; on GPU machines use the CUDA index instead):
python -m pip install "eigencore[inference]" --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
# pipx alternative: pipx install "eigencore[inference]"
# from source (development): git clone ... && python -m pip install -e ".[dev,inference]"
eigencore profile
eigencore models
eigencore download tinyllama-1.1b
eigencore run --prompt "Explain binary search in one paragraph"
eigencore chat # add --plain for scripts or minimal terminals
Use eigencore --help for every command. llama-cpp-python may need a backend-specific install; see its documentation before assuming GPU acceleration (EigenCore currently loads models CPU-only).
Status
Labels: SHIPPED runs on main and is tested · REPORTED-ONLY computes plans or numbers that never reach llama.cpp · PLANNED design docs only.
| Area | Status | Notes |
|---|---|---|
| Inference through llama-cpp-python | SHIPPED | engine/inference.py; CPU-only (n_gpu_layers=0) |
| Hardware profile | SHIPPED | ISA, RAM, bandwidth probe (reads low). GiB/GB mix fixed; 25% of usable RAM reserved for KV so recommended context no longer pins at 2048 under ~38 GB |
| Model-fit estimator | SHIPPED | Weights (real GGUF file size when downloaded) + reserve + KV from architecture-aware GGUF geometry + margin; GiB end to end. Without geometry the verdict is UNKNOWN — no heuristic. CLI passes real GGUF metadata when the model file exists |
| Benchmark harness | SHIPPED | eigencore benchmark --report run.json; tokens counted via backend tokenizer, cold/warm reported separately; no published runs yet |
| Terminal chat | SHIPPED | Streaming, --plain/NO_COLOR/TERM=dumb auto-detection, width-tiered header, slash commands incl. /approvals, sanitized output, safe Ctrl-C. First-run onboarding (fit-grouped model picker + SSD-paging warning, runs once via config) SHIPPED. Full-screen takeover deliberately not done (line mode per TUI.md) |
| Tool policy | SHIPPED, deny-by-default | ToolExecutor defaults to default_policy() (READ-only, workspace-confined) even when no policy is passed. Path params are declared (is_path=True) and resolved to confined absolute paths before handlers. Timeouts run handlers in a spawned process that is killed on timeout. Handlers still run in-process otherwise — not an OS sandbox |
| Tool policy | SHIPPED, deny-by-default | Same as above, plus POSIX rlimits on the child worker and approval cards (ApprovalManager + /approvals in chat; y/s/n with redacted args, enforced in the executor). Full OS sandbox (cgroups/namespaces) PLANNED |
| Reference kernels | SHIPPED (scalar, NumPy) | RMSNorm, Q8_0/Q4_0 (ggml layout, bit-exact vs gguf-py) and Q4_K super-blocks (bit-exact), Q8_0/Q4_K dots. Not used by inference; SIMD/C-intrinsics lib PLANNED (Stage E) |
| Layer skipping | REPORTED-ONLY | Planner and estimates only |
| Layer pruning (ShortGPT BI) | REPORTED-ONLY (experiment scaffolding) | engine/pruning.py: BI scores, head/tail-protected prune plan, kill criterion on quality delta. Not wired into inference; needs owner calibration + perplexity runs |
| Activation sparsity | REPORTED-ONLY | Predictor never receives activations; eigencore analyze measures output-logit sparsity, not neurons |
| Activation-sparsity experiment | REPORTED-ONLY (scaffolding) | engine/sparsity_experiment.py: mask plan + kill criterion. Dense-model sparsity is a poor near-term bet on bandwidth-bound CPUs (per review); MoE-native routing is the real path |
| Speculative decoding | REPORTED-ONLY | Module not wired into generation; verifier now implements correct rejection sampling (distribution-preserving, tested) but no speedup is measured or claimed |
| MoE-aware fit + SSD-paging warning + decode ceiling on active weights | SHIPPED | qwen3-30b-a3b registered; estimate_fit reports active/resident/ceiling |
| KV cache type (`--kv fp16 | q8_0) + flash attention (--no-flash) on run/chat` |
SHIPPED |
GPU/VRAM detection + layer offload (--gpu-layers, auto-recommend on GPU machines) |
SHIPPED | nvidia-smi VRAM probe (safe when absent); gpu_layers_for_vram fits layers after reserve+KV; n_gpu_layers wired into llama.cpp. Prompt-lookup decoding PLANNED |
Prompt-lookup decoding (--pld, default OFF) |
SHIPPED (flag) | Copies prompt-verbatim spans and swallows covered backend tokens; copied chars counted. Default stays OFF until owner benchmark §9 item 9 |
| SIMD / native kernels | PLANNED | Research track; decode is bandwidth-bound |
| Training (LoRA/QLoRA) | Code present, not evaluated | Optional [train] extra |
Architecture
flowchart LR
U[User] --> CLI[Click CLI]
U --> API[Forge Python API]
CLI --> HAL[Hardware profile and model registry]
API --> HAL
HAL --> ROUTE[Task and model routing]
ROUTE --> CTX[Context manager]
CTX --> ENGINE[InferenceEngine]
ENGINE --> BACKEND[llama-cpp-python backend]
API --> AGENT[ReAct agent]
AGENT --> REG[Tool registry]
REG --> EXEC[ToolExecutor]
EXEC -. handlers run in process today .-> HOST[Python process]
TRAIN[Optional training components] --> ADAPTER[LoRA adapter output]
HAL -. proposed: verified fit estimates .-> UX[Future adaptive TUI]
This is a module map, not a process-isolation diagram. In particular, the current executor’s validation and timeout are not an OS sandbox or an approval workflow.
Development
python -m pip install -e ".[dev,inference]"
pytest tests/ -v
ruff check src/ tests/
ruff format --check src/ tests/
See CONTRIBUTING.md. Report security issues privately as described in SECURITY.md. This project follows a code of conduct.
Documentation
- Review and plan (2026-11): truth audit, 30–40B arithmetic, prioritized plan, benchmarks to run.
- Design handbook: v2 identity, palette, terminal UI, approval flow.
- Terminal UI status and v2 screens.
- Brand assets.
- System architecture and local inference roadmap.
- Terminal chat design.
- Documentation index.
- Changelog.
Project status
Pre-alpha. APIs and behaviour may change. Feature presence is not a performance claim.
License
MIT © 2026 Khubaib Nazeer.
Metadata
Release files for eigencore 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eigencore-0.4.3.tar.gz | 735.8 kB | With provenance | Details for eigencore-0.4.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eigencore-0.4.3-py3-none-any.whl | Python 3 | none | any | Details for eigencore-0.4.3-py3-none-any.whl |
Total release size: 841.4 kB
Release files / eigencore-0.4.3.tar.gz
| Download URL | eigencore-0.4.3.tar.gz |
|---|---|
| Size | 735.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1d8d6ad5853763b4dc46b2188b1e1beb67c3f680dabd80c09d3640b1d3708e9
|
|
BLAKE2b-256 checksum How to use checksums |
f398a283ce56b5b3c3188bd5d209f322144d29310b3604b5953f4eefae07b22e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / eigencore-0.4.3-py3-none-any.whl
| Download URL | eigencore-0.4.3-py3-none-any.whl |
|---|---|
| Size | 105.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7abe196754666d640a5c0fdadca4e1e70219bbccc62f1bdc1d7590179a04948
|
|
BLAKE2b-256 checksum How to use checksums |
45697e82726525891d665ce489595478cd236354e1126173eca375039f8083fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logSecurity for eigencore 0.4.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for eigencore-0.4.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.