root-sys-n commited on
Commit
6ee2ac3
·
verified ·
1 Parent(s): 0d403eb

Publish Mima 2 Photon + dynamic model-aware UI

Browse files
index.html CHANGED
@@ -748,6 +748,40 @@
748
  .msg-row { max-width: 94%; }
749
  .statusbar { justify-content: center; text-align: center; }
750
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
751
  </style>
752
  </head>
753
  <body>
@@ -764,7 +798,7 @@
764
  <div class="brand-text">
765
  <h1>
766
  <span>Mima</span>
767
- <span class="version-pill">1.5 Pico · 15M</span>
768
  </h1>
769
  <p>Tarayıcıda çalışan Türkçe küçük dil modeli · ONNX WASM</p>
770
  </div>
@@ -777,7 +811,9 @@
777
  <path d="M9 2.5V6M15 2.5V6M9 18V21.5M15 18V21.5M2.5 9H6M2.5 15H6M18 9H21.5M18 15H21.5" stroke="#3F4B61" stroke-width="2.2" stroke-linecap="round"/>
778
  </svg>
779
  <select id="modelSelect" aria-label="Model Seçimi">
780
- <option value="mima15full" selected>Mima 1.5 Pico</option>
 
 
781
  <option value="mima1">Mima 1 Pico</option>
782
  </select>
783
  </label>
@@ -821,6 +857,12 @@
821
  <label class="slider-item">Maks. Token <strong id="maxTokVal">96</strong>
822
  <input id="maxTokRange" type="range" min="24" max="200" step="8" value="96" />
823
  </label>
 
 
 
 
 
 
824
  <label class="slider-item">Tekrar <strong id="repVal">1.00</strong>
825
  <input id="repRange" type="range" min="1.00" max="1.25" step="0.02" value="1.00" />
826
  </label>
@@ -1002,11 +1044,13 @@
1002
  const TOOLS_PREFIX = "[Araçlar: hesapla(ifade), hava(sehir), web_ara(sorgu), saat(sehir), kur(miktar, kaynak, hedef), not_ekle(baslik), cevir(metin, dil)]\n";
1003
 
1004
  const MODELS = {
1005
- mima15full: { label: "Mima 1.5 Pico", url: "./mima_1_5_pico.onnx?v=1.5.2" },
1006
- mima1: { label: "Mima 1 Pico", url: "./mima_1.onnx" },
 
 
1007
  };
1008
 
1009
- let tokenizer = null;
1010
  const sessions = {};
1011
  const sessionPromises = {};
1012
  let activeDownloadMsg = null;
@@ -1029,10 +1073,13 @@
1029
  const tempRange = document.getElementById("tempRange");
1030
  const topkRange = document.getElementById("topkRange");
1031
  const maxTokRange = document.getElementById("maxTokRange");
 
 
1032
  const repRange = document.getElementById("repRange");
1033
  tempRange.oninput = () => document.getElementById("tempVal").textContent = Number(tempRange.value).toFixed(2);
1034
  topkRange.oninput = () => document.getElementById("topkVal").textContent = topkRange.value;
1035
  maxTokRange.oninput = () => document.getElementById("maxTokVal").textContent = maxTokRange.value;
 
1036
  repRange.oninput = () => document.getElementById("repVal").textContent = Number(repRange.value).toFixed(2);
1037
 
1038
  function setProgress(msg) {
@@ -1042,13 +1089,14 @@
1042
  }
1043
  }
1044
 
1045
- async function ensureTokenizer() {
1046
- if (tokenizer) return tokenizer;
 
1047
  setProgress("Tokenizer yükleniyor...");
1048
- const res = await fetch("./tokenizer.json");
1049
- if (!res.ok) throw new Error("tokenizer.json yüklenemedi: " + res.status);
1050
- tokenizer = new MimaTokenizer(await res.json());
1051
- return tokenizer;
1052
  }
1053
 
1054
  async function fetchModelBytes(url, label) {
@@ -1393,6 +1441,102 @@
1393
  }
1394
  }
