--- tags: - ml-intern --- # NEXUS OS v2.0 — Thermodynamic Hallucination Control **ChimeraRouter + TWAVE + ERNIE Integration** Upgraded with 2024–2026 SOTA findings: LEAD, EDT, EPR, LED, CK-PLUG, Attention Divergence, TECP, AutoDeco. ## Architecture ``` ┌─────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ Prompt │────▶│ ChimeraRouterV2 │────▶│ RoutingDecision │ └─────────────┘ └─────────────────┘ └─────────────────┘ │ │ │ ▼ ▼ ▼ ┌─────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ ERNIE │ │ PromptAnalyzer │ │ QwaveAllocator │ │ (agent) │ │ + PolicySelect │ │ Budget tokens │ └─────────────┘ └─────────────────┘ └─────────────────┘ ┌──────────────────────────────────────────────────────────────┐ │ TWAVE v2.0 — Landau-Ginzburg │ ├──────────────────────────────────────────────────────────────┤ │ EDT (entropy→temperature) │ LEAD (latent↔discrete) │ │ EPR (black-box detection) │ LED (layer-wise explore) │ │ CK-PLUG (retrieval μ_ret) │ Attention Divergence probe │ └──────────────────────────────────────────────────────────────┘ ``` ## Key Files | File | Purpose | |------|---------| | `twave/landau_ginzburg_tracker_v2.py` | TWAVE v2.0 — token-level phase control | | `nexus_os/chimera_router_v2.py` | ChimeraRouter v2 — tiered routing + ERNIE hooks | | `nexus_os/demo_e2e_v2.py` | End-to-end unified demo | | `README_v2.md` | This file | ## Quick Start ```bash # ChimeraRouter v2 demo python nexus_os/chimera_router_v2.py # TWAVE v2 demo python twave/landau_ginzburg_tracker_v2.py # Full E2E demo python nexus_os/demo_e2e_v2.py --prompt "Explain quantum entanglement step by step." --category R2.2 --quality 0.85 ``` ## ERNIE Integration ERNIE is your external agent that provides suggestions via callback: ```python from nexus_os.chimera_router_v2 import ERNIEInterface, ERNIESuggestion, TemperaturePolicy def ernie_callback(prompt, analysis): if "quantum" in prompt.lower(): return ERNIESuggestion( suggested_policy=TemperaturePolicy.EAD, confidence=0.85, reasoning="Quantum prompts need annealed exploration", override_router=False, ) return None router = ChimeraRouterV2(ernie_interface=ERNIEInterface(callback=ernie_callback)) ``` ERNIE suggestions are **blended** with router logic (default 30% ERNIE, 70% router) unless `override_router=True`. ## Temperature Policies | Policy | When | Reference | |--------|------|-----------| | `fixed` | Default | Baseline | | `edt` | White/black-box with logprobs | arXiv:2403.14541 | | `ead` | Multi-step reasoning | arXiv:2510.05251 | | `lead` | High-entropy uncertainty | arXiv:2603.13366 | | `ernie` | External agent suggestion | Your ERNIE pipeline | ## Research Sources - **LEAD** (Latent↔Discrete mode switching): arXiv:2603.13366, CVPR 2026 - **EDT** (Entropy-based Dynamic Temperature): arXiv:2403.14541 - **EPR** (Entropy Production Rate, black-box): arXiv:2509.04492, ECIR 2026 - **LED** (Latent Exploration Decoding): arXiv:2602.01698, ICML 2026 - **CK-PLUG** (Retrieval chemical potential μ_ret): arXiv:2503.15888 - **Attention Divergence**: arXiv:2605.05025 - **TECP** (Token-Entropy Conformal Prediction): arXiv:2509.00461 - **SEP** (Semantic Entropy Probes): arXiv:2406.15927 - **AutoDeco** (Learned temperature heads): arXiv:2510.26697 ## License MIT — developed for the NEXUS OS project. ## Generated by ML Intern This model repository was generated by [ML Intern](https://github.com/huggingface/ml-intern), an agent for machine learning research and development on the Hugging Face Hub. - Try ML Intern: https://smolagents-ml-intern.hf.space - Source code: https://github.com/huggingface/ml-intern ## Usage ```python from transformers import AutoModelForCausalLM, AutoTokenizer model_id = 'specimba/nexus-os-v2' tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained(model_id) ``` For non-causal architectures, replace `AutoModelForCausalLM` with the appropriate `AutoModel` class.