File size: 20,902 Bytes
576ab03 df24c3c 576ab03 df24c3c 576ab03 df24c3c 576ab03 df24c3c 576ab03 df24c3c 576ab03 052f4b6 576ab03 | 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 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pico-Type — Tiny, Byte-Level Content Classifier (1.5M params, 98.3% text-lang accuracy)</title>
<meta name="description" content="Pico-Type is a 1.5M-parameter byte-level multi-head classifier that identifies code language, content type, and more from raw bytes — no parsing needed. 98.3% text-lang accuracy, ONNX export, open source." />
<meta name="keywords" content="pico-type, byte-level classifier, content classification, machine learning, tiny model, open source, code language detection, multi-head classifier" />
<meta property="og:title" content="Pico-Type — Tiny Byte-Level Content Classifier" />
<meta property="og:description" content="1.5M parameters, 98.3% text-lang accuracy. Classifies raw bytes into code language, content modality, subtype, and more. No parsing, no dependencies." />
<meta property="og:url" content="https://eulogik.github.io/pico-type/" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://eulogik.github.io/pico-type/logo.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Pico-Type — Tiny Byte-Level Content Classifier" />
<meta name="twitter:description" content="1.5M parameters, 98.3% text-lang accuracy. Classifies raw bytes into code language, content modality, subtype, and more. Open source." />
<link rel="canonical" href="https://eulogik.github.io/pico-type/" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="icon" type="image/png" href="logo.png" />
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "Pico-Type",
"applicationCategory": "Machine Learning",
"operatingSystem": "Linux, macOS, Windows",
"description": "A tiny 1.5M-parameter byte-level multi-head content classifier that identifies code language, content modality, subtype, text language, and risk from raw bytes without parsing.",
"url": "https://github.com/eulogik/pico-type",
"author": {
"@type": "Organization",
"name": "Eulogik"
},
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
}
}
</script>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--accent: #6366f1;
--accent-light: #818cf8;
--accent-dark: #4f46e5;
--bg: #0f0f1a;
--bg-card: #1a1a2e;
--bg-card-hover: #222240;
--text: #e2e8f0;
--text-muted: #94a3b8;
--border: #2d2d4a;
--max-w: 1100px;
}
html { scroll-behavior: smooth; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.7;
-webkit-font-smoothing: antialiased;
}
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
/* Hero */
.hero {
min-height: 85vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 80px 24px 60px;
background: radial-gradient(ellipse at 50% 0%, #1e1b4b 0%, var(--bg) 70%);
}
.hero-badge {
display: inline-block;
padding: 6px 16px;
border-radius: 999px;
background: rgba(99, 102, 241, 0.15);
color: var(--accent-light);
font-size: 14px;
font-weight: 500;
margin-bottom: 24px;
border: 1px solid rgba(99, 102, 241, 0.25);
}
.hero h1 {
font-size: clamp(2.5rem, 6vw, 4.2rem);
font-weight: 800;
letter-spacing: -0.03em;
line-height: 1.1;
margin-bottom: 20px;
}
.hero h1 span { color: var(--accent-light); }
.hero p {
font-size: clamp(1.05rem, 2vw, 1.25rem);
color: var(--text-muted);
max-width: 720px;
margin-bottom: 36px;
}
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn {
display: inline-flex; align-items: center; gap: 8px;
padding: 14px 28px; border-radius: 12px; font-size: 16px; font-weight: 600;
text-decoration: none; transition: all 0.2s;
}
.btn-primary {
background: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline {
background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--bg-card); border-color: var(--accent); }
/* Stats bar */
.stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 20px;
margin: -40px auto 60px;
padding: 32px 40px;
max-width: 900px;
background: var(--bg-card);
border-radius: 16px;
border: 1px solid var(--border);
text-align: center;
position: relative;
}
.stat-value { font-size: 28px; font-weight: 800; color: var(--accent-light); }
.stat-label { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
/* Sections */
section { padding: 80px 0; }
section h2 {
font-size: clamp(1.8rem, 4vw, 2.4rem);
font-weight: 700;
text-align: center;
margin-bottom: 48px;
letter-spacing: -0.02em;
}
/* Feature cards */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.feature {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 14px;
padding: 32px;
transition: border-color 0.2s;
}
.feature:hover { border-color: var(--accent); }
.feature-icon { font-size: 28px; margin-bottom: 14px; }
.feature h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--text-muted); }
/* Classification heads */
.heads { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.head-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 12px;
padding: 24px;
text-align: center;
}
.head-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.head-card p { font-size: 13px; color: var(--text-muted); }
.head-card .classes { font-size: 12px; color: var(--accent-light); margin-top: 8px; }
/* Accuracy table */
.table-wrap { overflow-x: auto; }
table {
width: 100%;
border-collapse: collapse;
font-size: 15px;
}
th, td {
padding: 12px 16px;
text-align: left;
border-bottom: 1px solid var(--border);
}
th { font-weight: 600; color: var(--accent-light); white-space: nowrap; }
td { color: var(--text); }
tr:last-child td { border-bottom: none; }
.pass { color: #34d399; font-weight: 600; }
.fail { color: #f87171; font-weight: 600; }
/* CTA */
.cta {
text-align: center;
padding: 80px 0;
border-top: 1px solid var(--border);
}
.cta h2 { margin-bottom: 16px; }
.cta p { color: var(--text-muted); max-width: 500px; margin: 0 auto 32px; }
/* Footer */
footer {
text-align: center;
padding: 40px 24px;
border-top: 1px solid var(--border);
color: var(--text-muted);
font-size: 14px;
}
footer a { color: var(--accent-light); text-decoration: none; }
footer a:hover { text-decoration: underline; }
@media (max-width: 640px) {
.hero { min-height: 70vh; padding: 60px 16px 40px; }
.stats { grid-template-columns: repeat(2, 1fr); margin: -20px 16px 40px; padding: 24px; }
.features { grid-template-columns: 1fr; }
.heads { grid-template-columns: 1fr 1fr; }
}
</style>
</head>
<body>
<!-- Hero -->
<header class="hero">
<img src="logo.png" alt="pico-type logo" style="height:64px;margin-bottom:24px;" />
<div class="hero-badge">ⓘ by <a href="https://eulogik.com" target="_blank" rel="noopener" style="color:inherit;text-decoration:underline;text-underline-offset:3px;">Eulogik</a> · Open Source · Apache 2.0</div>
<h1>Pico‑Type <span>— Bytes In,<br />Answers Out</span></h1>
<p>
A 1.5-million-parameter, byte-level, multi-head classifier that identifies
<strong>code language, content type, modality, text language, and risk</strong>
from raw bytes — no parsing, no dependencies.
</p>
<div class="hero-buttons">
<a class="btn btn-primary" href="https://pypi.org/project/pico-type/" target="_blank" rel="noopener"><code style="background:transparent;color:inherit;font-size:inherit">$</code> pip install pico-type</a>
<a class="btn btn-outline" href="https://github.com/eulogik/pico-type" target="_blank" rel="noopener">GitHub</a>
<a class="btn btn-outline" href="https://huggingface.co/eulogik/pico-type" target="_blank" rel="noopener">HuggingFace</a>
<a class="btn btn-outline" href="https://doi.org/10.5281/zenodo.20758542" target="_blank" rel="noopener">📄 Paper</a>
<a class="btn btn-outline" href="demo.html" rel="noopener">🌐 Browser Demo</a>
</div>
</header>
<!-- Stats -->
<div class="stats container">
<div><div class="stat-value">1.5M</div><div class="stat-label">Parameters</div></div>
<div><div class="stat-value">98.3%</div><div class="stat-label">Text-Lang Accuracy</div></div>
<div><div class="stat-value">62</div><div class="stat-label">Code Languages</div></div>
<div><div class="stat-value">7</div><div class="stat-label">Classification Heads</div></div>
<div><div class="stat-value">2KB</div><div class="stat-label">Context Window</div></div>
</div>
<div class="container">
<!-- Features -->
<section>
<h2>Why Pico-Type?</h2>
<div class="features">
<div class="feature">
<div class="feature-icon">⚡</div>
<h3>Byte-Level</h3>
<p>Operates directly on raw bytes. No tokenizer, no parser, no language-specific pre-processing. Feed it anything from a Python script to a ZIP file.</p>
</div>
<div class="feature">
<div class="feature-icon">★</div>
<h3>Multi-Head Architecture</h3>
<p>Seven specialized classification heads share one backbone: coarse type, modality, subtype, code language, text language, file MIME, and risk.</p>
</div>
<div class="feature">
<div class="feature-icon">🚀</div>
<h3>Tiny & Fast</h3>
<p>Just 1.5 million parameters. The self-contained ONNX export is ~9 MB. Runs inference in milliseconds on CPU or directly <a href="demo.html" style="color:var(--accent-light);">in your browser</a>. Deploy anywhere — edge, browser, serverless.</p>
</div>
<div class="feature">
<div class="feature-icon">🌐</div>
<h3>62 Languages</h3>
<p>Detects 62 programming languages from bytes alone: Python, JavaScript, Rust, Go, C++, Java, SQL, Bash, and 55 more. No shebang or extension required.</p>
</div>
<div class="feature">
<div class="feature-icon">📦</div>
<h3>Beyond Code</h3>
<p>Classifies text (EN, FR, HI, more), config files (JSON, YAML, TOML, env), markup (HTML, Markdown, LaTeX), images (PNG, GIF), and binary archives.</p>
</div>
<div class="feature">
<div class="feature-icon">⚙</div>
<h3>ONNX + CLI</h3>
<p>Built-in export to ONNX for cross-platform deployment. Comes with a CLI tool and an optional MCP server. Zero-config setup for CI/CD pipelines.</p>
</div>
</div>
</section>
<!-- Classification heads -->
<section>
<h2>Seven Heads, One Model</h2>
<div class="heads">
<div class="head-card">
<h3>Coarse</h3>
<p>code / text / markup / config / image / binary / error</p>
</div>
<div class="head-card">
<h3>Modality</h3>
<p>source / script / markup / prose / serialization / bitmap / archive / traceback</p>
</div>
<div class="head-card">
<h3>Subtype</h3>
<p>general / web / data / system / shell / build / doc …</p>
</div>
<div class="head-card">
<h3>Code Language</h3>
<p>62 languages: Python, JS, Rust, Go, Java, C++, SQL, Bash & more</p>
</div>
<div class="head-card">
<h3>Text Language</h3>
<p>English, French, Hindi, Czech, Polish, …</p>
</div>
<div class="head-card">
<h3>File MIME</h3>
<p>text/x-python, image/png, application/zip, …</p>
</div>
<div class="head-card">
<h3>Risk</h3>
<p>safe / unknown / error</p>
</div>
</div>
</section>
<!-- Real-world accuracy -->
<section>
<h2>Real-World Accuracy: 60.3% code lang · 98.3% text lang</h2>
<p style="text-align:center;color:var(--text-muted);margin-bottom:32px;">
Benchmarked on The Heap (1,200 code samples, 24 languages) and Wikipedia (1,500 articles, 30 languages). Below are sample classifications — illustrative only, not a benchmark.
</p>
<div class="table-wrap">
<table>
<thead>
<tr><th>Input</th><th>Coarse</th><th>Modality</th><th>Code/Text Lang</th><th>File MIME</th><th>Risk</th></tr>
</thead>
<tbody>
<tr><td>Python</td><td class="pass">code</td><td class="pass">source</td><td class="pass">Python</td><td class="pass">text/x-python</td><td class="pass">safe</td></tr>
<tr><td>JavaScript</td><td class="pass">code</td><td class="pass">source</td><td class="pass">JavaScript</td><td class="pass">text/javascript</td><td class="pass">safe</td></tr>
<tr><td>C</td><td class="pass">code</td><td class="pass">source</td><td class="pass">C</td><td class="pass">text/x-c</td><td class="pass">safe</td></tr>
<tr><td>Java</td><td class="pass">code</td><td class="pass">source</td><td class="pass">Java</td><td class="pass">text/x-java</td><td class="pass">safe</td></tr>
<tr><td>SQL</td><td class="pass">code</td><td class="pass">script</td><td class="pass">SQL</td><td class="pass">text/x-sql</td><td class="pass">safe</td></tr>
<tr><td>Bash</td><td class="pass">code</td><td class="pass">script</td><td class="pass">Bash</td><td class="pass">text/x-shellscript</td><td class="pass">safe</td></tr>
<tr><td>Rust</td><td class="pass">code</td><td class="pass">source</td><td class="pass">Rust</td><td class="pass">text/x-rust</td><td class="pass">safe</td></tr>
<tr><td>Go</td><td class="pass">code</td><td class="pass">source</td><td class="pass">Go</td><td class="pass">text/x-go</td><td class="pass">safe</td></tr>
<tr><td>CSS</td><td class="pass">code</td><td class="pass">source</td><td class="pass">CSS</td><td class="pass">text/css</td><td class="pass">safe</td></tr>
<tr><td>HTML</td><td class="pass">markup</td><td class="pass">markup</td><td class="pass">—</td><td class="pass">text/html</td><td class="pass">safe</td></tr>
<tr><td>English text</td><td class="pass">text</td><td class="pass">prose</td><td class="pass">English</td><td class="pass">text/plain</td><td class="pass">safe</td></tr>
<tr><td>French text</td><td class="pass">text</td><td class="pass">prose</td><td class="pass">French</td><td class="pass">text/plain</td><td class="pass">safe</td></tr>
<tr><td>Hindi text</td><td class="pass">text</td><td class="pass">prose</td><td class="pass">Hindi</td><td class="pass">text/plain</td><td class="pass">safe</td></tr>
<tr><td>JSON</td><td class="pass">config</td><td class="pass">serialization</td><td class="pass">—</td><td class="pass">application/json</td><td class="pass">safe</td></tr>
<tr><td>YAML</td><td class="fail">error →</td><td class="pass">serialization</td><td class="pass">—</td><td class="pass">text/yaml</td><td class="pass">safe</td></tr>
<tr><td>.env</td><td class="pass">config</td><td class="pass">config</td><td class="pass">—</td><td class="pass">text/plain</td><td class="pass">safe</td></tr>
<tr><td>Error traceback</td><td class="pass">error</td><td class="pass">traceback</td><td class="pass">—</td><td class="pass">text/plain</td><td class="pass">error</td></tr>
<tr><td>PNG</td><td class="pass">image</td><td class="pass">bitmap</td><td class="pass">—</td><td class="pass">image/png</td><td class="pass">safe</td></tr>
<tr><td>GIF</td><td class="pass">image</td><td class="pass">bitmap</td><td class="pass">—</td><td class="pass">image/gif</td><td class="pass">safe</td></tr>
<tr><td>ZIP archive</td><td class="pass">binary</td><td class="pass">archive</td><td class="pass">—</td><td class="pass">application/zip</td><td class="pass">safe</td></tr>
</tbody>
</table>
</div>
<p style="text-align:center;color:var(--text-muted);font-size:14px;margin-top:16px;">
Only flub: YAML gets <em>error</em> instead of <em>config</em> for coarse type (subtype and MIME are correct).
This is a fundamental byte-level ambiguity — YAML content and error messages share byte patterns at the first 2KB.
</p>
<p style="text-align:center;margin-top:20px;">
<a class="btn btn-outline" href="https://doi.org/10.5281/zenodo.20758542" target="_blank" rel="noopener" style="font-size:15px;">📄 Read the Paper on Zenodo</a>
</p>
</section>
<!-- Use cases -->
<section>
<h2>Use Cases</h2>
<div class="features">
<div class="feature">
<div class="feature-icon">📜</div>
<h3>Content Classification</h3>
<p>Sort files, API payloads, or raw network data by type, language, and risk in CI/CD pipelines, upload services, or security tools.</p>
</div>
<div class="feature">
<div class="feature-icon">💻</div>
<h3>IDE Integration</h3>
<p>Detect the programming language of unsaved buffers or snippet pastes without relying on file extensions. Works with any editor via the CLI or MCP server.</p>
</div>
<div class="feature">
<div class="feature-icon">📊</div>
<h3>Data Pipeline Routing</h3>
<p>Route incoming data to the correct processing pipeline based on byte-level content analysis — no need to trust Content-Type headers.</p>
</div>
<div class="feature">
<div class="feature-icon">🏆</div>
<h3>Educational & Research</h3>
<p>A production-grade reference for multi-task learning, distillation, and byte-level modeling. Study the architecture, extend it, or distill it further.</p>
</div>
</div>
</section>
</div>
<!-- CTA -->
<section class="cta container">
<h2>Get Started in One Command</h2>
<p>Install from PyPI and classify any file in seconds. No GPU required. No cloud service. Fully open source.</p>
<div class="hero-buttons">
<a class="btn btn-primary" href="https://pypi.org/project/pico-type/" target="_blank" rel="noopener"><code style="background:transparent;color:inherit;font-size:inherit">$</code> pip install pico-type</a>
<a class="btn btn-outline" href="https://github.com/eulogik/pico-type" target="_blank" rel="noopener">View on GitHub</a>
<a class="btn btn-outline" href="demo.html" rel="noopener">🌐 Try in Browser</a>
</div>
</section>
<!-- Footer -->
<footer>
<p>
<a href="https://eulogik.com" target="_blank" rel="noopener">Eulogik</a>
·
<a href="https://github.com/eulogik/pico-type" target="_blank" rel="noopener">GitHub</a>
·
<a href="https://pypi.org/project/pico-type/" target="_blank" rel="noopener">PyPI</a>
·
<a href="https://huggingface.co/eulogik/pico-type" target="_blank" rel="noopener">HuggingFace</a>
·
<a href="demo.html">Browser Demo</a>
·
<a href="https://doi.org/10.5281/zenodo.20758542" target="_blank" rel="noopener">Paper (Zenodo)</a>
</p>
<p style="margin-top:8px;">Open source under the Apache 2.0 License — built by <a href="https://eulogik.com" target="_blank" rel="noopener">Eulogik</a></p>
</footer>
</body>
</html>
|