Spaces:
Running
Running
File size: 5,282 Bytes
029601a a2bd61d 029601a | 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 | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self'; style-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'none'"
/>
<title>Tiny Hash Intent</title>
<link rel="stylesheet" href="style.css" />
<script type="module" src="app.mjs"></script>
</head>
<body>
<main>
<header>
<p class="eyebrow">WIDECHAOS / FROM-SCRATCH CPU CLASSIFIER</p>
<h1>A small model, running in your browser.</h1>
<p class="lede">
267,213 learned parameters. Character hashing, a tanh hidden layer,
and 77 English banking intents.
</p>
<p class="notice">
Closed set: every valid text receives one of the 77 labels. This model
cannot detect unrelated requests. Scores are conditional class scores,
not a guarantee that a label is appropriate.
</p>
</header>
<div class="workspace">
<section>
<h2>Try local inference</h2>
<label for="query">Text to classify</label
><textarea
id="query"
rows="6"
spellcheck="false"
aria-describedby="limit"
>
Where is my card? It has not arrived.</textarea
>
<p id="limit" class="hint">
Up to 2,048 UTF-16 units. Long input is rejected, never silently
shortened. English training data; other languages are not validated.
</p>
<label class="check"
><input type="checkbox" id="calibrated" checked />Use the
validation-selected temperature (0.75)</label
><button id="run" disabled>Classify locally</button>
<p id="state" role="status" aria-live="polite">
Loading fixed model weights…
</p>
<p id="error" role="alert" tabindex="-1" hidden></p>
<p class="hint">
After loading the fixed asset, inference sends no text to a server
and uses no model API, storage or telemetry.
</p>
<details>
<summary>How this model was prepared</summary>
<p>
One NumPy CPU fit over 8,998 training rows, with 1,005 validation
rows from the original BANKING77 train split. Thirty epochs were
completed; epoch 28 was selected by validation NLL, then
temperature was chosen on validation only.
</p>
<p>
The int8 file stores quantized embedding/output weights with
floating scales and biases. This browser dequantizes them and
computes in Float64; it does not use integer-only kernels.
</p>
</details>
</section>
<section>
<h2>Inspect the prediction</h2>
<div id="placeholder" class="placeholder">
Run a query to inspect its three highest class scores.
</div>
<div id="results" hidden>
<p id="prediction" class="prediction"></p>
<p id="condition" class="hint"></p>
<ol id="top3"></ol>
<p class="notice">
An unrelated input still receives a label. No abstention
threshold, banking advice or account operation is provided.
</p>
<div id="downloads"></div>
<p class="hint">
The report includes your input text, model SHA-256 and all 77
scores. Review it before sharing.
</p>
<details>
<summary>Full current report</summary>
<pre id="report"></pre>
</details>
</div>
</section>
</div>
<section class="facts">
<h2>Measured on the known benchmark</h2>
<p>
Both representations got 2,779 of 3,080 official test rows correct
(90.23%). Two predicted labels changed after quantization; the
unchanged correct count does not mean identical predictions. All
errors and the 3,073-row nonoverlap subset are retained.
</p>
<p>
This benchmark was already studied in an earlier project. This model's
architecture, fitting choices and validation-only selection were fixed
before its own test evaluation. One fit has float/int8 and
raw/calibrated evaluation modes; these are not four independently
trained models.
</p>
<p>
<a href="README.md"
>Training, calibration, metrics, attribution and reproduction</a
>
</p>
</section>
<footer>
<p>
Data: PolyAI BANKING77 / Casanueva et al. (2020), CC BY 4.0. Code:
Renchao Wu, Apache 2.0. Weights and experimental data retain CC BY 4.0
attribution.
</p>
<p lang="zh">
真实CPU从零训练,浏览器本地推理。同一模型的量化与校准版本不另算训练;英语闭集分类不识别域外请求,也不代表银行业务建议或生产服务能力。
</p>
</footer>
</main>
</body>
</html>
|