Mythos-From-Scratch (Any-to-Any Architecture & Training Suite)
A complete from-scratch decoder-only Transformer (MythosForCausalLM) and Any-to-Any Multimodal extension (MythosOmniForAnyToAny) built in PyTorch with:
- Modern Architecture: RoPE, RMSNorm, SwiGLU, Grouped-Query Attention (GQA), QK-Norm, Z-Loss stability, and presets from
50mup to100b. - Custom BPE Tokenizer:
train_tokenizer.pywith<|think|>,<|think_low|>,<|think_medium|>,<|think_high|>,<|think_ultra|>,<|context|>, and multimodal tokens. - 4-Stage Training Pipeline:
pretrain.pyβ Multi-GPU DDP (torchrun) pretraining from random weights with WSD schedule & Google Drive auto-resumesft_reasoning.pyβ Masked SFT on<|think|>...<|/think|>reasoning tracesdpo_align.pyβ Direct Preference Optimization alignmenttrain_omni.pyβ Joint Any-to-Any Vision + Audio + Text training (omni_heads.safetensors)
- RAG & Adaptive Thinking Modes:
rag_engine.py+reasoning_engine.py(off,low,medium,high,ultraBest-of-N test-time compute). - Compact
.safetensorsExport:export_compact.py(fp16,bf16,int8).
Note: This repository contains the full architecture, training scripts, and Google Colab notebook (
Mythos_From_Scratch_Colab.ipynb). Open the notebook in Google Colab to run GPU training and generate trained.safetensorsweights.
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support