File size: 2,363 Bytes
c2c5af9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | ---
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)**
|