hiaripc commited on
Commit ·
aac01d9
1
Parent(s): d8dc6ae
index
Browse files- index.html +107 -18
index.html
CHANGED
|
@@ -1,19 +1,108 @@
|
|
| 1 |
-
<!
|
| 2 |
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>SweetSpot v2 — energy-per-token demo</title>
|
| 6 |
+
|
| 7 |
+
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
|
| 8 |
+
|
| 9 |
+
<style>
|
| 10 |
+
body {
|
| 11 |
+
font-family: sans-serif;
|
| 12 |
+
max-width: 1000px;
|
| 13 |
+
margin: auto;
|
| 14 |
+
padding: 20px;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
.row {
|
| 18 |
+
display: flex;
|
| 19 |
+
gap: 20px;
|
| 20 |
+
flex-wrap: wrap;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
label {
|
| 24 |
+
display: block;
|
| 25 |
+
margin-top: 10px;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
input {
|
| 29 |
+
width: 120px;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
#plot {
|
| 33 |
+
margin-top: 30px;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
button {
|
| 37 |
+
margin-top: 10px;
|
| 38 |
+
padding: 8px 15px;
|
| 39 |
+
}
|
| 40 |
+
</style>
|
| 41 |
+
</head>
|
| 42 |
+
|
| 43 |
+
<body>
|
| 44 |
+
|
| 45 |
+
<h2>
|
| 46 |
+
SweetSpot v2 — energy-per-token demo
|
| 47 |
+
</h2>
|
| 48 |
+
|
| 49 |
+
<p>
|
| 50 |
+
Interactive visualization of the analytical energy model.
|
| 51 |
+
</p>
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
<h3>Architecture parameters</h3>
|
| 55 |
+
|
| 56 |
+
<div class="row">
|
| 57 |
+
|
| 58 |
+
<div>
|
| 59 |
+
<label>d (hidden size)</label>
|
| 60 |
+
<input id="d" type="number" value="4544">
|
| 61 |
+
</div>
|
| 62 |
+
|
| 63 |
+
<div>
|
| 64 |
+
<label>L (layers)</label>
|
| 65 |
+
<input id="L" type="number" value="32">
|
| 66 |
+
</div>
|
| 67 |
+
|
| 68 |
+
<div>
|
| 69 |
+
<label>nq (query heads)</label>
|
| 70 |
+
<input id="nq" type="number" value="71">
|
| 71 |
+
</div>
|
| 72 |
+
|
| 73 |
+
<div>
|
| 74 |
+
<label>nkv (KV heads)</label>
|
| 75 |
+
<input id="nkv" type="number" value="1">
|
| 76 |
+
</div>
|
| 77 |
+
|
| 78 |
+
<div>
|
| 79 |
+
<label>Input tokens</label>
|
| 80 |
+
<input id="nin" type="number" value="512">
|
| 81 |
+
</div>
|
| 82 |
+
|
| 83 |
+
</div>
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
<h3>
|
| 87 |
+
Load Hugging Face model config
|
| 88 |
+
</h3>
|
| 89 |
+
|
| 90 |
+
<input
|
| 91 |
+
id="repo"
|
| 92 |
+
style="width:400px"
|
| 93 |
+
placeholder="facebook/opt-1.3b">
|
| 94 |
+
|
| 95 |
+
<button onclick="loadModel()">
|
| 96 |
+
Load model
|
| 97 |
+
</button>
|
| 98 |
+
|
| 99 |
+
<p id="status"></p>
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
<div id="plot"></div>
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
<script src="app.js"></script>
|
| 106 |
+
|
| 107 |
+
</body>
|
| 108 |
+
</html>
|