Skip to main content

EigenCore — local models, on your own silicon

EigenCore

A CPU-first Python runtime for local language models, hardware-aware inference, and agent building blocks.

Python 3.10+ Version 0.3.0 License MIT

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:

python -m pip install eigencore
# on Windows/CPU without prebuilt llama.cpp wheels, add the prebuilt index for a fast install:
# python -m pip install eigencore --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
# pipx alternative: pipx install eigencore
# from source (development): git clone ... && python -m pip install -e ".[dev]"

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]"
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

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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eigencore 0.4.0
File Size Uploaded Provenance Actions
eigencore-0.4.0.tar.gz 719.2 kB With provenance Details for eigencore-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for eigencore 0.4.0
File Interpreter ABI Platform Actions
eigencore-0.4.0-py3-none-any.whl Python 3 none any Details for eigencore-0.4.0-py3-none-any.whl

Total release size: 811.2 kB

Release files / eigencore-0.4.0.tar.gz

Download URL eigencore-0.4.0.tar.gz
Size 719.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1df6ed67dc01437d26c2c4e7b120c18c41cee9bae9c6defd7bf176828e12e985
BLAKE2b-256 checksum
How to use checksums
f715485c2dcb3d2a8d687f8d691d04b4b81560828a85f01faa4a7934d135789a
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 log

Release files / eigencore-0.4.0-py3-none-any.whl

Download URL eigencore-0.4.0-py3-none-any.whl
Size 92.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9da411fabf70a1d64fc93439ebc2cddbadbf0742c9b6029d1a56af1e8437a5a4
BLAKE2b-256 checksum
How to use checksums
4e38c1ab875963947262b9bd191a3596e918e810b1cbfcd481c3aa73b6f36cb6
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 log

Security for eigencore 0.4.0

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.

Select from 2 files

Attestation for eigencore-0.4.0.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 log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page