Metadata-Version: 2.4
Name: hypermcts
Version: 2.0.1
Summary: Honest test-time compute (AE-MCTS) + projected KV-cache memory accounting for local/edge LLMs. Every metric is real or explicitly labeled simulated.
Author-email: Rudra Sarker <rudrasarker130@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/rudra496/hyper-reason
Project-URL: Bug Tracker, https://github.com/rudra496/hyper-reason/issues
Project-URL: Portfolio, https://rudra496.github.io/site
Keywords: llm,mcts,test-time-compute,reasoning,kv-cache,local-ai
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/plain
License-File: LICENSE
Requires-Dist: requests>=2.28
Requires-Dist: numpy>=1.24
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.40; extra == "anthropic"
Provides-Extra: orchestrator
Requires-Dist: langgraph>=0.2; extra == "orchestrator"
Requires-Dist: pydantic>=2; extra == "orchestrator"
Provides-Extra: torch
Requires-Dist: torch>=2.0; extra == "torch"
Provides-Extra: transformers
Requires-Dist: transformers>=4.40; extra == "transformers"
Requires-Dist: torch>=2.0; extra == "transformers"
Provides-Extra: ollama
Requires-Dist: ollama>=0.3; extra == "ollama"
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Provides-Extra: all
Requires-Dist: anthropic>=0.40; extra == "all"
Requires-Dist: langgraph>=0.2; extra == "all"
Requires-Dist: pydantic>=2; extra == "all"
Requires-Dist: torch>=2.0; extra == "all"
Requires-Dist: transformers>=4.40; extra == "all"
Requires-Dist: pytest>=7; extra == "all"
Dynamic: license-file

HyperReason v2 — an honest Adaptive-Entropy MCTS test-time-compute engine.

v1.x of this project shipped an engine that never called a model and an invented
benchmark table. v2 is a full honest rebuild: it genuinely drives a real LLM
(Z.AI GLM by default; Ollama / HuggingFace supported), runs Adaptive-Entropy
MCTS over model-generated candidates, picks the answer by self-consistency, and
projects KV-cache savings from real per-node token counts.

Quickstart:
    pip install hypermcts
    export ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic
    export ANTHROPIC_API_KEY=...
    python -c "from hyper_reason import wrap_model, GLMBackend; \
print(wrap_model(GLMBackend()).reason('What is 17 + 25?')['boxed_answer'])"

Real benchmark (GSM8K-mini, N=20, GLM-4.6):
    greedy (T=0)            : 95.0%
    self-consistency (K=4)  : 90.0%
    AE-MCTS (sims=6,k=2,d3) : 85.0%

We publish the run where AE-MCTS UNDERPERFORMS greedy: GLM-4.6 is already near
the ceiling on easy GSM8K, so modest-budget search does not pay off there. This
is the opposite of a SOTA claim. Re-run and scale it:
    python eval/gsm8k_mini.py --n 100 --sims 16 --k 4

Entropy is labeled "sample_diversity_entropy (no logprobs)". KV savings are a
projected simulator (no real GPU). Backends RAISE when offline — they never
fabricate a response. Raw per-problem traces: eval/runs/*.jsonl.

Full docs: https://github.com/rudra496/hyper-reason  (README.md)
Live demo: https://rudra496.github.io/hyper-reason
License: MIT. Author: Rudra Sarker.
