rolvai commited on
Commit
729459f
·
verified ·
1 Parent(s): 44d2fe2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -150
README.md CHANGED
@@ -1,154 +1,47 @@
1
- ROLV Primitive©
2
- Sparse matrix operator for Mixture-of-Experts AI inference.
3
- 5–103× faster than cuBLAS/MKL. Up to 99% energy reduction. Bit-identical outputs.
4
- Test any HuggingFace MoE model — no upload required.
5
- ![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.19221455.svg)
6
- ![License](https://img.shields.io/badge/license-Source%20Available-blue)
7
- [![Hardware](https://img.shields.io/badge/hardware-NVIDIA%20%7C%20AMD%20%7C%20Intel%20%7C%20ARM%20%7C%20CPU-green)]()
8
- [![Validated](https://img.shields.io/badge/validation-University%20of%20Miami%20Frost%20Institute-orange)]()
9
  ---
10
- What is this
11
- Modern frontier AI models — DeepSeek-V3, Llama-4, Kimi-K2, Qwen3, Mixtral — use
12
- Mixture-of-Experts (MoE) architecture. Each token activates only a small fraction
13
- of the model's experts (typically 8 of 256 in DeepSeek-V3). The inactive experts
14
- produce zero outputs. Standard libraries — NVIDIA cuBLAS, Intel MKL, cuSPARSE —
15
- multiply those zeros anyway.
16
- ROLV Primitive© skips them. Outputs are mathematically identical. The speedup is real.
17
- The INT_MAX finding
18
- cuSPARSE cannot benchmark the full DeepSeek-V3 or Kimi-K2 stacked expert matrix.
19
- The matrix is 256 experts × 2048 × 7168 = 3,758,489,600 elements, which exceeds
20
- `INT_MAX` (2,147,483,647). cuSPARSE overflows silently and returns a submatrix result.
21
- Every published cuSPARSE benchmark on these models is reporting a fraction of the
22
- full computation. ROLV Primitive© handles the full matrix natively.
23
- Published finding: doi.org/10.5281/zenodo.19221455
24
- ---
25
- Verified results
26
- 482 SHA-256 verified cases on real downloaded model weights, 7 hardware platforms.
27
- Independent validation by the University of Miami Frost Institute for Data
28
- Science and Computing is currently underway.
29
- Model Layer Sparsity vs dense vs cuSPARSE
30
- DeepSeek-V3 gate_proj 87.5% 5.58× overflow*
31
- Llama-4-Scout gate_proj 92.2% 9.54× 103×
32
- Kimi-K2 gate_proj 93.8% 8.97× overflow*
33
- Mixtral-8×22B gate_proj 87.5% 5.39× 109×
34
- Mixtral-8×7B gate_proj 87.5% 5.21× 76×
35
- OLMoE-1B-7B gate_proj 87.5% 5.58× confirmed
36
- OLMoE-1B-7B up_proj 87.5% 5.74× confirmed
37
- OLMoE-1B-7B down_proj 87.5% 5.67× confirmed
38
- Peak (99% sparsity) down_proj 99% 46× —
39
- CPU (Intel i7, Windows, 8 threads): 28/28 PASS, ATOL=0.0000, all real weights.
40
- ARM (Google Axion): 5.12× vs MKL confirmed.
41
- cuSPARSE INT_MAX overflow — see finding above.
42
- ---
43
- Quick start
44
- Step 1 — Download the wheel for your platform
45
- From Releases:
46
- Platform Python Wheel filename
47
- Windows 64-bit 3.13 `rolvprimitive-1.0.0-cp313-none-win_amd64.whl`
48
- Windows 64-bit 3.11 `rolvprimitive-1.0.0-cp311-none-win_amd64.whl`
49
- Linux x86_64 3.12 `rolvprimitive-1.0.0-cp312-cp312-linux_x86_64.whl`
50
- Any / Anaconda any `rolvprimitive-1.0.0-py3-none-any.whl`
51
- Step 2 — Install
52
- ```bash
53
- pip install rolvprimitive-1.0.0-cp313-none-win_amd64.whl # Windows py3.13
54
- pip install rolvprimitive-1.0.0-cp312-cp312-linux_x86_64.whl # Linux py3.12
55
- pip install rolvprimitive-1.0.0-py3-none-any.whl # Anaconda / any
56
- ```
57
- Step 3 — Run the benchmark
58
- The script downloads model weights directly from HuggingFace to your own machine.
59
- Nothing is uploaded. You benchmark on your own hardware.
60
  ```bash
61
- pip install torch scipy psutil transformers accelerate huggingface_hub einops tqdm
62
-
63
- # DeepSeek-V3 shapes — no download, uses real dimensions (fastest start):
64
- python scripts/benchmark.py --model deepseek-shapes
65
-
66
- # OLMoE real weights — ~7 GB download, CPU or GPU:
67
- python scripts/benchmark.py --model olmoe
68
-
69
- # Mixtral-8x7B — ~26 GB, GPU recommended:
70
- python scripts/benchmark.py --model mixtral-8x7b
71
-
72
- # Any HuggingFace MoE model by ID:
73
- python scripts/benchmark.py --model mistralai/Mixtral-8x22B-v0.1
74
-
75
- # CPU only:
76
- python scripts/benchmark.py --model olmoe --device cpu
77
-
78
- # Custom iterations and batch size:
79
- python scripts/benchmark.py --model olmoe --iterations 2000 --batch 2000
80
-
81
- # Multiple models:
82
- python scripts/benchmark.py --model deepseek-shapes,olmoe
83
  ```
84
- Available model shortcuts
85
- Shortcut Model Download
86
- `deepseek-shapes` DeepSeek-V3 real dimensions (synthetic weights) none
87
- `olmoe` allenai/OLMoE-1B-7B-0924 ~7 GB
88
- `mixtral-8x7b` mistralai/Mixtral-8x7B-v0.1 ~26 GB
89
- `mixtral-8x22b` mistralai/Mixtral-8x22B-v0.1 ~87 GB
90
- `phi35moe` microsoft/Phi-3.5-MoE-instruct ~16 GB
91
- `deepseek-moe` deepseek-ai/deepseek-moe-16b-base ~32 GB
92
- `qwen2moe` Qwen/Qwen1.5-MoE-A2.7B ~6 GB
93
- `jamba` ai21labs/Jamba-1.5-Mini ~24 GB
94
- `auto` DeepSeek shapes + OLMoE ~7 GB
95
- any HF model ID e.g. `mistralai/Mistral-7B-v0.1` varies
96
- ---
97
- What the benchmark measures
98
- Per ROLV Benchmark Harness Prerequisites & Standards v2.0:
99
- Hardware detection banner — CPU, GPU, RAM, VRAM, backend, energy source
100
- 4 SHA-256 hashes per case — W, X, baseline output, ROLV output
101
- 4 error metrics — max/mean absolute and relative error (raw FP32)
102
- ATOL correctness check — column-normalised, threshold 0.05
103
- Perturbation test — proves live computation, not a cached result
104
- Speed — build_ms, ms/iter, speedup× and %, vs both dense and sparse
105
- Energy — joules and watts via pynvml (NVIDIA), pyrsmi (AMD), or proxy
106
- FLOPs reduction, tok/s gain, TTFT reduction — all vs vendor baseline
107
- ROLVswitch™ strategy printed per case
108
- RSMT™ threshold printed per case
109
- CSV output — all results saved to `rolv_results.csv`
110
- Disk cleanup after each model — no disk exhaustion
111
- ---
112
- Use in your own code
113
- ```python
114
- import torch
115
- from rolvprimitive import ROLVHybrid
116
-
117
- # Your MoE expert weight matrix — any source
118
- W = your_expert_weight # shape: (out_features, in_features)
119
-
120
- # Build once at model load time — ROLVswitch™ auto-selects strategy
121
- op = ROLVHybrid(W, batch=1000)
122
- print(op._strategy) # see which path was selected
123
-
124
- # Use at inference time
125
- out = op.apply(X) # X: (batch, in_features) — identical to W @ X.T
126
- ```
127
- ---
128
- Post your results
129
- Run the benchmark and share your output. Include your hardware, model, and numbers.
130
- Reddit: r/LocalLLaMA · r/MachineLearning
131
- HuggingFace: huggingface.co/rolv-ai
132
- GitHub Discussions: open a thread here
133
- ---
134
- Citation
135
- ```bibtex
136
- @misc{heggenhougen2026rolv,
137
- title = {ROLV Primitive: A Sparse Matrix Operator for Mixture-of-Experts Inference},
138
- author = {Heggenhougen, Rolv Eitrem},
139
- year = {2026},
140
- doi = {10.5281/zenodo.19221455},
141
- url = {https://doi.org/10.5281/zenodo.19221455}
142
- }
143
- ```
144
- ---
145
- License
146
- Free for personal and research use. Commercial use requires a license.
147
- Commercial use includes inference APIs, cloud services, enterprise software,
148
- and any business deployment.
149
- Commercial licensing: rolv@rolv.ai | rolv.ai
150
  ---
151
- ROLV LLC · 445 NE 12th Ave · Fort Lauderdale FL 33301
152
- ROLV Primitive© · RSMT™ · ROLVswitch™ · 3 Patents Pending
153
- Copyright © 2025-2026 ROLV LLC · All rights reserved
154
- rolv@rolv.ai · rolv.ai
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ROLV Primitive© — Benchmark Space
2
+ Drop-in replacement for `torch.mm` — 2× to 25× faster on MoE inference workloads.
3
+ Zero code changes. Mathematically exact output. Runs on your own hardware.
 
 
 
 
 
4
  ---
5
+ Request a Free Benchmark Token
6
+ This Space shows live signed benchmark results from independent testers.
7
+ To run the benchmark on your own GPU or laptop, email rolv@rolv.ai with your name and institution. You will receive a token within 24 hours and can then run:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  ```bash
9
+ # GPU
10
+ docker run --gpus all \
11
+ -e ROLV_TOKEN=your_token \
12
+ -e ROLV_KEY_SERVER=https://rolv-keys.rolv-bb7.workers.dev \
13
+ rolvai/rolv-benchmark:latest
14
+
15
+ # CPU / Laptop (no GPU needed)
16
+ docker run \
17
+ -e ROLV_TOKEN=your_token \
18
+ -e ROLV_KEY_SERVER=https://rolv-keys.rolv-bb7.workers.dev \
19
+ rolvai/rolv-benchmark:latest
20
+
21
+ # Specific HuggingFace model
22
+ docker run --gpus all \
23
+ -e ROLV_TOKEN=your_token \
24
+ -e ROLV_KEY_SERVER=https://rolv-keys.rolv-bb7.workers.dev \
25
+ rolvai/rolv-benchmark:latest --model olmoe
 
 
 
 
 
26
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  ---
28
+ Benchmark Results
29
+ Model Sparsity GPU speedup CPU speedup
30
+ DeepSeek-V3 shape 96.9% 7.15× vs cuBLAS 24.9× vs MKL
31
+ OLMoE-1B-7B 87.5% 2.49× vs cuBLAS 6.63× vs MKL
32
+ Kimi-K2 shape 97.9% 8.74× vs cuBLAS —
33
+ Mistral-7B pruned 95.0% — 21.45× vs MKL
34
+ Published: Zenodo DOI 10.5281/zenodo.19221455
35
+ ---
36
+ Why This Matters for MoE Models
37
+ MoE models route each token to only k of N expert networks. The inactive expert weights are zero — natural sparsity of (N-k)/N. ROLV detects and exploits this automatically without any changes to your model or code.
38
+ OLMoE (64 experts, top-8) → 87.5% natural sparsity
39
+ DeepSeek-V3 (256 experts, top-8) → 96.9% natural sparsity
40
+ Mixtral 8x7B (8 experts, top-2) → 75% natural sparsity
41
+ ---
42
+ Links
43
+ GitHub: github.com/rolvai/rolv-primitive
44
+ Docker Hub: hub.docker.com/r/rolvai/rolv-benchmark
45
+ Published results: doi.org/10.5281/zenodo.19221455
46
+ Contact: rolv@rolv.ai
47
+ ROLV Primitive© · RSMT™ · ROLVswitch™ · 3 Patents Pending · ROLV LLC