|
486 | 486 | return thumbnail; |
487 | 487 | } |
488 | 488 |
|
| 489 | + // --- RQ1 MODEL SELECTOR --- |
| 490 | + const rq1Models = [ |
| 491 | + { id: 'gpt-4o', label: 'GPT-4o' }, |
| 492 | + { id: 'gpt-4o-mini', label: 'GPT-4o-mini' }, |
| 493 | + { id: 'gpt-oss_120b', label: 'GPT-OSS 120B' }, |
| 494 | + { id: 'qwen_110b', label: 'Qwen 110B' }, |
| 495 | + { id: 'llama3.3_70b', label: 'Llama-3.3 70B' }, |
| 496 | + { id: 'deepseek-r1_70b', label: 'DeepSeek-R1 70B' }, |
| 497 | + { id: 'gemma3_27b', label: 'Gemma-3 27B' }, |
| 498 | + { id: 'llama_4_scout_17b', label: 'Llama-4 Scout 17B' }, |
| 499 | + { id: 'phi4_14b', label: 'Phi-4 14B' }, |
| 500 | + { id: 'qwen3_8b', label: 'Qwen 8B' }, |
| 501 | + { id: 'mistral_latest', label: 'Mistral 8x7B' }, |
| 502 | + ]; |
| 503 | + |
| 504 | + function buildRQ1ModelSelector() { |
| 505 | + const container = document.getElementById('rq1-model-thumbnails'); |
| 506 | + const heatmap = document.getElementById('rq1-heatmap'); |
| 507 | + const title = document.getElementById('rq1-plot-title'); |
| 508 | + if (!container || !heatmap) return; |
| 509 | + |
| 510 | + let selectedModel = rq1Models[0].id; |
| 511 | + |
| 512 | + function update() { |
| 513 | + const model = rq1Models.find(m => m.id === selectedModel); |
| 514 | + const path = `assets/experiments/augmentation_selection/${selectedModel}/augmentation_selection_${selectedModel}_heatmap_flipped.png`; |
| 515 | + heatmap.src = path; |
| 516 | + heatmap.alt = `Heatmap of ${model.label} corruption selection frequencies`; |
| 517 | + if (title) title.textContent = `Corruption Selection Frequencies (${model.label})`; |
| 518 | + container.querySelectorAll('.rq1-model-btn').forEach(btn => { |
| 519 | + btn.classList.toggle('active', btn.dataset.model === selectedModel); |
| 520 | + }); |
| 521 | + } |
| 522 | + |
| 523 | + rq1Models.forEach(model => { |
| 524 | + const btn = document.createElement('button'); |
| 525 | + btn.type = 'button'; |
| 526 | + btn.className = 'rq1-model-btn'; |
| 527 | + btn.dataset.model = model.id; |
| 528 | + btn.textContent = model.label; |
| 529 | + btn.addEventListener('click', () => { |
| 530 | + selectedModel = model.id; |
| 531 | + update(); |
| 532 | + }); |
| 533 | + container.appendChild(btn); |
| 534 | + }); |
| 535 | + |
| 536 | + update(); |
| 537 | + } |
| 538 | + |
489 | 539 | // --- INITIALIZATION --- |
490 | 540 | function initialize() { |
491 | 541 | buildCorruptionGallery(); |
492 | 542 | buildUseCasesSection(); |
| 543 | + buildRQ1ModelSelector(); |
493 | 544 | document.querySelectorAll('.experiment').forEach(expDiv => { |
494 | 545 | const expKey = expDiv.dataset.exp; |
495 | 546 | const basePath = `assets/experiments/${expKey}`; |
|
0 commit comments