ViuAI-40M / README.md
ViuAI's picture
Release ViuAI-40M: 32L UltraDeep (39.29M Total / 18.06M Active / 8192 Vocab)
c2c5af9 verified
|
Raw History Blame Contribute Delete
2.36 kB
---
license: apache-2.0
language:
- en
- hi
tags:
- text-generation
- transformer
- 32-layers
- deepseek-v4
- kimi
- mla
- moe
- muon-optimizer
- hyper-connections
- from-scratch
- research
- viuai
library_name: pytorch
pipeline_tag: text-generation
model-index:
- name: ViuAI-40M
results: []
---
# 🚀 ViuAI-40M (UltraDeep 32-Layer Bilingual MoE)
**An ultra-deep 39.29M (~40M class) parameter MoE language model built from scratch with DeepSeek-V4 MLA, Kimi Fine-Grained MoE, and mHC Hyper-Connections.**
## 📊 Model Specifications
| Hyperparameter | Value | Description |
|---|---|---|
| **Layers (Depth)** | **32** | 32 Sequential Thinking Steps per Token |
| **Total Model Parameters** | **39,294,208 (~39.29M)** | Full knowledge capacity across all 32 layers & experts |
| **Active Parameters per Token** | **18,060,544 (~18.06M)** | 1 Shared + 2 Routed Experts executed per layer |
| **Compute Sparsity** | **54.0%** | True sparse token routing per expert |
| **Memory Footprint (FP32)** | **~149.90 MB** | ~75 MB in FP16/BF16 |
| **Hidden Size ($d_{\text{model}}$)** | **256** | Backbone representation dimension |
| **Attention Heads** | **8** (`head_dim=32`) | Tensor-Core optimized head dimension |
| **Attention Mechanism** | **DeepSeek MLA** | Multi-Head Latent Attention (`q_lora=96`, `kv_lora=64`) |
| **MoE Architecture** | **1 Shared + 8 Routed (Top-2)** | True sparse token dispatch + load-balancing aux loss (`exp_dim=144`) |
| **Vocabulary** | **8,192** | Case-preserving lossless BPE with Weight Tying |
| **Context Length** | **512 tokens** | KV-cached generation supported |
| **Residual Architecture** | **mHC** | Learnable Hyper-Connection residual scaling |
| **Training Optimizer** | **Muon + AdamW** | Newton-Schulz on 2D hidden weights; AdamW on embeddings/1D |
---
## 🚀 Quick Start
```python
import torch
from viuai.model.config import ViuAIConfig
from viuai.model.viuai_model import ViuAIForCausalLM
config = ViuAIConfig()
model = ViuAIForCausalLM(config)
print(f"Total Parameters: {model.count_parameters():,}")
# Output: 39,294,208 (~39.29M)
print(f"Active per Token: {model.count_active_parameters():,}")
# Output: 18,060,544 (~18.06M)
```
---
**Built with ❤️ by [ViuAI](https://huggingface.co/ViuAI)**