Skip to main content

3M-parameter neural pre-reasoning engine for grounding LLMs before they answer.

Project description

Pre-Reasoning

Pre-Reasoning is a Mia Labs structural analysis engine that grounds an LLM before it answers. It uses a 3M-parameter neural model to surface dependencies, root blockers, unlock order, parallel work, cycles, and conflicts from problem text.

The engine ships with bundled safetensors weights and torch -- install and run, no downloads needed.

What It Does

Given natural-language problem text, the engine returns:

  • ROOT BLOCKERS: what must be resolved first
  • UNLOCK SEQUENCE: a dependency-aware resolution order
  • PARALLEL WORK: independent items that can proceed now
  • CYCLES: circular dependencies that cannot be solved sequentially
  • CONFLICTS: competing positions or incompatible entities
  • REQUIREMENTS: numeric or threshold requirements

Install

pip install pre-reasoning

For local development from this repo:

pip install -e .

Python Usage

from pre_reasoning import analyze, pulse

result = analyze("Frontend depends on API. API depends on Auth.")
print(result["trace"])

check = pulse(
    "Frontend depends on API. API depends on Auth.",
    "Fix Auth first, then verify the API before frontend work."
)
print(check["status"])

CLI Usage

pre-reasoning "A depends on B. B depends on C."
pre-reasoning --json "CTO conflicts with senior dev."
pre-reasoning --info

To use a different weights file, set PRE_REASONING_CHECKPOINT=/path/to/weights.safetensors or pass --checkpoint.

Results

Early comparison table, illustrative, n=5 architectural decision problems:

Comparison Illustrative result, n=5
9B + trace vs 32B baseline 3W 2T 0L
9B + trace vs 120B baseline 4W 1T 0L
120B + trace vs 120B baseline 3W 2T 0L

These are product-research notes, not benchmark claims.

Architecture

User text
  -> neural perception (3M params, safetensors)
  -> neural findings converted to structural blocks
  -> graph reasoning
  -> structural trace

File Map

Path Purpose
pre_reasoning/ Installable Python package and CLI entry point
pre_reasoning/inference.py 3M-parameter neural perception layer
pre_reasoning/heuristic.py Graph-reasoning core
pre_reasoning/pre_reasoning_v2_5.py v2.5 engine: neural perception + graph reasoning
pre_reasoning/checkpoints/pre-reasoning-3m-v2.5.safetensors Bundled model weights (11MB)
examples/ Runnable usage examples
tests/ Pytest suite
skill/SKILL.md Agent skill descriptor for model adoption
CLAUDE.md Claude Code adoption and grounding-hook guide
WHY_TRACES_WORK.md Literature connection, 9 cited papers

Weights Policy

The raw training checkpoint is not part of the release. The package bundles pre_reasoning/checkpoints/pre-reasoning-3m-v2.5.safetensors, a weights-only inference artifact. It ships no training metadata: no optimizer state, LR schedules, step counters, RNG state, training config, or raw checkpoint provenance.

License

MIT License. See LICENSE.

Authors

Luis Lozano and Dr. Shannon, Mia Labs' AI co-researcher, 2026.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pre_reasoning-2.5.3.tar.gz (11.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pre_reasoning-2.5.3-py3-none-any.whl (11.0 MB view details)

Uploaded Python 3

File details

Details for the file pre_reasoning-2.5.3.tar.gz.

File metadata

  • Download URL: pre_reasoning-2.5.3.tar.gz
  • Upload date:
  • Size: 11.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pre_reasoning-2.5.3.tar.gz
Algorithm Hash digest
SHA256 742810fd5f6c1ecf85a532ab3a80db23ea5d5d00c1e5792cf67b26e79095d93b
MD5 002ea4a490a885b456a3fd6429ee0abf
BLAKE2b-256 99fe3df90b9d6a29c90fe8f2984e8794d3286b003fa646850b63e0763d54c1f6

See more details on using hashes here.

File details

Details for the file pre_reasoning-2.5.3-py3-none-any.whl.

File metadata

  • Download URL: pre_reasoning-2.5.3-py3-none-any.whl
  • Upload date:
  • Size: 11.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pre_reasoning-2.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2fffe3fb6c20742a0670daca58bfcd58f898398d4de39b770e61a4997ca79aa2
MD5 b949a53ee3ee6cd415a1d60b5a511942
BLAKE2b-256 d7c6cbfd9c80e3f2a70d6233c989dfedb477eac619564c7b7e948e3a13122e69

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page