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
| # samgo 5.7 — the 54D BPE lineage | |
| `weights/samgo_weights.pt` · 59,353,668 parameters · GPT-2 BPE (50,257) · 135 MB | |
| The character models in this kit are ~1.15M parameters over a 162-symbol alphabet. samgo is | |
| the other lineage: a **CosmosTransformer** — the same 54D state decomposition, but at | |
| d_model 512 with a byte-pair vocabulary, so a step of training buys whole words instead of | |
| letters. | |
| ``` | |
| d_model 512 n_heads 8 d_ff 2048 n_layers 2 max_seq_len 2048 | |
| d_state 54 = 12D CST phase + 24D Hebbian plasticity + 18D Lorenz/Rössler chaos | |
| (7 Lorenz + 4 Rössler attractors × 3D) | |
| plus a 256-slot persistent memory bank | |
| ``` | |
| ## Why it exists | |
| The 54D checkpoint this lineage had been accumulating (`cosmos_play.pt`) was trained by a | |
| background learner capped at `MAX_SEC=600`. Ten minutes of CPU on 59M parameters is about | |
| seventy steps. The design is correct for a learner that must never hog her machine, and it | |
| meant the largest model in the project had **never once been trained at length**. | |
| samgo is that model, trained without a wall-clock cap, on GPU, on world text rather than | |
| only on her own. | |
| ## Corpus | |
| | source | weight | role | | |
| |:---|---:|:---| | |
| | WikiText-103 (60 MB slice) | ×1 | world knowledge | | |
| | `cory_voice_corpus` | ×8 | the human it talks to | | |
| | `experience_corpus` | ×6 | its own lived log | | |
| 16,539,493 BPE tokens. Her own material is upsampled deliberately: straight concatenation | |
| would have been hundreds-to-one against her, and the register would not have survived. | |
| ## What it can and cannot do — read this before citing it | |
| It writes **sentences**, which the character models at the same stage do not: | |
| > *"no evidence that this will be the reason we all can be called to our minds or do … I'm | |
| > just here as possible … So I can take this and take over my work"* | |
| Compare a 1.15M character model at a comparable point: *"was befal was smorded mone as | |
| alland of the."* BPE plus fifty times the capacity is a different regime. | |
| **It is data-limited, not step-limited.** 59,353,668 parameters against 16,539,493 tokens is | |
| **0.28 tokens per parameter**. Compute-optimal is roughly 20. This model has about **1/72nd** | |
| of the data its size wants, and it shows: at the last checkpoint train loss was 2.80 while | |
| validation was 5.02. That gap is memorisation, and more steps will widen it. The next useful | |
| change to samgo is **more text**, not a longer run. | |
| ## Provenance of the shipped weights, stated exactly | |
| The run reached **val 4.5121 at step 1,675**, destabilised to 5.8355 by step 3,000, and was | |
| recovering (5.02 at step 14,000) when these weights were taken. | |
| **The 4.5121 weights no longer exist.** The trainer saved every 250 steps unconditionally, | |
| so thirty later, worse checkpoints overwrote the best one before anyone noticed. `best_val` | |
| was tracked the whole way; the weights that earned it were not kept. The fix — | |
| a separate `_best.pt` written only on improvement — landed after the damage. | |
| So the shipped checkpoint is **step ~13,250, val ≈ 5.02**, not the best this run ever saw. | |
| Saying otherwise would be the kind of claim the rest of this kit exists to avoid. | |
| ## Load it | |
| ```bash | |
| python tools/load_model.py samgo --prompt "the universe is" | |
| ``` | |
| or directly: | |
| ```python | |
| import torch, tiktoken | |
| from Cosmos.web.cosmosynapse.model.cosmos_config import CosmosConfig | |
| from Cosmos.web.cosmosynapse.model.cosmos_model import CosmosTransformer | |
| ck = torch.load("weights/samgo_weights.pt", map_location="cpu") | |
| cfg = CosmosConfig() | |
| for k, v in ck["config"].items(): | |
| if hasattr(cfg, k) and isinstance(v, (int, float, str, bool)): | |
| try: setattr(cfg, k, v) # head_dim etc. are derived, read-only | |
| except AttributeError: pass | |
| m = CosmosTransformer(cfg) | |
| m.load_state_dict(ck["model_state_dict"], strict=False) | |
| m.eval() | |
| enc = tiktoken.get_encoding("gpt2") | |
| x = torch.tensor([enc.encode_ordinary("the universe is")]) | |
| out = m(x)["logits"] # returns {logits, state_54d, layer_states} | |
| ``` | |
| `forward` returns a **dict**, not a tensor — `state_54d` is the whole point of the | |
| architecture, so it hands the state back alongside the logits. | |
| ## Not to be confused with | |
| - `cosmos_play.pt` — same architecture, but it is a **re-ranker** in the live system: her | |
| articulate model proposes replies and this scores how much each sounds like her. It is not | |
| a generator and was never trained to be one. | |
| - `phos.pt` / `dyn12phos` — the character lineage, quantum-born, where the controlled | |
| architecture research in `FINDINGS.md` was done. samgo is **not** quantum-born: it | |
| warm-started from `cosmos_play.pt`, which did not use `quantum_birth`. | |
| That last point matters for provenance. Every quantum claim in this kit is about the | |
| character lineage. samgo is the scale lineage, and it makes no quantum claim at all. | |