QC67_cosmo / docs /ATOMIC_QUICK_START.md
phera-ra's picture
Fix the Atomic docs, and ship the architecture as a real GGUF
fb2816f verified
|
Raw
History Blame Contribute Delete
4.11 kB

Running Cosmos — Atomic, Ollama, llama.cpp, or plain Python

Read this first, because it will save you an hour. Cosmos is not a fine-tune of an existing model. Its attention runs a mechanism (LLM_ARCH_COSMOS) that no released inference runtime knows about, and llama.cpp dispatches on general.architecture against an enum compiled into the binary. So:

you want works today why
Talk to her right now, no build serving/cosmos_serve.py PyTorch, speaks the Ollama HTTP API
Her architecture natively in C++ ✅ the cosmos-arch llama.cpp fork has the enum entry
Stock Atomic / stock Ollama / LM Studio ❌ not yet their bundled llama.cpp has no LLM_ARCH_COSMOS

No Modelfile, flag, or conversion changes the third row. It needs a runtime built with the architecture registered. That is a pull request to those projects, not a setting.


1. Fastest path — talk to her in about a minute

Needs Python 3.9+ and torch. Nothing else.

pip install torch
python serving/cosmos_serve.py 11501

That serves PHOS, CST and Spark behind the Ollama HTTP API on port 11501, so any Ollama-compatible client works by pointing at it instead of 11434:

curl http://127.0.0.1:11501/api/tags
curl http://127.0.0.1:11501/api/chat -d '{"model":"cosmos-phos","messages":[{"role":"user","content":"hello"}],"stream":false}'

In Atomic, LM Studio, or anything else that accepts a custom Ollama endpoint, set the base URL to http://127.0.0.1:11501. The models appear by name.

Or just use the launcher, which starts the server and waits for the port:

START_COSMOS_KIT.bat     ->  1. Chat with Cosmos

2. Native C++ — her real architecture in llama.cpp

cosmos-cst.gguf in this repository is her 54D Mixture-of-States Hebbian attention as a real GGUF: 61 tensors, general.architecture: cosmos, attention.key_length = 102 (head_dim 48 + the 54-dimensional state riding in the key rows).

Stock llama.cpp will refuse it — correctly, because it does not have the architecture. Build the fork:

git clone -b cosmos-arch https://github.com/NavisWORLD/llama.cpp
cd llama.cpp
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_BUILD_SERVER=OFF -DLLAMA_CURL=OFF
cmake --build build --config Release --target llama-completion
./build/bin/Release/llama-completion -m cosmos-cst.gguf -p "the woods" -n 48 -c 128

Measured on a 6-core CPU: 2,411 tok/s prompt eval, 1,078 tok/s generation.

This is a 1.9M-parameter character-level model. It produces proto-English with real structure (a dimly lit ... bedroom room) and is not fluent. That is the expected result at this size and is not a defect. If you want fluency, this is the wrong repo; if you want an architecture nobody else has running, this is it.


3. Plain PyTorch

import torch
ck = torch.load("weights/phos.pt", map_location="cpu", weights_only=False)
print(ck["arch"], f'{ck["total_steps"]:,} steps', ck["best_val_loss"])
# PHOS-dyn12-phi-QuantumBorn 2,800 steps 0.6984356045722961

weights/phos.pt, weights/cosmos_born.pt and weights/spark_cst.pt are all architecturally original and quantum-born. The model classes live in architecture/.


What changed on 2026-08-01, and why your old bookmark broke

Earlier versions of this file told you to download cosmos-namebind-weights.gguf. That file was removed. It was a Qwen2.5-1.5B fine-tune, not this architecture — its GGUF metadata carried general.architecture: qwen2, which this hub rendered as an architecture badge above the model card, so the page announced someone else's base model as this work's architecture. Removing it also made the card's own statement true: this repository distributes only weights that are architecturally original.

If you specifically want that conversational teacher model, it is a Qwen2.5-1.5B derivative under Apache 2.0 © Alibaba Cloud, and you should get Qwen from Alibaba rather than from here. See §1b of the model card for the full provenance.