-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
213 lines (195 loc) · 9.11 KB
/
Copy pathindex.html
File metadata and controls
213 lines (195 loc) · 9.11 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Axiom - Deep Learning Framework in C</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header class="site-header">
<div class="header-inner">
<a href="index.html" class="header-logo">Axiom<span>.</span></a>
<nav class="header-nav">
<a href="quickstart.html">Quickstart</a>
<a href="architecture.html">Architecture</a>
<a href="api-tensor.html">API</a>
<a href="guide-training.html">Guides</a>
<a href="https://github.com/neofytr/Axiom" target="_blank">GitHub</a>
</nav>
</div>
</header>
<main class="landing-page">
<section class="hero">
<h1>Axiom</h1>
<p class="tagline">Deep learning in C. No dependencies. No compromises.</p>
<div class="hero-buttons">
<a href="quickstart.html" class="btn btn-primary">Get Started</a>
<a href="https://github.com/neofytr/Axiom" class="btn btn-secondary" target="_blank">GitHub</a>
</div>
</section>
<section class="stats-bar">
<div class="stat-item">
<span class="stat-value">1.78x</span>
<span class="stat-label">Faster GPU training vs TensorFlow</span>
</div>
<div class="stat-item">
<span class="stat-value">2.3x</span>
<span class="stat-label">Faster inference on CPU</span>
</div>
<div class="stat-item">
<span class="stat-value">Zero</span>
<span class="stat-label">External dependencies</span>
</div>
<div class="stat-item">
<span class="stat-value">< 100KB</span>
<span class="stat-label">Inference binary on ARM</span>
</div>
</section>
<section class="section">
<h2 class="section-title">Benchmarks</h2>
<p class="section-subtitle">Same model, same dataset, same hardware. No cherry-picking.</p>
<h3 style="margin-bottom: 12px; color: #F0F2F4; font-size: 15px; font-weight: 600;">GPU Training (RTX 3050, 575K params, MNIST 60K, 10 epochs)</h3>
<table>
<thead>
<tr>
<th>Framework</th>
<th>Time / Epoch</th>
<th>Throughput</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Axiom GPU</strong></td>
<td><strong>0.185s</strong></td>
<td><strong>323K samples/s</strong></td>
</tr>
<tr>
<td>TensorFlow GPU</td>
<td>0.330s</td>
<td>~182K samples/s</td>
</tr>
</tbody>
</table>
<h3 style="margin-top: 32px; margin-bottom: 12px; color: #F0F2F4; font-size: 15px; font-weight: 600;">CPU Training (MNIST, 60K samples, Adam, batch 256)</h3>
<table>
<thead>
<tr>
<th>Model Size</th>
<th>x86 (EPYC, 4 threads)</th>
<th>ARM (Graviton3, 4 threads)</th>
</tr>
</thead>
<tbody>
<tr>
<td>12.6M params</td>
<td><strong>Axiom 69s</strong> / TF 87s (1.25x)</td>
<td>-</td>
</tr>
<tr>
<td>1.46M params</td>
<td><strong>Axiom 16s</strong> / TF 17s</td>
<td><strong>Axiom 16s</strong> / TF 20s (1.21x)</td>
</tr>
</tbody>
</table>
<h3 style="margin-top: 32px; margin-bottom: 12px; color: #F0F2F4; font-size: 15px; font-weight: 600;">Inference (1.46M params, batch 256, 1000 forward passes)</h3>
<table>
<thead>
<tr>
<th>Metric</th>
<th>Axiom</th>
<th>TensorFlow</th>
</tr>
</thead>
<tbody>
<tr>
<td>Throughput</td>
<td><strong>51,226 img/s</strong></td>
<td>22,185 img/s</td>
</tr>
<tr>
<td>Per batch latency</td>
<td><strong>4.99ms</strong></td>
<td>11.54ms</td>
</tr>
</tbody>
</table>
</section>
<section class="section">
<h2 class="section-title">What you get</h2>
<p class="section-subtitle">Everything needed to train and deploy neural networks. Nothing you don't need.</p>
<div class="feature-grid">
<div class="feature-card">
<span class="feature-icon">0</span>
<h3>Zero Dependencies</h3>
<p>No BLAS, no Python, no package manager. The C compiler is the only tool you need. Builds in seconds on any platform.</p>
</div>
<div class="feature-card">
<span class="feature-icon">d</span>
<h3>Reverse-Mode Autograd</h3>
<p>Automatic differentiation that records a computation graph and backpropagates through it. Slab-allocated grad nodes, arena temporaries, zero malloc overhead per op.</p>
</div>
<div class="feature-card">
<span class="feature-icon">*</span>
<h3>BLIS-Style GEMM</h3>
<p>Tiled matrix multiply with micro-kernels sized to the register file. 14x32 on AVX-512, 6x16 on AVX2, 8x12 on NEON. Cache-tuned at startup.</p>
</div>
<div class="feature-card">
<span class="feature-icon">+</span>
<h3>Op Fusion</h3>
<p>Dense+ReLU fused into a single kernel. Cross-entropy backward in one SIMD pass. MatMul+Bias+ReLU without materializing intermediates.</p>
</div>
<div class="feature-card">
<span class="feature-icon">e</span>
<h3>Embedded Ready</h3>
<p>Inference binary under 100KB on ARM. Baremetal profile with no stdio, no heap, no threads. Runs on Cortex-M class hardware.</p>
</div>
<div class="feature-card">
<span class="feature-icon">G</span>
<h3>CUDA Backend</h3>
<p>GPU support via cuBLAS GEMM, fused element-wise kernels, and explicit device memory management. Same training code, just flip a flag.</p>
</div>
</div>
</section>
<section class="section">
<h2 class="section-title">What it looks like</h2>
<p class="section-subtitle">A complete training loop in a few lines of C.</p>
<div class="code-section">
<pre><code><span class="pp">#include</span> <span class="str">"axiom/axiom.h"</span>
<span class="typ">int</span> <span class="fn">main</span>(<span class="typ">void</span>) {
<span class="fn">ax_init</span>();
<span class="cmt">// build a 784 -> 128 -> 10 classifier</span>
<span class="typ">ax_layer_t</span> *net = <span class="fn">ax_sequential_create</span>();
<span class="fn">ax_sequential_add</span>(net, <span class="fn">ax_dense_create</span>(<span class="num">784</span>, <span class="num">128</span>, <span class="num">true</span>));
<span class="fn">ax_sequential_add</span>(net, <span class="fn">ax_relu_layer_create</span>());
<span class="fn">ax_sequential_add</span>(net, <span class="fn">ax_dense_create</span>(<span class="num">128</span>, <span class="num">10</span>, <span class="num">true</span>));
<span class="typ">ax_model_t</span> *m = <span class="fn">ax_model_create</span>(net);
<span class="typ">ax_optimizer_t</span> *opt = <span class="fn">ax_adam_create</span>(
m->params, m->n_params,
<span class="num">1e-3f</span>, <span class="num">0.9f</span>, <span class="num">0.999f</span>, <span class="num">1e-8f</span>, <span class="num">0</span>);
<span class="fn">ax_model_compile</span>(m, opt, ax_cross_entropy_loss);
<span class="cmt">// train</span>
<span class="kw">for</span> (<span class="typ">int</span> i = <span class="num">0</span>; i < <span class="num">1000</span>; i++) {
<span class="typ">float</span> loss = <span class="fn">ax_model_train_step</span>(m, train_x, train_y);
<span class="kw">if</span> (i % <span class="num">100</span> == <span class="num">0</span>) printf(<span class="str">"epoch %d loss %.4f\n"</span>, i, loss);
}
<span class="fn">ax_model_save</span>(m, <span class="str">"model.axm"</span>);
<span class="fn">ax_model_destroy</span>(m);
<span class="fn">ax_shutdown</span>();
}</code></pre>
</div>
</section>
</main>
<footer class="site-footer">
<div class="footer-links">
<a href="quickstart.html">Quickstart</a>
<a href="architecture.html">Architecture</a>
<a href="api-tensor.html">API Reference</a>
<a href="guide-training.html">Guides</a>
<a href="https://github.com/neofytr/Axiom" target="_blank">GitHub</a>
</div>
<p>Axiom is MIT licensed.</p>
</footer>
</body>
</html>