NanoWhale-0.1B / index.html
usermma's picture
Create index.html
ba4a6ef verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nanoWhale-100m - DeepSeek-V4 Miniature</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: linear-gradient(135deg, #0b1120 0%, #19223f 100%);
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
}
.container {
max-width: 900px;
width: 100%;
background: rgba(18, 25, 45, 0.85);
backdrop-filter: blur(10px);
border-radius: 30px;
padding: 30px;
box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(66, 153, 225, 0.2);
border: 1px solid rgba(66, 153, 225, 0.3);
}
h1 {
color: #90cdf4;
font-size: 2.2em;
margin-bottom: 10px;
text-align: center;
letter-spacing: -0.5px;
}
.badge {
text-align: center;
color: #a0aec0;
margin-bottom: 30px;
font-size: 0.9em;
border-bottom: 1px solid #2d3748;
padding-bottom: 15px;
}
.architecture {
background: #0f172a;
border-radius: 20px;
padding: 15px;
margin-bottom: 25px;
border: 1px solid #2d3748;
font-size: 0.85em;
color: #cbd5e0;
display: flex;
flex-wrap: wrap;
gap: 12px;
justify-content: center;
}
.arch-tag {
background: #1e2a3a;
padding: 5px 12px;
border-radius: 20px;
font-family: monospace;
font-size: 0.85em;
color: #81e6d9;
}
textarea {
width: 100%;
padding: 15px;
background: #0a0f1c;
border: 1px solid #2d3748;
border-radius: 20px;
color: #e2e8f0;
font-size: 1em;
font-family: inherit;
resize: vertical;
margin-bottom: 20px;
transition: all 0.2s;
}
textarea:focus {
outline: none;
border-color: #4299e1;
box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.3);
}
button {
background: linear-gradient(90deg, #3182ce, #2c5282);
color: white;
border: none;
padding: 12px 28px;
border-radius: 40px;
font-size: 1em;
font-weight: bold;
cursor: pointer;
transition: all 0.2s;
margin-right: 15px;
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
button:hover {
transform: translateY(-2px);
background: linear-gradient(90deg, #4299e1, #3182ce);
box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}
button:active {
transform: translateY(1px);
}
.loader {
display: inline-block;
width: 20px;
height: 20px;
border: 2px solid rgba(255,255,255,0.3);
border-radius: 50%;
border-top-color: white;
animation: spin 0.6s linear infinite;
vertical-align: middle;
margin-left: 8px;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.response-box {
margin-top: 30px;
background: #0a0f1c;
border-radius: 20px;
padding: 20px;
border: 1px solid #2d3748;
}
.response-label {
color: #90cdf4;
font-weight: bold;
margin-bottom: 12px;
font-size: 0.9em;
letter-spacing: 0.5px;
}
.response-content {
color: #e2e8f0;
line-height: 1.6;
white-space: pre-wrap;
word-wrap: break-word;
font-size: 0.95em;
}
.error {
color: #fc8181;
}
footer {
text-align: center;
margin-top: 30px;
font-size: 0.75em;
color: #4a5568;
}
a {
color: #63b3ed;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="container">
<h1>🐳 nanoWhale-100m</h1>
<div class="badge">DeepSeek-V4 architecture | 110M params | Hyper-Connections | MLA | MoE</div>
<div class="architecture">
<span class="arch-tag">MLA (q_lora_rank=160)</span>
<span class="arch-tag">4 routed experts + 1 shared</span>
<span class="arch-tag">Multi-head Latent Attention</span>
<span class="arch-tag">Hyper-Connections (hc_mult=4)</span>
<span class="arch-tag">MTP prediction layer</span>
<span class="arch-tag">F32 precision</span>
</div>
<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>
<div>
<button id="generateBtn">🚀 Generate</button>
<span id="status" style="color:#a0aec0; font-size:0.85em;"></span>
</div>
<div class="response-box" id="responseBox" style="display: none;">
<div class="response-label">✨ Response (raw generation - may be chaotic):</div>
<div class="response-content" id="responseText"></div>
</div>
<footer>
⚠️ <strong>Experimental:</strong> 110M parameters with DeepSeek-V4 architecture at small scale.<br>
Model may produce incoherent text. Built for architecture testing, not production.<br>
<a href="https://huggingface.co/HuggingFaceTB/nanowhale-100m" target="_blank">View on Hugging Face</a>
</footer>
</div>
<script>
document.getElementById('generateBtn').addEventListener('click', async () => {
const prompt = document.getElementById('prompt').value.trim();
if (!prompt) {
alert('Please enter a prompt.');
return;
}
const btn = document.getElementById('generateBtn');
const originalText = btn.innerHTML;
btn.innerHTML = 'Generating <span class="loader"></span>';
btn.disabled = true;
document.getElementById('status').innerHTML = 'Model is thinking (on CPU, may take ~10-30s)...';
try {
const response = await fetch('/generate', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ prompt: prompt })
});
const data = await response.json();
if (data.error) {
document.getElementById('responseText').innerHTML = `<span class="error">❌ Error: ${data.error}</span>`;
} else {
document.getElementById('responseText').innerHTML = data.response.replace(/\n/g, '<br>');
}
document.getElementById('responseBox').style.display = 'block';
} catch (err) {
document.getElementById('responseText').innerHTML = `<span class="error">❌ Network error: ${err.message}</span>`;
document.getElementById('responseBox').style.display = 'block';
} finally {
btn.innerHTML = originalText;
btn.disabled = false;
document.getElementById('status').innerHTML = '';
}
});
</script>
</body>
</html>