let leaderboardDataCreativeWriting = `model,score,ci95_low,ci95_high,params,avgLength,slopScore,vocabComplexity alpindale/WizardLM-2-8x22B,78.91,78.17,79.65,8x22,5856,10.93,46.85 google/gemma-2-9b-it,76.15,75.13,77.17,9,4010,12.10,47.16 CohereForAI/c4ai-command-r-plus-08-2024,76.13,75.34,76.92,104,5566,15.24,53.8 meta-llama/Llama-3.2-3B-Instruct,62.5,61.13,63.88,3,4968,8.97,43.84 deepseek-ai/DeepSeek-R1,87.11,86.78,87.45,18x37,5272,5.29,33.24 deepseek-ai/deepseek-r1-distill-llama-70b,76.17,nan,nan,70,6509,8.7,38.65 deepseek-ai/deepseek-r1-distill-qwen-14b,55.0,nan,nan,14,8000,8.55,50.91 deepseek-ai/deepseek-r1-distill-qwen-32b,73.05,nan,nan,32,5525,8.88,37.24 grok-beta,78.11,76.55,79.67,,4768,15.16,61.24 mistralai/mistral-small-24b-instruct-2501,67.55,,,24,5836,10.62,35.86 gemini-2.0-flash-thinking-exp-1219,82.5,81.08,83.92,,7476,9.25,44.17 deepseek-ai/DeepSeek-V3,81.19,80.76,81.61,18x37,6402,8.49,41.8 gpt-4o-2024-11-20,84.59,84.17,85.01,,6642,7.22,42.02 lemon07r/Gemma-2-Ataraxy-v4d-9B,82.24,81.75,82.72,9,5661,11.56,49.26 sam-paech/Darkest-muse-v1,84.25,83.72,84.78,9,7133,5.19,37.57 claude-3-5-sonnet-20241022,83.0,82.65,83.35,,4710,4.27,43.08 sam-paech/Quill-v1,79.75,78.5,81.01,9,5910,4.84,35.75 lemon07r/Gemma-2-Ataraxy-v2-9B,83.28,82.75,83.82,9,4366,17.43,73.19 gemini-1.5-pro-002,81.44,81.13,81.76,,4799,10.0,41.35 Qwen/Qwen2.5-72B-Instruct,72.16,70.06,74.26,72,7344,8.24,40.93 mistralai/Mistral-Small-Instruct-2409,72.39,70.03,74.75,22,5914,8.14,30.19 chatgpt-4o-latest-2024-09-03,82.51,82.04,82.99,,6204,5.28,31.71 CohereForAI/c4ai-command-r-plus-08-2024,76.13,75.34,76.92,104,5566,15.24,53.8 o1-preview-2024-09-12,80.52,80.31,80.74,,7072,10.55,37.91 o1-mini-2024-09-12,76.32,74.43,78.21,,6193,13.7,53.59 ifable/gemma-2-Ifable-9B,84.59,84.24,84.95,9,4936,15.47,68.63 ArliAI/Mistral-Nemo-12B-ArliAI-RPMax-v1.1,56.42,53.63,59.2,12,5419,6.72,39.14 !FluffyKaeloky/Luminum-v0.1-123B,67.6,,,123,4963,7.94,38.45 !TheDrummer/Theia-21B-v1,58.87,58.26,59.49,21,6265,7.36,33.54 !Sao10K/MN-12B-Lyra-v1,72.85,70.8,74.9,12,5974,6.89,39.46 arcee-ai/Arcee-Scribe,64.15,62.15,66.14,7,5016,15.99,51.82 lemon07r/Gemma-2-Ataraxy-9B,82.36,81.97,82.76,9,4574,14.72,54.9 nbeerbower/mistral-nemo-gutenberg-12B-v2,80.12,79.2,81.03,12,4988,15.8,52.65 OmnicromsBrain/NeuralStar_FusionWriter_4x7b,75.09,73.26,76.92,4x7,4956,16.91,55.79 !OmnicromsBrain/Eros_Scribe-7b,68.04,66.54,69.53,7,10040,8.42,34.96 meta-llama/Meta-Llama-3.1-405B-Instruct,71.98,71.15,72.81,405,4462,10.65,46.75 dnhkng/RYS-Llama-3-Huge-Instruct,75.63,75.2,76.06,99,4507,9.59,44.5 gemini-1.5-pro-exp-0801,80.34,79.7,80.99,,5329,10.86,43.27 mistralai/Mistral-Large-Instruct-2407,77.17,75.3,79.03,123,4789,10.8,36.19 mistralai/Mistral-Nemo-Instruct-2407,77.46,76.82,78.1,12,6265,9.22,33.96 DeepSeek-V2-Chat-0628,69.77,68.84,70.69,236B-21A,5489,9.8,35.28 gpt-4o-mini,78.41,77.62,79.21,,5647,10.56,42.28 UCLA-AGI/Gemma-2-9B-It-SPPO-Iter3,78.76,78.17,79.36,9,4210,13.81,48.72 N8Programs/Coxcomb,71.4,70.62,72.17,7,5474,12.94,51.79 !sophosympatheia/New-Dawn-Llama-3-70B-32K-v1.0,58.48,54.75,62.22,70,6811,8.27,45.72 !TheDrummer/Llama-3SOME-8B-v2,70.59,69.54,71.65,8,4466,11.28,46.71 google/gemma-2-27b-it,77.22,76.4,78.04,27,4010,10.94,39.54 !Sao10K/L3-8B-Stheno-v3.2,69.21,68.62,69.8,8,4321,12.28,49.92 OmnicromsBrain/NeuralStar_AlphaWriter_4x7b,74.21,73.61,74.82,4x7,5461,17.12,59.3 !Sao10K/L3-70B-Euryale-v2.1,67.32,66.35,68.28,70,4473,5.91,32.43 gpt-3.5-turbo-0301,42.33,41.2,43.47,,3443,6.38,37.35 gpt-4-0125-preview,77.43,76.84,78.01,,5047,11.98,49.38 CohereForAI/c4ai-command-r-plus,64.75,63.95,65.55,104,5961,11.13,47.43 !sophosympatheia/Midnight-Miqu-70B-v1.5,77.15,76.62,77.68,70,7787,9.55,40.1 gemini-1.5-flash-001,71.96,71.08,72.84,,4933,10.55,38.05 mistralai/Mixtral-8x22B-Instruct-v0.1,63.64,62.49,64.8,8x22,4390,13.56,47.69 openchat/openchat-3.5-1210,57.28,56.38,58.17,7,4914,11.53,45.36 garage-bAInd/Platypus2-70B-instruct,47.45,45.8,49.09,70,3561,9.39,50.22 meta-llama/Llama-2-7b-chat-hf,46.67,45.32,48.01,7,3874,10.24,44.39 google/gemma-2b-it,41.13,40.23,42.03,2,2890,22.43,53.26 Qwen/Qwen1.5-110B-Chat,75.33,74.55,76.12,110,4269,15.09,50.5 google/gemma-7b-it,46.19,44.94,47.44,7,2671,20.24,55.43 meta-llama/Llama-2-13b-chat-hf,49.14,47.87,50.4,13,3809,9.22,45.41 meta-llama/Llama-3-8b-chat-hf,61.7,60.38,63.02,8,4112,9.43,43.91 mistralai/Mixtral-8x7B-Instruct-v0.1,59.32,58.16,60.47,8x7,4775,11.59,47.01 Qwen/Qwen1.5-14B-Chat,65.23,64.22,66.25,14,3736,17.52,54.29 01-ai/Yi-34B-Chat,71.1,69.75,72.44,34,4496,11.11,47.24 meta-llama/Llama-3-70b-chat-hf,71.28,70.07,72.48,70,4439,10.3,45.41 gemini-1.5-pro-001,80.27,79.76,80.77,,4312,10.15,41.77 gpt-4o,75.61,74.87,76.34,,5401,10.78,41.93 claude-3-opus-20240229,73.58,72.51,74.65,,4846,7.65,40.87 claude-3-haiku-20240307,68.97,68.14,69.81,,4907,9.78,43.08 claude-3-5-sonnet-20240620,78.77,78.41,79.13,,5875,8.35,39.13 Qwen/Qwen1.5-4B-Chat,27.01,26.48,27.54,4,3219,5.63,45.37 claude-3-7-sonnet-20250219,84.45,84.23,84.67,,5976,4.94,43.15 gemini-2.0-flash-001,81.41,81.18,81.65,,5692,8.18,41.23 gpt-4.5-preview-2025-02-27,81.68,81.68,81.68,,5792,8.6,45.69 liquid/lfm-7b,79.65,79.24,80.07,7,5477,13.53,52.89 qwen/qwq-32b,84.71,84.09,85.33,32,5134,5.41,31.59 !thedrummer/skyfall-36b-v2,62.06,62.06,62.06,36,5383,8.1,43.63 latitudegames/wayfarer-large-70b-llama-3.3,76.01,76.01,76.01,70,4993,9.48,44.8 !TheDrummer/Anubis-Pro-105B-v1,64.48,64.48,64.48,105,5660,9.07,39.58 google/gemma-3-27b-it,85.25,85.25,85.25,27,6673,6.56,42.59 *mistralai/Mistral-Small-3.1-24B-Instruct-2503,66.25,66.25,66.25,24,7806,8.29,32.16 *gemini-2.5-pro-exp-03-25,86.18,86.18,86.18,,7486,7.65,39.63 *deepseek-ai/DeepSeek-V3-0324,84.47,84.47,84.47,18x37,4511,5.3,28.29` function setupDarkModeToggle() { var toggle = document.getElementById('darkModeToggle'); var label = document.getElementById('toggleLabel'); // Check if a preference is saved in localStorage const savedMode = localStorage.getItem('darkModeEnabled'); if (savedMode) { document.body.classList.toggle('dark-mode', savedMode === 'true'); toggle.checked = savedMode === 'true'; label.textContent = savedMode === 'true' ? 'Dark' : 'Light'; updateCreativeWritingScoreBarColors(); // Ensure score bars match the theme } toggle.addEventListener('change', function() { document.body.classList.toggle('dark-mode', this.checked); label.textContent = this.checked ? 'Dark' : 'Light'; localStorage.setItem('darkModeEnabled', this.checked); // Save preference updateCreativeWritingScoreBarColors(); // Update score bars on toggle }); } function applySystemTheme() { // Only apply system theme if there's no saved preference if (localStorage.getItem('darkModeEnabled') === null) { const prefersDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches; const toggle = document.getElementById('darkModeToggle'); const label = document.getElementById('toggleLabel'); document.body.classList.toggle('dark-mode', prefersDarkMode); toggle.checked = prefersDarkMode; label.textContent = prefersDarkMode ? 'Dark' : 'Light'; updateCreativeWritingScoreBarColors(); // Ensure score bars match the theme } } function displayEncodedEmail() { var encodedUser = 'contact'; var encodedDomain = 'eqbench.com'; var emailElement = document.getElementById('email'); emailElement.innerHTML = decodeHtmlEntities(encodedUser + '@' + encodedDomain); var emailAddress = emailElement.innerText; emailElement.innerHTML = `Contact`; } function decodeHtmlEntities(encodedString) { var textArea = document.createElement('textarea'); textArea.innerHTML = encodedString; return textArea.value; } function updateCreativeWritingScoreBarColors() { const scoreBars = document.querySelectorAll('.creative-writing-score-bar'); const isDarkMode = document.body.classList.contains('dark-mode'); // Check if dark mode is active const numBars = scoreBars.length; scoreBars.forEach((bar, index) => { const startPercent = (index / numBars); const endPercent = ((index + 1) / numBars); // Adjust the lightness value based on the mode; darker for dark mode, lighter for light mode const lightness = isDarkMode ? '50%' : '80%'; // Lighter in light mode const startColor = `hsl(${startPercent * 360}, 40%, ${lightness})`; const endColor = `hsl(${endPercent * 360}, 40%, ${lightness})`; bar.style.background = `linear-gradient(to bottom, ${startColor}, ${endColor})`; bar.style.display = 'block'; // Make sure to display the bar }); } $.fn.dataTable.ext.type.order['params-pre'] = function (data) { if (!data || data === '-') { return 9999; // Sort missing or null values last } if (data.includes('x')) { const parts = data.split('x').map(Number); return parts.reduce((acc, val) => acc * val, 1); // Multiply if in 'x' format } return parseFloat(data) || 0; // Default to float conversion }; function loadLeaderboardData() { const creativeWritingRows = leaderboardDataCreativeWriting.split('\n').slice(1); // Skip header for Creative Writing data // Calculate max score for Creative Writing maxScoreCreativeWriting = Math.max(...creativeWritingRows.map(row => parseFloat(row.split(',')[1]))); const maxScore = maxScoreCreativeWriting; // Get min and max vocab complexity for normalization const vocabValues = creativeWritingRows.map(row => { const values = row.split(','); // Divide by 10 when getting vocab values for min/max calculation return parseFloat(values[6]) / 10; }).filter(value => !isNaN(value)); const minVocab = 30; const maxVocab = 80; let html = creativeWritingRows.map(creativeWritingRow => { let [modelName, score, ci95_low, ci95_high, params, avgLength, gptSlop, vocabComplexity] = creativeWritingRow.split(','); const scoreNum = parseFloat(score); const ci95LowNum = parseFloat(ci95_low); const ci95HighNum = parseFloat(ci95_high); // Divide by 10 when parsing the value let vocabNum = parseFloat(vocabComplexity) / 10; vocabNum = Math.min((vocabNum / 7.5) * 10, 10); gptSlop = parseFloat(gptSlop).toFixed(1) // Calculate score percentage const scorePercentage = (scoreNum / maxScore) * 100; const errorBarLeftPos = ((ci95LowNum / maxScore) * 100).toFixed(2); const errorBarRightPos = ((ci95HighNum / maxScore) * 100).toFixed(2); const errorBarWidth = (errorBarRightPos - errorBarLeftPos).toFixed(2); const isNsfwModel = modelName.startsWith('!'); modelName = modelName.replace(/^\!/, ''); const isNewModel = modelName.startsWith('*'); modelName = modelName.replace(/^\*/, ''); // Extract model name without creator let displayModelName = modelName.split('/').pop(); if (isNsfwModel) { displayModelName = '🔞' + displayModelName } if (isNewModel) { displayModelName = '🆕' + displayModelName } let modelNameDisplay = modelName.includes('/') ? `${displayModelName}` : displayModelName; let modelResultsFn = 'results/creative-writing-v2/' + modelName.replace('/','__')+'.txt' let scoreBarCreativeWriting = `
${score}
`; // Use the vocabNum (already divided by 10) in the data attribute and display return ` ${modelNameDisplay} ${params} ${avgLength} ${gptSlop} ${vocabNum.toFixed(1) || '-'} ${scoreBarCreativeWriting} Sample `; }).join(''); document.getElementById('leaderboardBody').innerHTML = html; initializeDataTable(); updateCreativeWritingScoreBarColors(); } let currentOrder = [[5, "desc"]]; // Default sorting (updated to reflect the new column position) let dataTableConfig = { "order": currentOrder, "paging": false, // Disable pagination "searching": false, // Disable search bar "lengthMenu": [50, 100, 200, 1000], "language": { "lengthMenu": "Show _MENU_" }, "columnDefs": [ { "targets": [5], "orderSequence": ["desc", "asc"] }, { "targets": [2,3,4], "orderSequence": ["desc", "asc"] }, { "targets": [1], "type": "params", "orderSequence": ["asc", "desc"] }, ], "dom": "<'d-flex flex-column flex-md-row justify-content-between'<'dataTables_length'l><'dataTables_filter'f>>" + "<'row'<'col-12'tr>>" + "<'row'<'col-md-5'i><'col-md-7'p>>", "drawCallback": function() { updateCreativeWritingScoreBarColors(); } } function initializeDataTable() { let table = $('#leaderboard').DataTable(dataTableConfig); } document.addEventListener('DOMContentLoaded', function() { // Always execute displayEncodedEmail(); // Conditional execution based on the presence of elements if (document.getElementById('leaderboard')) { loadLeaderboardData(); // Only load leaderboard data if the leaderboard element exists setupControls(); } // This checks if the system theme preference should be applied, which is common functionality applySystemTheme(); setupDarkModeToggle(); }); function setupControls() { const vocabSlider = document.getElementById('vocabControlSlider'); const vocabSliderValueLabel = document.getElementById('vocabControlValue'); const gptSlopSlider = document.getElementById('gptSlopControlSlider'); const gptSlopSliderValueLabel = document.getElementById('gptSlopControlValue'); // Set the initial value of the slider value labels vocabSliderValueLabel.textContent = `${vocabSlider.value}%`; gptSlopSliderValueLabel.textContent = `${gptSlopSlider.value}%`; // Update scores based on the initial slider values updateScores(); vocabSlider.oninput = function() { vocabSliderValueLabel.textContent = `${this.value}%`; updateScores(); }; gptSlopSlider.oninput = function() { gptSlopSliderValueLabel.textContent = `${this.value}%`; updateScores(); }; } function normalizeVocabComplexity(value) { console.log(value); // Normalize vocab complexity from 30-80 range to 0-1 range const minVocab = 5.5; const maxVocab = 10; // Clamp the value to the min-max range const clampedValue = Math.max(minVocab, Math.min(maxVocab, value)); // Normalize to 0-1 range (1 is high complexity, 0 is low) retval = Math.pow((clampedValue - minVocab) / (maxVocab - minVocab), 2) console.log(retval); return retval; } function updateScores() { const vocabPercentage = document.getElementById('vocabControlSlider').value; const gptSlopPercentage = document.getElementById('gptSlopControlSlider').value; const vocabAdjustmentFactor = parseFloat(vocabPercentage) / 100; const gptSlopAdjustmentFactor = 0.05 * parseFloat(gptSlopPercentage) / 100; const avgGptSlop = calculateAverageGptSlop(); //console.log("Average GPT-Slop:", avgGptSlop); const table = $('#leaderboard').DataTable(); // Get the current page and sorting information const currentPage = table.page.info().page; const currentOrder = table.order(); // Clear the existing table table.destroy(); // Update the scores and error bars $('#leaderboardBody tr').each(function() { const row = $(this); const modelGptSlop = parseFloat(row.attr('data-gpt-slop')); const vocabComplexity = parseFloat(row.attr('data-vocab')); const originalScore = parseFloat(row.attr('data-original-score')); const originalCILow = parseFloat(row.attr('data-original-ci-low')); const originalCIHigh = parseFloat(row.attr('data-original-ci-high')); // Vocab adjustment: -2.5 pts for high complexity (1.0), +2.5 pts for low complexity (0.0) let vocabAdjustment = 0; if (!isNaN(vocabComplexity)) { const normalizedVocab = normalizeVocabComplexity(vocabComplexity); // Scale from -2.5 to +2.5 based on slider position vocabAdjustment = -1.0 * 12.0 * normalizedVocab * vocabAdjustmentFactor; //(0.5 - normalizedVocab) * 8 * vocabAdjustmentFactor; } // GPT-Slop adjustment let gptSlopRatio = !isNaN(modelGptSlop) ? modelGptSlop / avgGptSlop : 1; if (gptSlopRatio < 0.34) { gptSlopRatio = 0.34; } let gptSlopAdjustment = 1; // Default to 1 (no adjustment) if calculation fails if (!isNaN(gptSlopRatio)) { if (gptSlopRatio > 1) { // Penalize higher GPT-slop gptSlopAdjustment = 1 - (Math.log(gptSlopRatio) * gptSlopAdjustmentFactor); gptSlopAdjustment = Math.max(gptSlopAdjustment, 0.85); // Floor at 0.85 } else { // Reward lower GPT-slop with tapering gptSlopAdjustment = 1 + (Math.log(1.5 / (gptSlopRatio+0.5)) * gptSlopAdjustmentFactor); gptSlopAdjustment = Math.min(gptSlopAdjustment, 1.02); // Cap at 1.03 } } // Apply both adjustments const adjustedScore = originalScore * gptSlopAdjustment + vocabAdjustment; const adjustedCILow = originalCILow * gptSlopAdjustment + vocabAdjustment; const adjustedCIHigh = originalCIHigh * gptSlopAdjustment + vocabAdjustment; const scoreText = adjustedScore.toFixed(2); // Update the score row.find('td:eq(5)').attr('data-order', scoreText).find('.score-text').text(scoreText); // Update error bar position and width const errorBarLeftPos = ((adjustedCILow / maxScoreCreativeWriting) * 98).toFixed(2); const errorBarRightPos = ((adjustedCIHigh / maxScoreCreativeWriting) * 98).toFixed(2); const errorBarWidth = (errorBarRightPos - errorBarLeftPos).toFixed(2); row.find('.error-bar').css({ 'left': `${errorBarLeftPos}%`, 'width': `${errorBarWidth}%` }); }); // Reinitialize the DataTable const newTable = $('#leaderboard').DataTable(dataTableConfig); // Restore the previous page newTable.page(currentPage).draw('page'); // Update the score bar widths $('#leaderboardBody tr').each(function() { const row = $(this); const scoreText = row.find('td:eq(5)').attr('data-order'); const percentageWidth = Math.max(0, Math.min(100, (parseFloat(scoreText) / maxScoreCreativeWriting) * 98)); row.find('.creative-writing-score-bar').css('width', `${percentageWidth}%`); }); } function calculateAverageGptSlop() { const gptSlops = Array.from(document.querySelectorAll('#leaderboardBody tr')) .map(row => parseFloat(row.getAttribute('data-gpt-slop'))) .filter(val => !isNaN(val)); return gptSlops.length > 0 ? gptSlops.reduce((a, b) => a + b, 0) / gptSlops.length : 1; }