Spaces:
Configuration error
Configuration error
Update README.md
Browse files
README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
|
| 3 |
# 🐻🔥 Model Rampage
|
| 4 |
|
| 5 |
-
**Building Hardware-Portable, Pure-GEMM Sub-Quadratic LLM Architectures**
|
| 6 |
|
| 7 |
[](https://github.com/martin-kbcc/baretorch)
|
| 8 |
[](https://github.com/martin-kbcc/baretorch-experiments/blob/main/paper.pdf)
|
|
@@ -15,48 +15,95 @@
|
|
| 15 |
### 🌟 About Model Rampage
|
| 16 |
Model Rampage is an independent AI research organization focused on breaking the **custom kernel lock-in** and **long-context memory wall** in modern language models.
|
| 17 |
|
| 18 |
-
|
|
|
|
|
|
|
| 19 |
|
| 20 |
---
|
| 21 |
|
| 22 |
-
### 🚀
|
| 23 |
|
| 24 |
-
|
| 25 |
-
*
|
| 26 |
-
* **[model-rampage/BareTorch-500M-SFT](https://huggingface.co/model-rampage/BareTorch-500M-SFT)**
|
| 27 |
-
*Instruction-tuned alignment checkpoint trained on `smol-smoltalk` ($2\times$ NVIDIA RTX 4090).*
|
| 28 |
|
| 29 |
---
|
| 30 |
|
| 31 |
-
###
|
| 32 |
|
| 33 |
-
* **
|
| 34 |
-
* **12.51x Faster CUDA Decoding (NVIDIA RTX 4090):** Reaches **164.49 tok/s** at 32k context vs **13.15 tok/s** for standard attention.
|
| 35 |
-
* **80.6% VRAM Footprint Savings:** Replaces linear KV-caches with constant-sized recurrent state updates, running 32k prompt generation seamlessly where standard baselines crash with Out-Of-Memory (OOM) errors.
|
| 36 |
|
| 37 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
-
|
| 40 |
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
---
|
| 50 |
|
| 51 |
### 🔗 Resources & Citation
|
| 52 |
|
| 53 |
-
|
| 54 |
-
|
| 55 |
|
| 56 |
```bibtex
|
| 57 |
@article{kovacevic2026baretorch,
|
| 58 |
title={BareTorch: Challenging State-of-The-Art Sequence Mixing Topologies via Kernel-Free, Pure GEMM-Compliant Architectures},
|
| 59 |
author={Kovacevic Buvinic, Martin Ignacio},
|
| 60 |
journal={BareTorch Framework Laboratory Technical Report},
|
| 61 |
-
year={2026}
|
|
|
|
| 62 |
}
|
|
|
|
|
|
| 2 |
|
| 3 |
# 🐻🔥 Model Rampage
|
| 4 |
|
| 5 |
+
**Building Hardware-Portable, Pure-GEMM Sub-Quadratic LLM Architectures for the Edge**
|
| 6 |
|
| 7 |
[](https://github.com/martin-kbcc/baretorch)
|
| 8 |
[](https://github.com/martin-kbcc/baretorch-experiments/blob/main/paper.pdf)
|
|
|
|
| 15 |
### 🌟 About Model Rampage
|
| 16 |
Model Rampage is an independent AI research organization focused on breaking the **custom kernel lock-in** and **long-context memory wall** in modern language models.
|
| 17 |
|
| 18 |
+
While existing sub-quadratic architectures (such as Mamba-2, RWKV, and Gated DeltaNet) rely on hardware-specific CUDA or Triton kernels that fail to port cleanly to consumer edge devices, our flagship framework—**BareTorch**—formulates sub-quadratic sequence mixers (like **CS-LRAD**) using **100% standard matrix multiplications (GEMMs)**.
|
| 19 |
+
|
| 20 |
+
Because every chip on earth already accelerates matrix multiplication natively, BareTorch delivers sub-quadratic execution scaling and fixed-size recurrent state updates **out-of-the-box across Apple Silicon (MLX), NVIDIA GPUs (CUDA), AMD/Intel GPUs, WebGPU, and Mobile NPUs.**
|
| 21 |
|
| 22 |
---
|
| 23 |
|
| 24 |
+
### 🚀 Flagship Model
|
| 25 |
|
| 26 |
+
- **[model-rampage/BareTorch-2.5B-Base](https://huggingface.co/model-rampage/BareTorch-2.5B-Base)**
|
| 27 |
+
*2.53B Parameter 24-layer 3:1 CS-LRAD Hybrid (`18 CS-LRAD + 6 Transformer GQA`) pre-trained on **75 Billion Tokens** (8x NVIDIA H100 SXM5) via top-4 logit knowledge distillation from `Qwen/Qwen3.5-9B` and WSD curriculum annealing.*
|
|
|
|
|
|
|
| 28 |
|
| 29 |
---
|
| 30 |
|
| 31 |
+
### 📊 Zero-Shot Downstream Benchmarks (`lm-evaluation-harness`)
|
| 32 |
|
| 33 |
+
Trained on **75 Billion tokens**, `BareTorch-2.5B-Base` outperforms foundational models trained on 4x more tokens (**300 Billion tokens**) across all 7 standard zero-shot benchmarks, and outperforms `Qwen3.5-2B-Base` on physical commonsense (**PIQA: 74.81%**) and multi-step fact QA (**OpenBookQA: 39.40%**):
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
| Benchmark Task | Metric | **BareTorch-2.5B-Base** *(75B Tokens)* | **Pythia-2.8B** *(300B Tokens)* | **Mamba-1.4B** *(300B Tokens)* | **Qwen3.5-2B-Base** |
|
| 36 |
+
| :--- | :---: | :---: | :---: | :---: | :---: |
|
| 37 |
+
| **BoolQ (Reading Comprehension)** | Accuracy | **66.12%** | 64.10% | 63.00% | 69.72% |
|
| 38 |
+
| **PIQA (Physical Commonsense)** | Acc (Norm) | **74.81%** | 74.10% | 73.90% | 74.65% |
|
| 39 |
+
| **HellaSwag (Commonsense Reasoning)** | Acc (Norm) | **59.86%** | 59.40% | 59.00% | 65.90% |
|
| 40 |
+
| **WinoGrande (Coreference Resolution)** | Accuracy | **60.54%** | 58.20% | 61.40% | 65.51% |
|
| 41 |
+
| **ARC-Easy (Science QA)** | Acc (Norm) | **65.91%** | 59.10% | 65.50% | 71.30% |
|
| 42 |
+
| **ARC-Challenge (Hard Science QA)** | Acc (Norm) | **38.48%** | 32.90% | 32.90% | 45.48% |
|
| 43 |
+
| **OpenBookQA (Multi-Step Fact QA)** | Acc (Norm) | **39.40%** | 36.80% | 37.00% | 38.20% |
|
| 44 |
+
| **7-Task Zero-Shot Average** | Mean | **57.87%** | 54.94% | 56.10% | 61.54% |
|
| 45 |
|
| 46 |
+
---
|
| 47 |
|
| 48 |
+
### ⚡ Hardware Speed, TTFT & Memory Profiling (512 to 32,768 Tokens)
|
| 49 |
+
|
| 50 |
+
By replacing 75% of growing Transformer KV-caches with compact, fixed-size low-rank associative states (`rank = 16`, `chunk_size = 32`), **BareTorch-2.5B-Base** eliminates memory bandwidth bottlenecks on both edge laptops and local workstations:
|
| 51 |
+
|
| 52 |
+
- **3.60x Faster Edge Prefill on Apple Silicon (M1 MacBook Pro - Native MLX):** Processes 32,768 tokens in **30.6 seconds (1,070.3 tok/s)** vs **110.2 seconds (297.5 tok/s)** for `Qwen3.5-2B` on PyTorch MPS, peaking at **1,326.7 tok/s** at 4,096 context with zero custom Metal shaders.
|
| 53 |
+
- **1.36x Faster Edge Decoding on Apple Silicon (M1 MacBook Pro):** Sustains **26.40 tok/s** at 32k context (and **35.78 tok/s** at 512 context) within a compact **5.93 GB RAM** footprint.
|
| 54 |
+
- **44% Faster Workstation Decoding (NVIDIA CUDA):** Generates tokens at **65.4 tok/s** across all context windows compared to **45.6 tok/s** for `Qwen3.5-2B-Base`.
|
| 55 |
+
|
| 56 |
+
#### 1. Apple Silicon Edge Benchmark (MacBook Pro M1 — Native MLX FP16)
|
| 57 |
+
|
| 58 |
+
| Context Length | Model (Backend) | TTFT (ms) | Prefill Throughput | Decode Speed | Peak RAM |
|
| 59 |
+
| :---: | :--- | :---: | :---: | :---: | :---: |
|
| 60 |
+
| **512** | **BareTorch-2.5B (MLX Native)** | **416.39 ms** | **1,229.62 tok/s** | **35.78 tok/s** | 4.80 GB |
|
| 61 |
+
| 512 | Qwen3.5-2B (PyTorch MPS) | 1,192.24 ms | 429.44 tok/s | 27.05 tok/s | 3.54 GB |
|
| 62 |
+
| **1,024** | **BareTorch-2.5B (MLX Native)** | **773.78 ms** | **1,323.37 tok/s** | **35.67 tok/s** | 4.87 GB |
|
| 63 |
+
| 1,024 | Qwen3.5-2B (PyTorch MPS) | 2,384.76 ms | 429.39 tok/s | 26.76 tok/s | 3.55 GB |
|
| 64 |
+
| **2,048** | **BareTorch-2.5B (MLX Native)** | **1,549.67 ms** | **1,321.58 tok/s** | **34.51 tok/s** | 5.03 GB |
|
| 65 |
+
| 2,048 | Qwen3.5-2B (PyTorch MPS) | 4,760.31 ms | 430.22 tok/s | 26.57 tok/s | 3.55 GB |
|
| 66 |
+
| **4,096** | **BareTorch-2.5B (MLX Native)** | **3,087.39 ms** | **1,326.69 tok/s** | **32.78 tok/s** | 5.31 GB |
|
| 67 |
+
| 4,096 | Qwen3.5-2B (PyTorch MPS) | 9,630.56 ms | 425.31 tok/s | 26.24 tok/s | 3.58 GB |
|
| 68 |
+
| **8,192** | **BareTorch-2.5B (MLX Native)** | **6,360.21 ms** | **1,288.01 tok/s** | **32.56 tok/s** | 5.42 GB |
|
| 69 |
+
| 8,192 | Qwen3.5-2B (PyTorch MPS) | 19,937.32 ms | 410.89 tok/s | 25.71 tok/s | 3.63 GB |
|
| 70 |
+
| **16,384** | **BareTorch-2.5B (MLX Native)** | **13,603.16 ms** | **1,204.43 tok/s** | **30.54 tok/s** | 5.59 GB |
|
| 71 |
+
| 16,384 | Qwen3.5-2B (PyTorch MPS) | 43,497.17 ms | 376.67 tok/s | 22.39 tok/s | 3.72 GB |
|
| 72 |
+
| **32,768** | **BareTorch-2.5B (MLX Native)** | **30,615.66 ms** | **1,070.30 tok/s** | **26.40 tok/s** | 5.93 GB |
|
| 73 |
+
| 32,768 | Qwen3.5-2B (PyTorch MPS) | 110,152.64 ms | 297.48 tok/s | 19.45 tok/s | 3.92 GB |
|
| 74 |
+
|
| 75 |
+
#### 2. Local NVIDIA GPU Workstation Benchmark (CUDA — BF16)
|
| 76 |
+
|
| 77 |
+
| Context Length | Model | TTFT (ms) | Prefill Throughput | Decode Speed | Peak VRAM |
|
| 78 |
+
| :---: | :--- | :---: | :---: | :---: | :---: |
|
| 79 |
+
| **512** | **BareTorch-2.5B (Compiled)** | **18.22 ms** | **28,108.3 tok/s** | **66.17 tok/s** | 4.77 GB |
|
| 80 |
+
| 512 | Qwen3.5-2B-Base | 39.93 ms | 12,821.2 tok/s | 45.53 tok/s | 4.52 GB |
|
| 81 |
+
| **1,024** | **BareTorch-2.5B (Compiled)** | **27.95 ms** | **36,631.8 tok/s** | **65.45 tok/s** | 4.81 GB |
|
| 82 |
+
| 1,024 | Qwen3.5-2B-Base | 38.75 ms | 26,425.4 tok/s | 45.29 tok/s | 4.56 GB |
|
| 83 |
+
| **2,048** | **BareTorch-2.5B (Compiled)** | **50.46 ms** | **40,583.0 tok/s** | **65.41 tok/s** | 4.88 GB |
|
| 84 |
+
| 2,048 | Qwen3.5-2B-Base | 49.93 ms | 41,020.3 tok/s | 45.69 tok/s | 4.64 GB |
|
| 85 |
+
| **4,096** | **BareTorch-2.5B (Compiled)** | **103.03 ms** | **39,756.7 tok/s** | **65.39 tok/s** | 5.03 GB |
|
| 86 |
+
| 4,096 | Qwen3.5-2B-Base | 103.54 ms | 39,558.0 tok/s | 45.70 tok/s | 4.81 GB |
|
| 87 |
+
| **8,192** | **BareTorch-2.5B (Compiled)** | **219.34 ms** | **37,348.6 tok/s** | **65.36 tok/s** | 5.34 GB |
|
| 88 |
+
| 8,192 | Qwen3.5-2B-Base | 231.62 ms | 35,368.6 tok/s | 45.57 tok/s | 5.14 GB |
|
| 89 |
+
| **16,384** | **BareTorch-2.5B (Compiled)** | **461.37 ms** | **35,511.6 tok/s** | **66.15 tok/s** | 5.94 GB |
|
| 90 |
+
| 16,384 | Qwen3.5-2B-Base | 487.32 ms | 33,620.6 tok/s | 46.17 tok/s | 5.80 GB |
|
| 91 |
+
| **32,768** | **BareTorch-2.5B (Compiled)** | **995.40 ms** | **32,919.4 tok/s** | **63.79 tok/s** | 7.14 GB |
|
| 92 |
+
| 32,768 | Qwen3.5-2B-Base | 1,044.72 ms | 31,365.4 tok/s | 45.82 tok/s | 7.12 GB |
|
| 93 |
|
| 94 |
---
|
| 95 |
|
| 96 |
### 🔗 Resources & Citation
|
| 97 |
|
| 98 |
+
- **GitHub Repository (PyTorch & MLX Engine):** [github.com/martin-kbcc/baretorch](https://github.com/martin-kbcc/baretorch)
|
| 99 |
+
- **Technical Whitepaper:** [Read Technical Report](https://github.com/martin-kbcc/baretorch-experiments/blob/main/paper.pdf)
|
| 100 |
|
| 101 |
```bibtex
|
| 102 |
@article{kovacevic2026baretorch,
|
| 103 |
title={BareTorch: Challenging State-of-The-Art Sequence Mixing Topologies via Kernel-Free, Pure GEMM-Compliant Architectures},
|
| 104 |
author={Kovacevic Buvinic, Martin Ignacio},
|
| 105 |
journal={BareTorch Framework Laboratory Technical Report},
|
| 106 |
+
year={2026},
|
| 107 |
+
url={[https://github.com/martin-kbcc/baretorch](https://github.com/martin-kbcc/baretorch)}
|
| 108 |
}
|
| 109 |
+
```
|