Ferrell Synthetic Intelligence commited on
Commit
d109328
·
1 Parent(s): 5232c15

Make Model Arena dynamically benchmark packs

Browse files
Files changed (1) hide show
  1. app.js +8 -4
app.js CHANGED
@@ -348,10 +348,14 @@ async function saveReplay(status = 'verified') {
348
  }
349
 
350
  async function compareModels() {
351
- const scores = { 'smollm2-360m-q8': 0.667, 'qwen-coder-0.5b-q4': 0.667, 'qwen-coder-1.5b-q4': 0.667 };
352
- const winner = Object.entries(scores).sort((a, b) => b[1] - a[1])[0];
353
- $('#arena-status').textContent = `Smoke winner: ${winner[0]} (${(winner[1] * 100).toFixed(1)}%). Equal tie; use role and memory to choose.`;
354
- appendLog('MODEL ARENA', 'Comparison uses the recorded live smoke scorecard; no general capability claim.');
 
 
 
 
355
  }
356
 
357
  async function digestFile(file) {
 
348
  }
349
 
350
  async function compareModels() {
351
+ $('#arena-status').textContent = 'Running models sequentially...';
352
+ try {
353
+ const response = await fetch('http://127.0.0.1:4777/api/arena/run', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ approved: true }) });
354
+ const result = await response.json();
355
+ if (!response.ok) throw new Error(result.error || 'arena failed');
356
+ $('#arena-status').textContent = result.winner ? `Winner: ${result.winner.model} (${(result.winner.score * 100).toFixed(1)}%, avg ${result.winner.latency_ms}ms)` : 'No model completed.';
357
+ appendLog('MODEL ARENA', 'Live sequential comparison complete. Scores are benchmark-local only.');
358
+ } catch (error) { $('#arena-status').textContent = `Arena blocked: ${error.message}`; appendLog('MODEL ARENA', error.message, 'warning'); }
359
  }
360
 
361
  async function digestFile(file) {