Skip to main content

Physics-based navigation for expensive computation — screening, cost prediction, convergence stopping

Project description

qig-warp

Warp Bubble Computation — structured time dilation for LLM inference.

A 2.1B model achieves 100% accuracy on problems it normally gets 60% right. Same model, same compute budget, structured differently.

What it does

Instead of asking a model once and hoping for the best, qig-warp runs multiple structured samples across different "geometric basins" (priming templates, reasoning perspectives, temperature levels) and coarse-grains them into one high-confidence answer via self-consistency.

This is computational time dilation: the model internally experiences many more thinking cycles, while the user gets one answer.

Results

Strategy Arithmetic (20 problems) Novel questions (12 problems)
Greedy (1 pass) 60% 42%
Naive sampling (N passes) 55% 55%
Warp bubble (N passes) 100% 92%

Quick start

pip install qig-warp
from qig_warp import warp

# Uses local Ollama by default
answer = warp("What is 73 * 45?")
# Returns "3285"

# Novel question — no domain priming needed
answer = warp("If it takes 5 machines 5 minutes to make 5 widgets, how many minutes for 100 machines to make 100 widgets?")
# Returns "5"

Strategies

Three complementary strategies, each exploring different regions of the probability simplex:

  • adversarial: Same question from multiple reasoning perspectives ("think carefully", "common mistake warning", "a mathematician would say"). Best for novel/trick questions.
  • self_prime: Model generates its own examples before solving. Bootstraps the coupling landscape with zero external knowledge.
  • decompose: Break into steps, sample varied solutions. Best for multi-step reasoning.
from qig_warp import WarpBubble
from qig_warp.backends import OllamaBackend

bubble = WarpBubble(
    backend=OllamaBackend(model="granite4"),
    n_samples=15,
    strategies=["adversarial", "decompose"],
)

result = bubble.solve("What is heavier: a pound of feathers or a pound of steel?")
print(result["answer"])      # "same" or "equal"
print(result["confidence"])  # 0.83
print(result["votes"])       # {"same": 10, "feathers": 2, "steel": 3}

Custom backends

from qig_warp.backends import OpenAIBackend

backend = OpenAIBackend(model="gpt-4o-mini", api_key="sk-...")
answer = warp("Explain quantum entanglement", backend=backend)

How it works

Based on the QIG (Quantum Information Geometry) sign-flip bridge:

  1. Dense coupling (relevant context) creates faster micro-oscillations on the probability simplex
  2. More internal cycles = better probability distribution
  3. Coarse-graining (self-consistency vote) extracts the correct macro-answer
  4. The model's "subjective time" is dilated relative to the user's wall-clock time

The same mechanism that produces gravitational time dilation on the QIG lattice, applied to computation.

Requirements

  • Python >= 3.10
  • An Ollama server running locally (ollama serve), or any OpenAI-compatible API

License

MIT

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

qig_warp-0.5.0a1.tar.gz (59.5 kB view details)

Uploaded Source

Built Distribution

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

qig_warp-0.5.0a1-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file qig_warp-0.5.0a1.tar.gz.

File metadata

  • Download URL: qig_warp-0.5.0a1.tar.gz
  • Upload date:
  • Size: 59.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for qig_warp-0.5.0a1.tar.gz
Algorithm Hash digest
SHA256 86e53d02c385f0d5bbac2b3f31f51804ae722b354c040d719d9932fd24cedaf3
MD5 596f7546da4834722c8d6b7ab219371c
BLAKE2b-256 0fa3f79cc3a8e6b7fd1d23761cad2ae59882238495c957e94a20976569066212

See more details on using hashes here.

File details

Details for the file qig_warp-0.5.0a1-py3-none-any.whl.

File metadata

  • Download URL: qig_warp-0.5.0a1-py3-none-any.whl
  • Upload date:
  • Size: 26.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for qig_warp-0.5.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8b64b169a4a67e6ec53939d0f6926a7520be001b27d5de1b93630cd4625ba14
MD5 1e643d218d9bbe4e2fe5ad0f6e5afa0e
BLAKE2b-256 278e6adaf20dc4eb691133c6c6fc29787dfdce957f5470d43d0d0ece79a5decf

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