function parameterPareto(models) { return models.filter(m => !models.some(other => other.params <= m.params && indexScore(other) >= indexScore(m) && (other.params < m.params || indexScore(other) > indexScore(m)) )).sort((a,b) => a.params-b.params); } function renderParameterChart(selection) { const models = selection.filter(m => m.params > 0 && indexScore(m) !== null && !m.excludedSizeComparison); const container = document.getElementById('parameter-chart'); document.getElementById('parameter-count').textContent = `${models.length} selected models`; document.getElementById('parameter-legend').innerHTML = [...new Set(models.map(m=>m.org))].map(id => `${escape(ORGS[id].name)}`).join(''); if (!models.length) { container.innerHTML = '
Select models to compare intelligence and parameter count.
'; return; } const left=66, top=24, width=950, height=350; const logs=models.map(m=>Math.log10(m.params)); const minLog=Math.floor((Math.min(...logs)-.06)*4)/4; const maxLog=Math.max(minLog+.5,Math.ceil((Math.max(...logs)+.08)*4)/4); const scores=models.map(indexScore); const bottomScore=Math.max(0,Math.floor((Math.min(...scores)-5)/10)*10); const topScore=Math.min(100,Math.max(bottomScore+20,Math.ceil((Math.max(...scores)+5)/10)*10)); const x=p=>left+(Math.log10(p)-minLog)/(maxLog-minLog)*width; const y=s=>top+height-(s-bottomScore)/(topScore-bottomScore)*height; const median=values=>{const a=[...values].sort((a,b)=>a-b);return (a[Math.floor((a.length-1)/2)]+a[Math.ceil((a.length-1)/2)])/2;}; const midX=x(median(models.map(m=>m.params))),midY=y(median(scores)); const formatParams=p=>p>=1e9?`${+(p/1e9).toFixed(2)}B`:p>=1e6?`${+(p/1e6).toFixed(2)}M`:`${+(p/1e3).toFixed(2)}K`; let axes=''; for(let score=bottomScore;score<=topScore;score+=10){ axes+=`