Proaktiivinen mallin esilataus: warmup-prompt käynnistyksessä
Kun coder-node yhdistyy hubiin, lähetetään automaattisesti 1 tokenin warmup-prompt joka triggeröi mallin latauksen (painot + rakennus). Pipeline-tilakone merkkaa kaikki vaiheet valmiiksi logiviestien perusteella ilman että käyttäjän tarvitsee odottaa ensimmäiseen prompttiin asti. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2567,10 +2567,23 @@
|
|||||||
document.getElementById('coder-status').style.color = '#d29922';
|
document.getElementById('coder-status').style.color = '#d29922';
|
||||||
coderWsReady = true;
|
coderWsReady = true;
|
||||||
|
|
||||||
|
// Proaktiivinen mallin esilataus: lähetetään tyhjä warmup-prompt
|
||||||
|
// joka triggeröi get_or_build_model:n ilman varsinaista generointia.
|
||||||
|
// Pipeline-tilakone seuraa logeja ja merkkaa vaiheet valmiiksi.
|
||||||
|
setTimeout(() => {
|
||||||
|
if (uiSocket && uiSocket.readyState === 1) {
|
||||||
|
uiSocket.send(JSON.stringify({
|
||||||
|
type: 'user_text',
|
||||||
|
text: '{"prompt":"warmup","max_tokens":1}',
|
||||||
|
task_type: 'qwen-coder'
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
|
||||||
if (pendingCodePrompt) {
|
if (pendingCodePrompt) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
sendCodeToHub(pendingCodePrompt);
|
sendCodeToHub(pendingCodePrompt);
|
||||||
}, 800);
|
}, 2000); // Hieman pidempi odotus jotta warmup ehtii ensin
|
||||||
pendingCodePrompt = null;
|
pendingCodePrompt = null;
|
||||||
}
|
}
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user