1395
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1396
  async function runGenerate(sess, tok, promptIds, maxNew, temp, topK, repPen, onStream) {
1397
  const allTokens = promptIds.slice();
1398
  const generated = [];
@@ -1453,53 +1597,57 @@
1453
  activeDownloadMsg = botUi.bubble;
1454
 
1455
  try {
1456
- const tok = await ensureTokenizer();
1457
  const sess = await ensureSession(modelKey);
 
1458
  activeDownloadMsg = null;
1459
 
1460
  const temp = Number(tempRange.value);
1461
  const topK = Number(topkRange.value);
1462
  const maxNew = Number(maxTokRange.value);
 
 
1463
  const repPen = Number(repRange.value);
1464
 
1465
- const useTools = Boolean(toolModeCheck?.checked) && modelKey === "mima15full";
1466
  const effectiveMsg = useTools ? (TOOLS_PREFIX + msg) : msg;
1467
  const promptIds = buildPromptIds(tok, history, effectiveMsg, maxNew);
1468
 
1469
  const t0 = performance.now();
1470
  statusText.textContent = `${modelLabel} yanıt üretiyor...`;
1471
- const turn1 = await runGenerate(sess, tok, promptIds, maxNew, temp, topK, repPen, (txt) => {
1472
- botUi.bubble.textContent = txt;
1473
  chatArea.scrollTop = chatArea.scrollHeight;
1474
- });
1475
 
1476
  let totalToks = turn1.nTokens;
1477
- const parsedTool = useTools ? parseAracCall(turn1.text) : null;
 
1478
 
1479
  if (parsedTool) {
1480
- renderToolCard(botUi.bubble, turn1.text, "Canlı araç çalıştırılıyor...");
1481
  statusText.textContent = `Canlı araç çalışıyor: ${parsedTool.name}...`;
1482
  const toolResult = await executeRealTool(parsedTool);
1483
- renderToolCard(botUi.bubble, turn1.text, `Araç Sonucu: ${toolResult}`);
1484
 
1485
- const tempHist = history.concat([{ u: effectiveMsg, a: turn1.text }]);
1486
  const synthMsg = `[Araç Sonucu: ${toolResult}]`;
1487
  const synthIds = buildPromptIds(tok, tempHist, synthMsg, maxNew);
1488
  const botUi2 = appendMessage("bot", "Sonuç yorumlanıyor...", `${modelLabel} · Araç Yanıtı`);
1489
  statusText.textContent = `${modelLabel} araç sonucunu yorumluyor...`;
1490
- const turn2 = await runGenerate(sess, tok, synthIds, maxNew, temp, topK, repPen, (txt) => {
1491
- botUi2.bubble.textContent = txt;
1492
  chatArea.scrollTop = chatArea.scrollHeight;
1493
- });
1494
- botUi2.bubble.textContent = turn2.text;
1495
  totalToks += turn2.nTokens;
1496
  // Geçmişte [Araçlar: ...], @arac: ve [Araç Sonucu: ...] kalıntılarını buda;
1497
  // sonraki turlara yalnızca temiz kullanıcı sorusu + nihai yanıtı bırak.
1498
- history.push({ u: msg, a: turn2.text });
1499
  } else {
1500
- botUi.bubble.textContent = turn1.text;
1501
  // Araç çağrılmayan turlarda da eski [Araçlar: ...] başlığını geçmişe taşıma.
1502
- history.push({ u: msg, a: turn1.text });
1503
  }
1504
 
1505
  const sec = Math.max(0.01, (performance.now() - t0) / 1000);
@@ -1517,11 +1665,24 @@
1517
  }
1518
  }
1519
 
 
 
 
 
 
 
 
 
 
 
 
1520
  window.addEventListener("load", () => {
1521
- ensureTokenizer().then(() => ensureSession(modelSelect.value)).catch(() => {});
 
1522
  });
1523
  modelSelect.addEventListener("change", () => {
1524
- ensureTokenizer().then(() => ensureSession(modelSelect.value)).catch(() => {});
 
1525
  });
1526
 
