ykae commited on
Commit
e85d709
·
verified ·
1 Parent(s): 99b4b39

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -1
README.md CHANGED
@@ -96,4 +96,15 @@ model = torch.compile(model, mode="max-autotune")
96
  inputs = tokenizer("Monarch matrices are efficiently sparse.", return_tensors="pt").to("cuda")
97
  with torch.no_grad():
98
  outputs = model(**inputs)
99
- print(outputs.logits)
 
 
 
 
 
 
 
 
 
 
 
 
96
  inputs = tokenizer("Monarch matrices are efficiently sparse.", return_tensors="pt").to("cuda")
97
  with torch.no_grad():
98
  outputs = model(**inputs)
99
+ print(outputs.logits)
100
+ ```
101
+
102
+ ## 🧠 The "Memory Paradox" (Read this!)
103
+
104
+ You might notice that while the parameter count is lower (82M vs 110M), the peak VRAM usage during inference can be slightly higher than the baseline.
105
+
106
+ **Why?**
107
+ This is a **software artifact**, not a hardware limitation.
108
+
109
+ * **Math:** Monarch Matrices decompose a dense layer into: $\text{BlockDiag}_1 \to \text{Permutation} \to \text{BlockDiag}_2$.
110
+ * **Solution:** A custom **Fused Triton Kernel** (planned) would fuse these steps, keeping intermediate activations in the GPU's SRAM (L1 Cache). This would drop dynamic VRAM usage significantly below the baseline, matching the FLOPs reduction.