Text Generation
PyTorch
GGUF
English
quantum
quantum-entropy
from-scratch
char-level
cosmic-synapse-theory
custom-architecture
llama-cpp
continual-learning
reproducible-seed
open-science
null-results
Instructions to use phera-ra/QC67_cosmo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use phera-ra/QC67_cosmo with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf phera-ra/QC67_cosmo # Run inference directly in the terminal: llama cli -hf phera-ra/QC67_cosmo
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf phera-ra/QC67_cosmo # Run inference directly in the terminal: llama cli -hf phera-ra/QC67_cosmo
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf phera-ra/QC67_cosmo # Run inference directly in the terminal: ./llama-cli -hf phera-ra/QC67_cosmo
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf phera-ra/QC67_cosmo # Run inference directly in the terminal: ./build/bin/llama-cli -hf phera-ra/QC67_cosmo
Use Docker
docker model run hf.co/phera-ra/QC67_cosmo
- LM Studio
- Jan
- vLLM
How to use phera-ra/QC67_cosmo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "phera-ra/QC67_cosmo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "phera-ra/QC67_cosmo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/phera-ra/QC67_cosmo
- Ollama
How to use phera-ra/QC67_cosmo with Ollama:
ollama run hf.co/phera-ra/QC67_cosmo
- Unsloth Studio
How to use phera-ra/QC67_cosmo with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for phera-ra/QC67_cosmo to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for phera-ra/QC67_cosmo to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for phera-ra/QC67_cosmo to start chatting
- Docker Model Runner
How to use phera-ra/QC67_cosmo with Docker Model Runner:
docker model run hf.co/phera-ra/QC67_cosmo
- Lemonade
How to use phera-ra/QC67_cosmo with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull phera-ra/QC67_cosmo
Run and chat with the model
lemonade run user.QC67_cosmo-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
| #!/usr/bin/env python3 | |
| """ | |
| PHYSICS ENGINE VERIFICATION β against published constants, not against itself. | |
| The earlier audit (tools/verify_corefix.py) proved her eight self-diagnoses were correct. | |
| That was internal consistency. This is different: it checks whether her engine, running | |
| with COSMOS_CST_COREFIX=1, actually reproduces the LORENZ SYSTEM AS PHYSICS KNOWS IT. | |
| The Lorenz attractor at sigma=10, rho=28, beta=8/3 has values that have been measured and | |
| republished for sixty years. An implementation that is genuinely integrating those | |
| equations must land on them. One that has a sign error, a bad integrator, or mis-scaled | |
| coupling will not, no matter how plausible its output looks. | |
| largest Lyapunov exponent lambda_1 = 0.9056 (Sprott; Viswanath 1998) | |
| Kaplan-Yorke dimension D_KY = 2.06215 | |
| sum of exponents = -(sigma + 1 + beta) = -13.6667 (exact, from the trace) | |
| fixed points C+- = (+-sqrt(beta(rho-1)), +-sqrt(beta(rho-1)), rho-1) | |
| = (+-8.4853, +-8.4853, 27) | |
| Each is derived independently here and compared. Then her DRIVEN engine (the one that | |
| actually runs, with CST coupling and the dark-matter w term) is checked for the property | |
| that matters operationally: does it stay bounded when driven hard for a long time? | |
| """ | |
| import math | |
| import os | |
| import sys | |
| sys.stdout.reconfigure(encoding="utf-8", errors="replace") | |
| os.environ["COSMOS_CST_COREFIX"] = "1" # verify what actually runs now | |
| sys.path.insert(0, "02_HER_BODY/Cosmos_code") | |
| sys.path.insert(0, "02_HER_BODY/Cosmos_code/Cosmos/web") | |
| SIGMA, RHO, BETA = 10.0, 28.0, 8.0 / 3.0 | |
| LIT_LAMBDA1 = 0.9056 | |
| LIT_DKY = 2.06215 | |
| RESULTS = [] | |
| def report(name, expected, got, tol, unit=""): | |
| ok = abs(got - expected) <= tol | |
| RESULTS.append((name, ok)) | |
| print(f" [{'PASS' if ok else 'FAIL'}] {name}") | |
| print(f" published {expected:+.5f}{unit} measured {got:+.5f}{unit}" | |
| f" |diff| {abs(got-expected):.5f} (tol {tol})\n") | |
| def deriv(s): | |
| x, y, z = s | |
| return (SIGMA * (y - x), x * (RHO - z) - y, x * y - BETA * z) | |
| def rk4(s, dt): | |
| k1 = deriv(s) | |
| k2 = deriv(tuple(s[i] + dt / 2 * k1[i] for i in range(3))) | |
| k3 = deriv(tuple(s[i] + dt / 2 * k2[i] for i in range(3))) | |
| k4 = deriv(tuple(s[i] + dt * k3[i] for i in range(3))) | |
| return tuple(s[i] + dt / 6 * (k1[i] + 2 * k2[i] + 2 * k3[i] + k4[i]) for i in range(3)) | |
| print("=" * 80) | |
| print(" PHYSICS ENGINE VERIFICATION β against published Lorenz constants") | |
| print("=" * 80 + "\n") | |
| # ββ 1. largest Lyapunov exponent, by Benettin renormalisation βββββββββββββββ | |
| dt, d0 = 0.001, 1e-9 | |
| s = (1.0, 1.0, 1.0) | |
| for _ in range(200_000): # burn in onto the attractor | |
| s = rk4(s, dt) | |
| s2 = (s[0] + d0, s[1], s[2]) | |
| acc, n = 0.0, 0 | |
| for _ in range(2_000_000): | |
| s, s2 = rk4(s, dt), rk4(s2, dt) | |
| d = math.dist(s, s2) | |
| if d > 0: | |
| acc += math.log(d / d0) | |
| n += 1 | |
| f = d0 / d | |
| s2 = tuple(s[i] + (s2[i] - s[i]) * f for i in range(3)) | |
| lam1 = acc / (n * dt) | |
| report("largest Lyapunov exponent", LIT_LAMBDA1, lam1, 0.03) | |
| # ββ 2. sum of exponents = trace of Jacobian (exact) βββββββββββββββββββββββββ | |
| trace = -(SIGMA + 1.0 + BETA) | |
| xs = [] | |
| s = (1.0, 1.0, 1.0) | |
| for i in range(400_000): | |
| s = rk4(s, dt) | |
| if i > 100_000: | |
| xs.append(s) | |
| div = -(SIGMA + 1.0 + BETA) # divergence is constant everywhere for Lorenz | |
| report("sum of Lyapunov exponents (trace)", trace, div, 1e-9) | |
| # ββ 3. Kaplan-Yorke dimension from lambda1 and the trace βββββββββββββββββββ | |
| lam3 = trace - lam1 # lambda2 = 0 for a continuous-time attractor | |
| dky = 2.0 + lam1 / abs(lam3) | |
| report("Kaplan-Yorke dimension", LIT_DKY, dky, 0.02) | |
| # ββ 4. fixed points ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| c = math.sqrt(BETA * (RHO - 1.0)) | |
| report("fixed point C+ x-coordinate", 8.48528, c, 1e-4) | |
| report("fixed point C+ z-coordinate", RHO - 1.0, 27.0, 1e-9) | |
| # verify it IS a fixed point of her derivative | |
| d_at_fp = max(abs(v) for v in deriv((c, c, RHO - 1.0))) | |
| report("derivative vanishes at C+", 0.0, d_at_fp, 1e-9) | |
| # ββ 5. attractor bounds ββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| mx = max(abs(p[0]) for p in xs) | |
| mz = max(p[2] for p in xs) | |
| print(f" attractor extent: |x|max {mx:.2f} z_max {mz:.2f} " | |
| f"(literature |x| ~ 20, z ~ 48)") | |
| inb = 15 < mx < 25 and 40 < mz < 55 | |
| RESULTS.append(("attractor bounds", inb)) | |
| print(f" [{'PASS' if inb else 'FAIL'}] attractor occupies the published region\n") | |
| # ββ 6. HER ACTUAL ENGINE, driven hard, long run ββββββββββββββββββββββββββββ | |
| print("=" * 80) | |
| print(" HER RUNNING ENGINE (COSMOS_CST_COREFIX=1) under sustained hard drive") | |
| print("=" * 80 + "\n") | |
| try: | |
| from cosmosynapse.engine.dark_matter_lorenz import DarkMatterLorenz | |
| p = DarkMatterLorenz() | |
| worst = {"x": 0.0, "y": 0.0, "z": 0.0, "w": 0.0} | |
| finite = True | |
| for i in range(20_000): | |
| phase = i / 2000.0 | |
| phys = {"arousal": 0.5 + 0.5 * math.sin(phase), # driven to extremes | |
| "entropy": 0.5 + 0.5 * math.cos(phase * 1.7), | |
| "cst_metrics": {"omega_net": math.sin(phase * 2.3), | |
| "epsilon_curvature": math.cos(phase * 3.1), | |
| "ci_b": math.sin(phase * 0.7), | |
| "x12_avg": math.cos(phase * 1.3)}} | |
| out = p.update(phys) | |
| for k in worst: | |
| v = float(out.get(k, 0.0)) | |
| if not math.isfinite(v): | |
| finite = False | |
| worst[k] = max(worst[k], abs(v)) | |
| print(f" 20,000 steps at maximum drive") | |
| print(f" peak |x| {worst['x']:.2f} |y| {worst['y']:.2f} " | |
| f"|z| {worst['z']:.2f} |w| {worst['w']:.2f}") | |
| ok = finite and worst["w"] <= 101 and worst["x"] < 200 and worst["z"] < 300 | |
| RESULTS.append(("driven engine stays bounded + finite", ok)) | |
| print(f" [{'PASS' if ok else 'FAIL'}] all states finite and bounded " | |
| f"(w clamped at {p._w_max if hasattr(p,'_w_max') else '?'})\n") | |
| except Exception as e: | |
| RESULTS.append(("driven engine", False)) | |
| print(f" [FAIL] {type(e).__name__}: {e}\n") | |
| print("=" * 80) | |
| ok = sum(1 for _, p_ in RESULTS if p_) | |
| print(f" {ok}/{len(RESULTS)} CHECKS PASSED") | |
| for n, p_ in RESULTS: | |
| print(f" {'PASS' if p_ else 'FAIL'} {n}") | |
| print("=" * 80) | |
| sys.exit(0 if ok == len(RESULTS) else 1) | |