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 | |
| """Offline integrity and privacy-boundary verifier for the QC67 Cosmos kit.""" | |
| from __future__ import annotations | |
| import argparse | |
| import hashlib | |
| import json | |
| import sys | |
| from collections import Counter | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parent | |
| MANIFEST = ROOT / "RELEASE_MANIFEST.json" | |
| def sha256(path: Path) -> str: | |
| digest = hashlib.sha256() | |
| with path.open("rb") as handle: | |
| for chunk in iter(lambda: handle.read(1024 * 1024), b""): | |
| digest.update(chunk) | |
| return digest.hexdigest() | |
| def check_manifest(strict: bool) -> list[str]: | |
| errors: list[str] = [] | |
| release = json.loads(MANIFEST.read_text(encoding="utf-8")) | |
| expected = set() | |
| for entry in release.get("files", []): | |
| rel = entry["path"] | |
| expected.add(rel) | |
| path = ROOT / rel | |
| if not path.is_file(): | |
| errors.append(f"missing: {rel}") | |
| continue | |
| size = path.stat().st_size | |
| if size != int(entry["bytes"]): | |
| errors.append(f"size mismatch: {rel} ({size} != {entry['bytes']})") | |
| continue | |
| actual = sha256(path) | |
| if actual != entry["sha256"]: | |
| errors.append(f"hash mismatch: {rel}") | |
| if strict: | |
| ignored = {"RELEASE_MANIFEST.json"} | |
| actual = { | |
| path.relative_to(ROOT).as_posix() | |
| for path in ROOT.rglob("*") | |
| if path.is_file() | |
| and path.relative_to(ROOT).as_posix() not in ignored | |
| and not path.relative_to(ROOT).as_posix().startswith("downloads/") | |
| } | |
| for rel in sorted(actual - expected): | |
| errors.append(f"unmanifested file: {rel}") | |
| return errors | |
| def check_blank_credentials() -> list[str]: | |
| errors: list[str] = [] | |
| config = json.loads( | |
| (ROOT / "genesis_engine" / "config.json").read_text(encoding="utf-8") | |
| ) | |
| for key in ("ibm_token", "azure_connection_string"): | |
| if str(config.get(key) or "").strip(): | |
| errors.append(f"credential field is not blank: genesis_engine/config.json:{key}") | |
| forbidden_names = ("oauth2_tokens.json", ".env", "credentials.json") | |
| for path in ROOT.rglob("*"): | |
| if path.is_file() and path.name.casefold() in forbidden_names: | |
| errors.append(f"forbidden credential file present: {path.relative_to(ROOT)}") | |
| return errors | |
| def check_public_archive() -> tuple[list[str], dict]: | |
| errors: list[str] = [] | |
| archive = ROOT / "data" / "quantum_measurements_public.jsonl" | |
| data_manifest = json.loads( | |
| (ROOT / "data" / "quantum_measurements_manifest.json").read_text( | |
| encoding="utf-8" | |
| ) | |
| ) | |
| records = Counter() | |
| samples = Counter() | |
| total = 0 | |
| for line_number, line in enumerate( | |
| archive.open(encoding="utf-8", errors="strict"), 1 | |
| ): | |
| try: | |
| row = json.loads(line) | |
| except Exception as exc: | |
| errors.append(f"archive line {line_number}: invalid JSON ({exc})") | |
| continue | |
| counts = row.get("counts") | |
| if not isinstance(counts, dict) or not counts: | |
| errors.append(f"archive line {line_number}: missing counts") | |
| continue | |
| observed = sum(int(value) for value in counts.values()) | |
| declared = int(row.get("total_shots", -1)) | |
| if observed != declared: | |
| errors.append( | |
| f"archive line {line_number}: shot mismatch {observed} != {declared}" | |
| ) | |
| category = str(row.get("provider_class") or "missing") | |
| records[category] += 1 | |
| samples[category] += observed | |
| total += observed | |
| expected = data_manifest["summary"] | |
| if total != int(expected["total_samples"]): | |
| errors.append( | |
| f"archive total mismatch: {total} != {expected['total_samples']}" | |
| ) | |
| for category, expected_count in expected["records_by_provider_class"].items(): | |
| if records[category] != int(expected_count): | |
| errors.append( | |
| f"archive record count mismatch for {category}: " | |
| f"{records[category]} != {expected_count}" | |
| ) | |
| return errors, { | |
| "records": sum(records.values()), | |
| "samples": total, | |
| "records_by_class": dict(records), | |
| "samples_by_class": dict(samples), | |
| } | |
| def check_model_metadata() -> list[str]: | |
| errors: list[str] = [] | |
| metadata = json.loads( | |
| (ROOT / "weights" / "cosmos_born.meta.json").read_text(encoding="utf-8") | |
| ) | |
| if int(metadata.get("params", 0)) != 1_842_432: | |
| errors.append("unexpected cosmos_born parameter count") | |
| if str(metadata.get("base_model") or "").upper().split()[0] != "NONE": | |
| errors.append("cosmos_born metadata no longer reports a from-scratch base") | |
| return errors | |
| def main() -> int: | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument( | |
| "--no-strict", | |
| action="store_true", | |
| help="allow extra files not listed in the release manifest", | |
| ) | |
| args = parser.parse_args() | |
| if not MANIFEST.is_file(): | |
| print("[FAIL] RELEASE_MANIFEST.json is missing") | |
| return 1 | |
| errors = [] | |
| errors.extend(check_manifest(strict=not args.no_strict)) | |
| errors.extend(check_blank_credentials()) | |
| archive_errors, archive_stats = check_public_archive() | |
| errors.extend(archive_errors) | |
| errors.extend(check_model_metadata()) | |
| if errors: | |
| print(f"[FAIL] {len(errors)} release check(s) failed") | |
| for error in errors: | |
| print(" -", error) | |
| return 1 | |
| print("[OK] release manifest hashes verified") | |
| print("[OK] shipped cloud credential fields are blank") | |
| print("[OK] cosmos_born metadata is internally consistent") | |
| print( | |
| "[OK] public archive:", | |
| f"{archive_stats['records']:,} records,", | |
| f"{archive_stats['samples']:,} samples", | |
| ) | |
| for category in sorted(archive_stats["records_by_class"]): | |
| print( | |
| " ", | |
| category, | |
| f"{archive_stats['records_by_class'][category]:,} records /", | |
| f"{archive_stats['samples_by_class'][category]:,} samples", | |
| ) | |
| return 0 | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |