Qwen2.5-0.5B Topo-Governed CBP (WikiText)

This repository hosts a specialized instantiation of the Qwen2.5-0.5B architecture governed by the Topo-CBP (Continual Backpropagation) framework. By decomposing the parameter manifold into an invariant prime coordinate bedrock and an adaptive plastic subspace, this model achieves absolute zero catastrophic forgetting during continuous streaming fine-tuning.

FULL CODE: https://github.com/frank-morales2020/AST/blob/main/TOPO_CBP0_MODEL.ipynb

Architectural Specifications

  • Base Model: Qwen/Qwen2.5-0.5B
  • Governing Framework: Topo-CBP Dual-Phase Topological Governor
  • Prime Coordinate Ring ($\mathcal{P}$): Indices {2, 3, 5, 7, 11, 13}
  • Euler Attenuation Factor ($\Lambda$): 0.9785142874
  • Training Corpus: Salesforce/wikitext (wikitext-2-raw-v1 streaming split)
  • Execution Seed: 123 (Deterministic reproducible pipeline)

Dual-Phase Topological Governor

  1. Pre-Optimizer Step: Forcibly projects gradients across the prime coordinate ring to zero ($\nabla_{\mathcal{P}}\mathcal{L} = 0$), preventing gradient-induced drift.
  2. Post-Optimizer Step: Bitwise hard-clamps the prime coordinate weights back to the cached anchor_bedrock, neutralizing AdamW decoupled weight decay erosion.

Cryptographic Bare-Metal Verification

The integrity of the invariant bedrock is monitored in real-time via truncated SHA-256 state hashing of the raw embedding tensor bytes.

  • Locked Anchor Hash: eb49aaf4e51888e1
  • Measured Drift Telemetry: 0.0000000000e+00

Quickstart: Loading & Verification

import hashlib
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from huggingface_hub import hf_hub_download

repo_id = "frankmorales2020/qwen2.5-0.5b-topo-governed-cbp-wikitext"
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id).to(device)

# Load topological bedrock state
bedrock_path = hf_hub_download(repo_id=repo_id, filename="topo_bedrock_state.pt")
bedrock_state = torch.load(bedrock_path, map_location=device)

anchor_bedrock = bedrock_state["anchor_bedrock"]
prime_indices = bedrock_state["prime_indices"]
expected_hash = bedrock_state["initial_hash"]

# Verify structural interlock
embed_weight = model.get_input_embeddings().weight
current_anchors = embed_weight[prime_indices]
drift = torch.norm(current_anchors - anchor_bedrock).item()

raw_bytes = current_anchors.detach().to(torch.float32).cpu().contiguous().numpy().tobytes()
current_hash = hashlib.sha256(raw_bytes).hexdigest()[:16]

print(f"Hash Match: {current_hash == expected_hash} | Measured Drift: {drift:.10e}")

Citation & Acknowledgments

Developed by Sovereign Machine Laboratory (SOMALA). Built on rigorous number-theoretic invariants to ensure deterministic cognitive engineering and permanent structural stability across streaming model updates.


Downloads last month
42
Safetensors
Model size
0.5B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for frankmorales2020/qwen2.5-0.5b-topo-governed-cbp-wikitext

Finetuned
(754)
this model