-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCBenchmark_results.txt
More file actions
51 lines (44 loc) · 4.8 KB
/
Copy pathCBenchmark_results.txt
File metadata and controls
51 lines (44 loc) · 4.8 KB
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
╔══════════════════════════════════════════════════════════════════════╗
║ QSOFTMAX: Quantum-Inspired Softmax Matrix Ops ║
║ ║
║ C/NEON Implementation ║
╚══════════════════════════════════════════════════════════════════════╝
Configuration:
Head dimension: 128
Iterations: 50
NEON: Enabled
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SeqLen │ Softmax │ QSoftmax │ SM Needle │ QS Needle │
│ (ms) │ (ms) │ Attention │ Attention │
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
128 │ 0.666 │ 0.255 │ 0.496006 │ 0.007141 │
256 │ 1.199 │ 0.717 │ 0.335495 │ 0.003856 │
512 │ 4.712 │ 2.805 │ 0.203552 │ 0.001997 │
1024 │ 19.005 │ 11.317 │ 0.116089 │ 0.001012 │
2048 │ 75.994 │ 45.284 │ 0.061533 │ 0.000508 │
4096 │ 305.468 │ 181.451 │ 0.031691 │ 0.000248 │
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╔══════════════════════════════════════════════════════════════════════╗
║ COMPLEX MATRIX MULTIPLICATION BENCHMARK ║
╚══════════════════════════════════════════════════════════════════════╝
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Size │ Naive (4mm) │ Strassen(3mm) │ Speedup
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
64 │ 0.203 │ 0.140 │ 1.45x
128 │ 2.097 │ 1.380 │ 1.52x
256 │ 21.627 │ 19.282 │ 1.12x
512 │ 199.214 │ 159.800 │ 1.25x
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╔══════════════════════════════════════════════════════════════════════╗
║ ATTENTION SPARSITY ANALYSIS (seq_len=2048) ║
╚══════════════════════════════════════════════════════════════════════╝
│ Softmax │ QSoftmax
────────────────────┼──────────────┼──────────────
Max attention │ 0.061533 │ 0.001224
Top-5 mass │ 0.065726 │ 0.006090
Entropy (bits) │ 10.59 │ 10.45
Non-zero weights │ 2048 │ 1459
Sparsity % │ 0.0% │ 28.8%
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
QSoftmax achieves higher needle attention with natural sparsity.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━