mixle¶
Automatic inference for composable models of heterogeneous data
Mixle is a Python framework for building probabilistic systems over data that is mixed, structured, temporal, neural, or produced by language models. Its center is a composable distribution and estimator contract: describe the model shape, fit it through a common inference surface, and carry the fitted object into scoring, sampling, calibration, audit, and deployment workflows.
The long-term direction is broader than a distribution catalog. Mixle is being developed as a unified modeling layer for heterogeneous records, mixtures, HMMs, Transformer leaves, task distillation, uncertainty-aware LLM systems, local reasoning workflows, design of experiments, structured decisions, and production evidence.
Start with the quickstart Read the maturity guide Find an API
What Mixle Provides¶
Mixle is designed for applications where a single estimator class is not enough. One workflow may include a structured probability model, a latent state model, a calibrated decision rule, and a neural or LLM component. Mixle keeps those pieces connected through explicit model structure and capability-checked operations.
At the stable center are distribution families, estimators, samplers, encoders,
combinators, mixtures, HMMs, and the optimize inference entry point. Around
that center are newer workflow layers for automatic model recommendation,
probabilistic-programming expressions, neural leaves, task replacement, LLM
uncertainty, design loops, model evolution, and production metadata. Maturity
is called out where it matters so users can choose the right validation
standard.
Core Principles¶
- Composition over special cases
Build larger models from distributional components instead of writing a new training loop for every data shape.
- Inference from structure
The estimator or prototype defines the route: direct estimation, EM, conjugate updates, gradient fitting, Bayesian objectives, PPL lowering, or calibrated task workflows.
- Operational uncertainty
Posterior queries, conformal prediction, semantic entropy, density gates, abstention policies, and escalation rules are modeled as part of system behavior rather than post-processing.
- Inspectable automation
Automatic estimator selection, model recommendation, and LLM-designed specifications expose assumptions, validation checks, confidence gaps, and fallback behavior.
Common Workflows¶
- Fit a heterogeneous probability model
Start with Quickstart, then read Core Concepts, Distribution Families, Structured Statistical Families, and HMMs and Latent Structure.
- Infer a first model from raw data
Read Automatic Inference and Automatic Modeling Internals. These pages cover
get_estimator(data), prototype-driven fitting, model recommendation, validation, and fallback behavior.- Work with neural or language-model components
Read Neural and LLM Models, Representation Layer, Task Distillation, Task Serving, Routing, And Edge Deployment, and Agentic Task Distillation.
- Add uncertainty to LLM or reasoning systems
Read Uncertainty and Reasoning Systems for semantic entropy, claim reliability, calibrated abstention, graph-producing LLMs, and cross-modal evidence.
- Scale, serve, or audit fitted models
Read Compute Engines, Compute Layer, Utilities And Parallelism, Data Layer, Production Workflows, and Model Lifecycle.
- Build a local reasoning workflow
Read Local Reasoning Ecosystem for substrate storage, skills, reasoner actions, pool jobs, telemetry, and the optional
Scientistworkflow.- Explore scientific design and structured decisions
Read Design of Experiments, Analysis Utilities, Evolution And Search, Relations, Operations, and Enumeration and Ranking.
Minimal Example¶
The public fitting surface accepts an estimator, a prototype distribution, or an estimator inferred from data:
from mixle.inference import optimize
from mixle.stats import GaussianDistribution, MixtureDistribution
from mixle.utils.automatic import get_estimator
reals = [-1.2, -0.9, -1.1, 0.8, 1.2, 1.1]
rows = [("free", 4), ("paid", 19), ("free", 5), ("paid", 23)]
proto = MixtureDistribution(
[GaussianDistribution(-1.0, 1.0), GaussianDistribution(1.0, 1.0)],
[0.5, 0.5],
)
fitted_from_shape = optimize(reals, proto, prev_estimate=proto, out=None)
inferred_estimator = get_estimator(rows)
fitted_from_data = optimize(rows, inferred_estimator, out=None)
Passing proto as the model argument gives optimize the family shape.
Passing the same object as prev_estimate also uses its parameter values as
the starting point, which is usually what you want for a mixture example. See
Automatic Inference for the full route.
Project Direction¶
Mixle is moving toward a single modeling interface for hybrid probabilistic, neural, task, and reasoning systems. The stable distribution library remains the foundation. The forward-looking work is the connective tissue: automatic model design, uncertainty-aware LLM behavior, neural leaves, representation learning, active design, self-improvement loops, structured decisions, and production evidence carried through the same inspectable model lifecycle.
The standard is practical: if a system can be described as a composition of evidence, latent structure, learned components, and calibrated decisions, Mixle should make it possible to fit, inspect, compare, and deploy that system without breaking the abstraction apart.
Manual Map¶
The foundational pages are Installation, Quickstart, Core Concepts, Project Maturity, and Package Map. The tutorial index in Tutorials provides task-sized walkthroughs. The generated reference under mixle is exhaustive; API Overview is the human map for finding the right import.