Downloads · 30 days
0
wop/Cosmos-T-80M
Cosmos-T-80M is a text generation model from wop. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
<img src="https://calm-heart-d697.mmmmmm505090.workers.dev?text=Cosmos-T-80M" width="800" alt="Cosmos-T-80M" /
Downloads · 30 days
0
Access
Public
Updated May 30, 2026
Repo size
320 MB
Likes
4
Public
Click a slice to open those files.
.pt320 MB · 100%
From the Hugging Face model README
Cosmos-T-80M is the first model in the Cosmos-T series — small, from-scratch, decoder-only Transformers pretrained on chain-of-thought data for research and demos. It is an instruct-style model trained with explicit <think>...</think> reasoning blocks.
⚠️ Research / demo model. 80M parameters trained on only ~215k tokens. It is intentionally small so you can run it on a free Kaggle T4 or in a HF Space demo. It is not a useful general assistant and will produce incoherent or hallucinated output on most prompts. The point of this release is the architecture + training recipe, not state-of-the-art quality.
| Architecture | Decoder-only Transformer (GPT-style, pre-norm, causal SDPA) |
| Parameters | ~79.7 M |
| Layers (attention blocks) | 12 |
| d_model | 384 |
| Attention heads | 8 (head_dim = 48) |
| FFN hidden | 1536 (4 × d_model) |
| Activation | GELU |
| Normalization | LayerNorm, pre-norm |
| Positional encoding | Learned absolute |
| Embedding ↔ LM head | Tied |
Context length MAX_LEN) | 1028 |
| Training block size | 1028 tokens |
| Vocab size | 151,936 |
| Tokenizer | Qwen/Qwen2.5-0.5B (reused, not retrained) |
| License | Apache-2.0 |
<think>, has good multilingual coverage, and is well-supported by transformers.Input tokens (Qwen2.5 vocab = 151,936)
│
▼
┌──────────────────────────────────┐
│ Token Embedding (152k × 384) │ ← tied with LM head
│ + Positional Embedding (1028×384)│
└──────────────────────────────────┘
│
▼
┌─────────────────────────────┐
│ Transformer Block × 12 │
│ ┌───────────────────────┐ │
│ │ LayerNorm │ │
│ │ Causal Self-Attention │ │ 8 heads, fused SDPA
│ │ + residual │ │
│ ├───────────────────────┤ │
│ │ LayerNorm │ │
│ │ MLP: 384 → 1536 → 384 │ │ GELU
│ │ + residual │ │
│ └───────────────────────┘ │
└─────────────────────────────┘
│
▼
┌──────────────────────────────────┐
│ Final LayerNorm │
│ LM head = tok_emb.T (tied) │
└──────────────────────────────────┘
│
▼
Logits (B, T, 151936)
| Dataset | wop/XXXXXL-chain-of-thought (840 conversations, chain-of-thought format with <think> blocks) |
| Approx. tokens seen / epoch | ~215k |
| Epochs | 50 |
| Total optimizer steps | 1,650 |
| Batch size | 6 (split across 2 GPUs) |
| Optimizer | AdamW (β = 0.9, 0.95), weight decay 0.1 |
| Peak LR | 3 × 10⁻⁴ |
| LR schedule | 50-step linear warmup → cosine decay to 10% of peak |
| Gradient clipping | 1.0 |
| Precision | FP16 autocast + GradScaler |
| Hardware | Kaggle Notebook, 2 × NVIDIA T4 (DataParallel) |
| Wall-clock time | 772 seconds (~13 minutes) |
| Final training loss | 0.4533 (perplexity ≈ 1.57) |
| Final validation loss | 7.0868 (perplexity ≈ 1196) |

The training loss descends cleanly to ~0.45, but the validation loss bottoms out around step 300 (val ≈ 5.6) and then climbs to 7.09 by step 1650. This is heavy overfitting, and is the expected behavior for an 80M-parameter model trained on only ~215k tokens (roughly 0.005 tokens per parameter, ~4000× below Chinchilla-optimal).
This model has not been evaluated on standard reasoning benchmarks (GSM8K, MMLU, etc.) because:
The numbers below are the only evaluation metrics that are meaningful at this scale:
| Metric | Split | Value |
|---|---|---|
| Cross-entropy loss | train | 0.4533 |
| Perplexity | train | 1.57 |
| Cross-entropy loss | validation (5% held-out) | 7.0868 |
| Perplexity | validation | 1196.1 |
Interpretation: the model has memorized the reasoning style and most of the surface patterns of the chain-of-thought corpus (train perplexity ~1.57 is extremely low for a from-scratch model — close to memorization), but does not generalize to held-out conversations.
import torch
from transformers import AutoTokenizer
# Load tokenizer (reused from Qwen2.5)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B")
if tokenizer.pad_token is None:
tokenizer.pad_token = tokenizer.eos_token
# Load weights
ckpt = torch.load("mini_cot_gpt.pt", map_location="cuda")
config = ckpt["config"]
# Rebuild model (see model.py for the MiniGPT class)
from model import MiniGPT
model = MiniGPT(**config).cuda()
model.load_state_dict(ckpt["model_state"])
model.eval()
# Generate
prompt = tokenizer.apply_chat_template(
[
{"role": "system", "content": "Enable thinking features: INTUITION, COLD START, HOT START"},
{"role": "user", "content": "What is 12 * 7?"},
],
tokenize=False,
add_generation_prompt=True,
)
ids = tokenizer(prompt, return_tensors="pt", add_special_tokens=False).input_ids.cuda()
out = model.generate(ids, max_new_tokens=120, temperature=0.8, top_k=50)
print(tokenizer.decode(out[0], skip_special_tokens=False))
Cosmos-T uses the Qwen2.5 chat template. To activate chain-of-thought reasoning, use a system prompt like:
Enable thinking features: INTUITION, COLD START, HOT START
The model will then produce a <think>...</think> block followed by an answer (when it works at all — see limitations).
MAX_LEN=1028. Long-context behavior is untested.This is the first release in the Cosmos-T series. Planned future variants:
@misc{cosmos-t-80m,
author = {wop},
title = {Cosmos-T-80M: A small from-scratch chain-of-thought Transformer},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/wop/Cosmos-T-80M}
}
wop/XXXXXL-chain-of-thought