1527
  chatForm.addEventListener("submit", (e) => {
@@ -1565,7 +1726,10 @@
1565
  btn.addEventListener("click", () => {
1566
  if (btn.getAttribute("data-tool") === "1" && toolModeCheck) {
1567
  toolModeCheck.checked = true;
1568
- modelSelect.value = "mima15full";
 
 
 
1569
  }
1570
  sendMessage(btn.getAttribute("data-q"));
1571
  });
 
748
  .msg-row { max-width: 94%; }
749
  .statusbar { justify-content: center; text-align: center; }
750
  }
751
+ .think-box {
752
+ margin-bottom: 8px;
753
+ padding: 8px 11px;
754
+ border-radius: 12px;
755
+ background: var(--p-lavender);
756
+ border: 1.5px solid var(--p-lavender-strong);
757
+ font-size: 12.5px;
758
+ color: var(--ink);
759
+ }
760
+ .think-box summary {
761
+ cursor: pointer;
762
+ font-weight: 700;
763
+ color: var(--stroke);
764
+ user-select: none;
765
+ list-style: none;
766
+ }
767
+ .think-box summary::-webkit-details-marker { display: none; }
768
+ .think-body {
769
+ margin-top: 5px;
770
+ white-space: pre-wrap;
771
+ color: #475569;
772
+ line-height: 1.45;
773
+ }
774
+ .answer-body { white-space: pre-wrap; }
775
+ body[data-model="mima2preview"] {
776
+ --bg: #000000;
777
+ --surface: #0a0a0a;
778
+ --surface-2: #141414;
779
+ --accent: #f5f0e1;
780
+ --accent-ink: #000000;
781
+ }
782
+ body[data-model="mima16"] { --accent: #34d399; }
783
+ body[data-model="mima15full"] { --accent: #60a5fa; }
784
+ body[data-model="mima1"] { --accent: #a1a1aa; }
785
  </style>
786
  </head>
787
  <body>
 
798
  <div class="brand-text">
799
  <h1>
800
  <span>Mima</span>
801
+ <span class="version-pill" id="versionPill">1.6 Pico · 15M</span>
802
  </h1>
803
  <p>Tarayıcıda çalışan Türkçe küçük dil modeli · ONNX WASM</p>
804
  </div>
 
811
  <path d="M9 2.5V6M15 2.5V6M9 18V21.5M15 18V21.5M2.5 9H6M2.5 15H6M18 9H21.5M18 15H21.5" stroke="#3F4B61" stroke-width="2.2" stroke-linecap="round"/>
812
  </svg>
813
  <select id="modelSelect" aria-label="Model Seçimi">
814
+ <option value="mima2preview">Mima 2 Photon Preview (Yerel)</option>
815
+ <option value="mima16" selected>Mima 1.6 Pico (Yerel)</option>
816
+ <option value="mima15full">Mima 1.5 Pico</option>
817
  <option value="mima1">Mima 1 Pico</option>
818
  </select>
819
  </label>
 
857
  <label class="slider-item">Maks. Token <strong id="maxTokVal">96</strong>
858
  <input id="maxTokRange" type="range" min="24" max="200" step="8" value="96" />
859
  </label>
860
+ <label class="slider-item" title="Mima 2 Photon için maksimum düşünce (<think>) token limiti (0 = kapalı)">Düşünce <strong id="thinkTokVal">40</strong>
861
+ <input id="thinkTokRange" type="range" min="0" max="96" step="8" value="40" />
862
+ </label>
863
+ <label class="slider-item" title="Sohbet sorularında bile <think> ile düşünmeye zorlar">
864
+ <input id="forceThinkCheck" type="checkbox" /> Düşünceyi Zorla
865
+ </label>
866
  <label class="slider-item">Tekrar <strong id="repVal">1.00</strong>
867
  <input id="repRange" type="range" min="1.00" max="1.25" step="0.02" value="1.00" />
868
  </label>
 
1044
  const TOOLS_PREFIX = "[Araçlar: hesapla(ifade), hava(sehir), web_ara(sorgu), saat(sehir), kur(miktar, kaynak, hedef), not_ekle(baslik), cevir(metin, dil)]\n";
1045
 
1046
  const MODELS = {
1047
+ mima2preview: { label: "Mima 2 Photon", pill: "Mima 2 Photon · 15M · <think>", url: "./mima_2_photon.onnx", tokUrl: "./tokenizer_photon.json", tools: true, isPhoton: true },
1048
+ mima16: { label: "Mima 1.6 Pico", pill: "1.6 Pico · 15M", url: "./mima_1_6_pico.onnx?v=1.6.0", tokUrl: "./tokenizer.json", tools: true, isPhoton: false },
1049
+ mima15full: { label: "Mima 1.5 Pico", pill: "1.5 Pico · 15M", url: "./mima_1_5_pico.onnx?v=1.5.2", tokUrl: "./tokenizer.json", tools: true, isPhoton: false },
1050
+ mima1: { label: "Mima 1 Pico", pill: "1.0 Pico · 15M", url: "./mima_1.onnx", tokUrl: "./tokenizer.json", tools: false, isPhoton: false },
1051
  };
1052
 
1053
+ const tokenizers = {};
1054
  const sessions = {};
1055
  const sessionPromises = {};
1056
  let activeDownloadMsg = null;
 
1073
  const tempRange = document.getElementById("tempRange");
1074
  const topkRange = document.getElementById("topkRange");
1075
  const maxTokRange = document.getElementById("maxTokRange");
1076
+ const thinkTokRange = document.getElementById("thinkTokRange");
1077
+ const forceThinkCheck = document.getElementById("forceThinkCheck");
1078
  const repRange = document.getElementById("repRange");
1079
  tempRange.oninput = () => document.getElementById("tempVal").textContent = Number(tempRange.value).toFixed(2);
1080
  topkRange.oninput = () => document.getElementById("topkVal").textContent = topkRange.value;
1081
  maxTokRange.oninput = () => document.getElementById("maxTokVal").textContent = maxTokRange.value;
1082
+ thinkTokRange.oninput = () => document.getElementById("thinkTokVal").textContent = thinkTokRange.value;
1083
  repRange.oninput = () => document.getElementById("repVal").textContent = Number(repRange.value).toFixed(2);
1084
 
1085
  function setProgress(msg) {
 
1089
  }
1090
  }
1091
 
1092
+ async function ensureTokenizer(key) {
1093
+ const tokUrl = MODELS[key]?.tokUrl || "./tokenizer.json";
1094
+ if (tokenizers[tokUrl]) return tokenizers[tokUrl];
1095
  setProgress("Tokenizer yükleniyor...");
1096
+ const res = await fetch(tokUrl);
1097
+ if (!res.ok) throw new Error(tokUrl + " yüklenemedi: " + res.status);
1098
+ tokenizers[tokUrl] = new MimaTokenizer(await res.json());
1099
+ return tokenizers[tokUrl];
1100
  }
1101
 
1102
  async function fetchModelBytes(url, label) {
 
1441
  }
1442
  }
1443
 
1444
+ function renderThinkAndAnswer(bubble, rawText, isStreaming = false) {
1445
+ const openTag = "<think>";
1446
+ const closeTag = "</think>";
1447
+ const hasOpen = rawText.includes(openTag);
1448
+ if (!hasOpen) {
1449
+ bubble.textContent = rawText;
1450
+ return rawText;
1451
+ }
1452
+ const afterOpen = rawText.split(openTag).slice(1).join(openTag);
1453
+ const hasClose = afterOpen.includes(closeTag);
1454
+ const thinkPart = hasClose ? afterOpen.split(closeTag)[0].trim() : afterOpen.trim();
1455
+ const ansPart = hasClose ? afterOpen.split(closeTag).slice(1).join(closeTag).trim() : "";
1456
+
1457
+ bubble.textContent = "";
1458
+ const det = document.createElement("details");
1459
+ det.className = "think-box";
1460
+ if (isStreaming || !ansPart) det.open = true;
1461
+ const sum = document.createElement("summary");
1462
+ sum.textContent = hasClose ? "Düşünce Süreci" : "Düşünüyor...";
1463
+ const tb = document.createElement("div");
1464
+ tb.className = "think-body";
1465
+ tb.textContent = thinkPart || "...";
1466
+ det.appendChild(sum);
1467
+ det.appendChild(tb);
1468
+ bubble.appendChild(det);
1469
+
1470
+ if (ansPart) {
1471
+ const ab = document.createElement("div");
1472
+ ab.className = "answer-body";
1473
+ ab.textContent = ansPart;
1474
+ bubble.appendChild(ab);
1475
+ }
1476
+ return ansPart || rawText;
1477
+ }
1478
+
1479
+ async function runGeneratePhoton(sess, tok, promptIds, maxNew, temp, topK, repPen, onStream, thinkBudget = 40, forceThink = false) {
1480
+ const THINK_OPEN = 5, THINK_CLOSE = 6;
1481
+ const allTokens = promptIds.slice();
1482
+ const generated = [];
1483
+ let inThink = false;
1484
+ let thinkCount = 0;
1485
+ let forcedClosed = false;
1486
+
1487
+ if (forceThink && thinkBudget > 0) {
1488
+ allTokens.push(THINK_OPEN);
1489
+ generated.push(THINK_OPEN);
1490
+ inThink = true;
1491
+ if (onStream) onStream(tok.decode(generated, false).trim() || "<think>...");
1492
+ }
1493
+
1494
+ for (let step = 0; step < maxNew; step++) {
1495
+ const ctx = allTokens.slice(-BLOCK_SIZE);
1496
+ const feeds = {
1497
+ input_ids: new ort.Tensor("int64", BigInt64Array.from(ctx.map(BigInt)), [1, ctx.length]),
1498
+ };
1499
+ const out = await sess.run(feeds);
1500
+ const seenSet = new Set(allTokens.slice(-BLOCK_SIZE));
1501
+ let nxt = pickNextToken(out.logits.data, seenSet, temp, topK, repPen);
1502
+ if (nxt === END || nxt === BOS || nxt === USER) {
1503
+ if (inThink && !forcedClosed) {
1504
+ generated.push(THINK_CLOSE);
1505
+ allTokens.push(THINK_CLOSE);
1506
+ inThink = false;
1507
+ forcedClosed = true;
1508
+ if (onStream) onStream(tok.decode(generated, false).trim() || "...");
1509
+ await new Promise((r) => setTimeout(r, 0));
1510
+ continue;
1511
+ }
1512
+ break;
1513
+ }
1514
+
1515
+ if (nxt === THINK_OPEN) {
1516
+ if (thinkBudget <= 0) continue;
1517
+ inThink = true;
1518
+ } else if (nxt === THINK_CLOSE) {
1519
+ inThink = false;
1520
+ } else if (inThink) {
1521
+ thinkCount++;
1522
+ if (thinkCount >= thinkBudget) {
1523
+ generated.push(nxt, THINK_CLOSE);
1524
+ allTokens.push(nxt, THINK_CLOSE);
1525
+ inThink = false;
1526
+ if (onStream) onStream(tok.decode(generated, false).trim() || "...");
1527
+ await new Promise((r) => setTimeout(r, 0));
1528
+ continue;
1529
+ }
1530
+ }
1531
+
1532
+ generated.push(nxt);
1533
+ allTokens.push(nxt);
1534
+ if (onStream) onStream(tok.decode(generated, false).trim() || "...");
1535
+ await new Promise((r) => setTimeout(r, 0));
1536
+ }
1537
+ return { text: tok.decode(generated, false).trim() || "(boş yanıt)", nTokens: generated.length };
1538
+ }
1539
+
1540
  async function runGenerate(sess, tok, promptIds, maxNew, temp, topK, repPen, onStream) {
1541
  const allTokens = promptIds.slice();
1542
  const generated = [];
 
1597
  activeDownloadMsg = botUi.bubble;
1598
 
1599
  try {
1600
+ const tok = await ensureTokenizer(modelKey);
1601
  const sess = await ensureSession(modelKey);
1602
+ const genFn = MODELS[modelKey]?.isPhoton ? runGeneratePhoton : runGenerate;
1603
  activeDownloadMsg = null;
1604
 
1605
  const temp = Number(tempRange.value);
1606
  const topK = Number(topkRange.value);
1607
  const maxNew = Number(maxTokRange.value);
1608
+ const thinkBudget = Number(thinkTokRange?.value ?? 40);
1609
+ const forceThink = Boolean(forceThinkCheck?.checked);
1610
  const repPen = Number(repRange.value);
1611
 
1612
+ const useTools = Boolean(toolModeCheck?.checked) && Boolean(MODELS[modelKey]?.tools);
1613
  const effectiveMsg = useTools ? (TOOLS_PREFIX + msg) : msg;
1614
  const promptIds = buildPromptIds(tok, history, effectiveMsg, maxNew);
1615
 
1616
  const t0 = performance.now();
1617
  statusText.textContent = `${modelLabel} yanıt üretiyor...`;
1618
+ const turn1 = await genFn(sess, tok, promptIds, maxNew, temp, topK, repPen, (txt) => {
1619
+ renderThinkAndAnswer(botUi.bubble, txt, true);
1620
  chatArea.scrollTop = chatArea.scrollHeight;
1621
+ }, thinkBudget, forceThink);
1622
 
1623
  let totalToks = turn1.nTokens;
1624
+ const cleanTurn1 = turn1.text.replace(/<think>[\s\S]*?<\/think>/g, "").trim();
1625
+ const parsedTool = useTools ? parseAracCall(cleanTurn1) : null;
1626
 
1627
  if (parsedTool) {
1628
+ renderToolCard(botUi.bubble, cleanTurn1, "Canlı araç çalıştırılıyor...");
1629
  statusText.textContent = `Canlı araç çalışıyor: ${parsedTool.name}...`;
1630
  const toolResult = await executeRealTool(parsedTool);
1631
+ renderToolCard(botUi.bubble, cleanTurn1, `Araç Sonucu: ${toolResult}`);
1632
 
1633
+ const tempHist = history.concat([{ u: effectiveMsg, a: cleanTurn1 }]);
1634
  const synthMsg = `[Araç Sonucu: ${toolResult}]`;
1635
  const synthIds = buildPromptIds(tok, tempHist, synthMsg, maxNew);
1636
  const botUi2 = appendMessage("bot", "Sonuç yorumlanıyor...", `${modelLabel} · Araç Yanıtı`);
1637
  statusText.textContent = `${modelLabel} araç sonucunu yorumluyor...`;
1638
+ const turn2 = await genFn(sess, tok, synthIds, maxNew, temp, topK, repPen, (txt) => {
1639
+ renderThinkAndAnswer(botUi2.bubble, txt, true);
1640
  chatArea.scrollTop = chatArea.scrollHeight;
1641
+ }, thinkBudget);
1642
+ const cleanTurn2 = renderThinkAndAnswer(botUi2.bubble, turn2.text, false);
1643
  totalToks += turn2.nTokens;
1644
  // Geçmişte [Araçlar: ...], @arac: ve [Araç Sonucu: ...] kalıntılarını buda;
1645
  // sonraki turlara yalnızca temiz kullanıcı sorusu + nihai yanıtı bırak.
1646
+ history.push({ u: msg, a: cleanTurn2 });
1647
  } else {
1648
+ const cleanAns = renderThinkAndAnswer(botUi.bubble, turn1.text, false);
1649
  // Araç çağrılmayan turlarda da eski [Araçlar: ...] başlığını geçmişe taşıma.
1650
+ history.push({ u: msg, a: cleanAns });
1651
  }
1652
 
1653
  const sec = Math.max(0.01, (performance.now() - t0) / 1000);
 
1665
  }
1666
  }
1667
 
1668
+ const versionPill = document.getElementById("versionPill");
1669
+ function syncVersionPill() {
1670
+ const key = modelSelect.value;
1671
+ document.body.dataset.model = key;
1672
+ if (versionPill && MODELS[key]?.pill) {
1673
+ versionPill.textContent = MODELS[key].pill;
1674
+ }
1675
+ if (toolModeCheck && toolModeCheck.parentElement) {
1676
+ toolModeCheck.parentElement.style.display = MODELS[key]?.tools ? "" : "none";
1677
+ }
1678
+ }
1679
  window.addEventListener("load", () => {
1680
+ syncVersionPill();
1681
+ ensureTokenizer(modelSelect.value).then(() => ensureSession(modelSelect.value)).catch(() => {});
1682
  });
1683
  modelSelect.addEventListener("change", () => {
1684
+ syncVersionPill();
1685
+ ensureTokenizer(modelSelect.value).then(() => ensureSession(modelSelect.value)).catch(() => {});
1686
  });
1687
 
1688
  chatForm.addEventListener("submit", (e) => {
 
1726
  btn.addEventListener("click", () => {
1727
  if (btn.getAttribute("data-tool") === "1" && toolModeCheck) {
1728
  toolModeCheck.checked = true;
1729
+ if (!MODELS[modelSelect.value]?.tools) {
1730
+ modelSelect.value = "mima16";
1731
+ syncVersionPill();
1732
+ }
1733
  }
1734
  sendMessage(btn.getAttribute("data-q"));
1735
  });
mima_1_6_pico.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:559af183da5b198f0f947e028119bc7fc43218d359b47b8a0b8a8b07458ae8e5
3
+ size 37535069
mima_2_photon.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f635b4b766e97d52459caef6dd69741ffbd875fccf0c4d06737f3a812ef7addf
3
+ size 38888325
mima_2_photon_preview.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a3148856c4c56df3af54f51662b2ebdc1d51af46b6c6da2d850cee509ed2eaa6
3
+ size 38816758
tokenizer_photon.json ADDED
The diff for this file is too large to render. See raw diff