usermma commited on
Commit
ba4a6ef
·
verified ·
1 Parent(s): a3a93be

Create index.html

Browse files
Files changed (1) hide show
  1. index.html +230 -0
index.html ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>nanoWhale-100m - DeepSeek-V4 Miniature</title>
7
+ <style>
8
+ * {
9
+ margin: 0;
10
+ padding: 0;
11
+ box-sizing: border-box;
12
+ }
13
+ body {
14
+ background: linear-gradient(135deg, #0b1120 0%, #19223f 100%);
15
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
16
+ min-height: 100vh;
17
+ display: flex;
18
+ justify-content: center;
19
+ align-items: center;
20
+ padding: 20px;
21
+ }
22
+ .container {
23
+ max-width: 900px;
24
+ width: 100%;
25
+ background: rgba(18, 25, 45, 0.85);
26
+ backdrop-filter: blur(10px);
27
+ border-radius: 30px;
28
+ padding: 30px;
29
+ box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(66, 153, 225, 0.2);
30
+ border: 1px solid rgba(66, 153, 225, 0.3);
31
+ }
32
+ h1 {
33
+ color: #90cdf4;
34
+ font-size: 2.2em;
35
+ margin-bottom: 10px;
36
+ text-align: center;
37
+ letter-spacing: -0.5px;
38
+ }
39
+ .badge {
40
+ text-align: center;
41
+ color: #a0aec0;
42
+ margin-bottom: 30px;
43
+ font-size: 0.9em;
44
+ border-bottom: 1px solid #2d3748;
45
+ padding-bottom: 15px;
46
+ }
47
+ .architecture {
48
+ background: #0f172a;
49
+ border-radius: 20px;
50
+ padding: 15px;
51
+ margin-bottom: 25px;
52
+ border: 1px solid #2d3748;
53
+ font-size: 0.85em;
54
+ color: #cbd5e0;
55
+ display: flex;
56
+ flex-wrap: wrap;
57
+ gap: 12px;
58
+ justify-content: center;
59
+ }
60
+ .arch-tag {
61
+ background: #1e2a3a;
62
+ padding: 5px 12px;
63
+ border-radius: 20px;
64
+ font-family: monospace;
65
+ font-size: 0.85em;
66
+ color: #81e6d9;
67
+ }
68
+ textarea {
69
+ width: 100%;
70
+ padding: 15px;
71
+ background: #0a0f1c;
72
+ border: 1px solid #2d3748;
73
+ border-radius: 20px;
74
+ color: #e2e8f0;
75
+ font-size: 1em;
76
+ font-family: inherit;
77
+ resize: vertical;
78
+ margin-bottom: 20px;
79
+ transition: all 0.2s;
80
+ }
81
+ textarea:focus {
82
+ outline: none;
83
+ border-color: #4299e1;
84
+ box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.3);
85
+ }
86
+ button {
87
+ background: linear-gradient(90deg, #3182ce, #2c5282);
88
+ color: white;
89
+ border: none;
90
+ padding: 12px 28px;
91
+ border-radius: 40px;
92
+ font-size: 1em;
93
+ font-weight: bold;
94
+ cursor: pointer;
95
+ transition: all 0.2s;
96
+ margin-right: 15px;
97
+ box-shadow: 0 4px 10px rgba(0,0,0,0.2);
98
+ }
99
+ button:hover {
100
+ transform: translateY(-2px);
101
+ background: linear-gradient(90deg, #4299e1, #3182ce);
102
+ box-shadow: 0 6px 15px rgba(0,0,0,0.3);
103
+ }
104
+ button:active {
105
+ transform: translateY(1px);
106
+ }
107
+ .loader {
108
+ display: inline-block;
109
+ width: 20px;
110
+ height: 20px;
111
+ border: 2px solid rgba(255,255,255,0.3);
112
+ border-radius: 50%;
113
+ border-top-color: white;
114
+ animation: spin 0.6s linear infinite;
115
+ vertical-align: middle;
116
+ margin-left: 8px;
117
+ }
118
+ @keyframes spin {
119
+ to { transform: rotate(360deg); }
120
+ }
121
+ .response-box {
122
+ margin-top: 30px;
123
+ background: #0a0f1c;
124
+ border-radius: 20px;
125
+ padding: 20px;
126
+ border: 1px solid #2d3748;
127
+ }
128
+ .response-label {
129
+ color: #90cdf4;
130
+ font-weight: bold;
131
+ margin-bottom: 12px;
132
+ font-size: 0.9em;
133
+ letter-spacing: 0.5px;
134
+ }
135
+ .response-content {
136
+ color: #e2e8f0;
137
+ line-height: 1.6;
138
+ white-space: pre-wrap;
139
+ word-wrap: break-word;
140
+ font-size: 0.95em;
141
+ }
142
+ .error {
143
+ color: #fc8181;
144
+ }
145
+ footer {
146
+ text-align: center;
147
+ margin-top: 30px;
148
+ font-size: 0.75em;
149
+ color: #4a5568;
150
+ }
151
+ a {
152
+ color: #63b3ed;
153
+ text-decoration: none;
154
+ }
155
+ a:hover {
156
+ text-decoration: underline;
157
+ }
158
+ </style>
159
+ </head>
160
+ <body>
161
+ <div class="container">
162
+ <h1>🐳 nanoWhale-100m</h1>
163
+ <div class="badge">DeepSeek-V4 architecture | 110M params | Hyper-Connections | MLA | MoE</div>
164
+
165
+ <div class="architecture">
166
+ <span class="arch-tag">MLA (q_lora_rank=160)</span>
167
+ <span class="arch-tag">4 routed experts + 1 shared</span>
168
+ <span class="arch-tag">Multi-head Latent Attention</span>
169
+ <span class="arch-tag">Hyper-Connections (hc_mult=4)</span>
170
+ <span class="arch-tag">MTP prediction layer</span>
171
+ <span class="arch-tag">F32 precision</span>
172
+ </div>
173
+
174
+ <textarea id="prompt" rows="4" placeholder="Ask anything to this tiny but architecturally advanced model...&#10;&#10;Examples:&#10;- Explain quantum computing in simple terms&#10;- Write a haiku about artificial intelligence&#10;- What are the benefits of hyper-connections in neural networks?"></textarea>
175
+ <div>
176
+ <button id="generateBtn">🚀 Generate</button>
177
+ <span id="status" style="color:#a0aec0; font-size:0.85em;"></span>
178
+ </div>
179
+
180
+ <div class="response-box" id="responseBox" style="display: none;">
181
+ <div class="response-label">✨ Response (raw generation - may be chaotic):</div>
182
+ <div class="response-content" id="responseText"></div>
183
+ </div>
184
+ <footer>
185
+ ⚠️ <strong>Experimental:</strong> 110M parameters with DeepSeek-V4 architecture at small scale.<br>
186
+ Model may produce incoherent text. Built for architecture testing, not production.<br>
187
+ <a href="https://huggingface.co/HuggingFaceTB/nanowhale-100m" target="_blank">View on Hugging Face</a>
188
+ </footer>
189
+ </div>
190
+
191
+ <script>
192
+ document.getElementById('generateBtn').addEventListener('click', async () => {
193
+ const prompt = document.getElementById('prompt').value.trim();
194
+ if (!prompt) {
195
+ alert('Please enter a prompt.');
196
+ return;
197
+ }
198
+
199
+ const btn = document.getElementById('generateBtn');
200
+ const originalText = btn.innerHTML;
201
+ btn.innerHTML = 'Generating <span class="loader"></span>';
202
+ btn.disabled = true;
203
+ document.getElementById('status').innerHTML = 'Model is thinking (on CPU, may take ~10-30s)...';
204
+
205
+ try {
206
+ const response = await fetch('/generate', {
207
+ method: 'POST',
208
+ headers: { 'Content-Type': 'application/json' },
209
+ body: JSON.stringify({ prompt: prompt })
210
+ });
211
+ const data = await response.json();
212
+
213
+ if (data.error) {
214
+ document.getElementById('responseText').innerHTML = `<span class="error">❌ Error: ${data.error}</span>`;
215
+ } else {
216
+ document.getElementById('responseText').innerHTML = data.response.replace(/\n/g, '<br>');
217
+ }
218
+ document.getElementById('responseBox').style.display = 'block';
219
+ } catch (err) {
220
+ document.getElementById('responseText').innerHTML = `<span class="error">❌ Network error: ${err.message}</span>`;
221
+ document.getElementById('responseBox').style.display = 'block';
222
+ } finally {
223
+ btn.innerHTML = originalText;
224
+ btn.disabled = false;
225
+ document.getElementById('status').innerHTML = '';
226
+ }
227
+ });
228
+ </script>
229
+ </body>
230
+ </html>