File size: 18,383 Bytes
cd21762
1
please integrate this webpage with facier, but more professional graphics and stylings, and also i need it to show info graphics of the information contained in this html, which should be a fading in overlay that comes in to view when hovered over, taking up almost the whole screen, so the user can read: <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Cost Efficiency Timeline</title>     <script src="https://cdn.tailwindcss.com"></script>     <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>     <style>         body {             font-family: 'Inter', sans-serif;             background-color: #f8fafc;         }                  .gradient-text {             background: linear-gradient(90deg, #2563eb, #10b981);             -webkit-background-clip: text;             background-clip: text;             color: transparent;         }                  .info-card {             transition: all 0.3s ease;         }                  .info-card:hover {             transform: translateY(-5px);             box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);         }     </style> </head> <body class="antialiased text-slate-800 p-8">     <div class="max-w-6xl mx-auto">         <h1 class="text-4xl font-bold mb-2 gradient-text">Cost Efficiency Analysis</h1>         <h2 class="text-xl text-slate-600 mb-8">Traditional LoRA Training vs. Combinatorial Approach at Scale</h2>                  <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">             <div class="info-card bg-white rounded-xl shadow-lg p-6">                 <div class="text-3xl font-bold text-red-500 mb-2">$1,752</div>                 <div class="text-sm font-medium text-slate-600">Traditional Annual Cost</div>                 <div class="text-xs text-slate-500 mt-2">For 400 daily LoRA trainings</div>             </div>                          <div class="info-card bg-white rounded-xl shadow-lg p-6">                 <div class="text-3xl font-bold text-green-500 mb-2">$17.52</div>                 <div class="text-sm font-medium text-slate-600">Combinatorial Annual Cost</div>                 <div class="text-xs text-slate-500 mt-2">Using 50 base LoRAs</div>             </div>                          <div class="info-card bg-white rounded-xl shadow-lg p-6">                 <div class="text-3xl font-bold text-blue-500 mb-2">99%</div>                 <div class="text-sm font-medium text-slate-600">Cost Reduction</div>                 <div class="text-xs text-slate-500 mt-2">With combinatorial approach</div>             </div>         </div>                  <div class="bg-white rounded-xl shadow-lg p-6 mb-8">             <div class="grid grid-cols-1 md:grid-cols-2 gap-8">                 <div>                     <h3 class="text-xl font-bold text-slate-800 mb-4">Traditional Approach</h3>                     <div class="space-y-4">                         <div class="flex items-start">                             <div class="bg-red-100 text-red-600 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-3 mt-1">                                 <i class="fas fa-bolt"></i>                             </div>                             <div>                                 <p class="font-medium">400 LoRA trainings per day</p>                                 <p class="text-sm text-slate-500">Each training takes 20 minutes on RTX 3090 at 70% power (300W)</p>                             </div>                         </div>                                                  <div class="flex items-start">                             <div class="bg-red-100 text-red-600 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-3 mt-1">                                 <i class="fas fa-calculator"></i>                             </div>                             <div>                                 <p class="font-medium">Energy Calculation:</p>                                 <p class="text-sm text-slate-500">300W × (20min/60) × 400 = 40,000 Wh = 40 kWh/day</p>                             </div>                         </div>                                                  <div class="flex items-start">                             <div class="bg-red-100 text-red-600 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-3 mt-1">                                 <i class="fas fa-dollar-sign"></i>                             </div>                             <div>                                 <p class="font-medium">Cost at $0.12/kWh:</p>                                 <p class="text-sm text-slate-500">40 kWh × $0.12 = $4.80/day → $146/month → $1,752/year</p>                             </div>                         </div>                                                  <div class="flex items-start">                             <div class="bg-red-100 text-red-600 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-3 mt-1">                                 <i class="fas fa-infinity"></i>                             </div>                             <div>                                 <p class="font-medium">950M Characters Cost:</p>                                 <p class="text-sm text-slate-500">$4,140,000 (at 400/day for 950M characters)</p>                             </div>                         </div>                     </div>                 </div>                                  <div>                     <h3 class="text-xl font-bold text-slate-800 mb-4">Combinatorial Approach</h3>                     <div class="space-y-4">                         <div class="flex items-start">                             <div class="bg-green-100 text-green-600 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-3 mt-1">                                 <i class="fas fa-project-diagram"></i>                             </div>                             <div>                                 <p class="font-medium">50 Base LoRAs</p>                                 <p class="text-sm text-slate-500">(5 ethnicities × 5 age groups × 2 genders)</p>                             </div>                         </div>                                                  <div class="flex items-start">                             <div class="bg-green-100 text-green-600 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-3 mt-1">                                 <i class="fas fa-random"></i>                             </div>                             <div>                                 <p class="font-medium">Weighted Combinations</p>                                 <p class="text-sm text-slate-500">3 LoRAs per generation at weights from 0.05 to 1.00</p>                             </div>                         </div>                                                  <div class="flex items-start">                             <div class="bg-green-100 text-green-600 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-3 mt-1">                                 <i class="fas fa-calculator"></i>                             </div>                             <div>                                 <p class="font-medium">Energy Calculation:</p>                                 <p class="text-sm text-slate-500">50 LoRAs × 20min = 16.7h total training → 5 kWh</p>                             </div>                         </div>                                                  <div class="flex items-start">                             <div class="bg-green-100 text-green-600 rounded-full w-8 h-8 flex items-center justify-center flex-shrink-0 mr-3 mt-1">                                 <i class="fas fa-infinity"></i>                             </div>                             <div>                                 <p class="font-medium">950M Characters Cost:</p>                                 <p class="text-sm text-slate-500">Same 50 LoRAs → $0.60 one-time cost</p>                             </div>                         </div>                     </div>                 </div>             </div>         </div>                  <div class="bg-white rounded-xl shadow-lg p-6 mb-8">             <h3 class="text-xl font-bold text-slate-800 mb-4">Cost Comparison Over Extended Timeframe (Logarithmic Scale)</h3>             <canvas id="costTimelineChart" height="400"></canvas>         </div>                  <div class="bg-white rounded-xl shadow-lg p-6 mb-8">             <h3 class="text-xl font-bold text-slate-800 mb-4">Energy Consumption Comparison (Logarithmic Scale)</h3>             <canvas id="energyChart" height="400"></canvas>         </div>                  <div class="bg-white rounded-xl shadow-lg p-6">             <h3 class="text-xl font-bold text-slate-800 mb-4">Toongether.AI Efficiency Report</h3>             <div class="prose max-w-none">                 <h4 class="text-lg font-semibold text-slate-700">Key Findings:</h4>                 <ul class="list-disc pl-5 space-y-2">                     <li>The combinatorial approach reduces energy consumption by <span class="font-bold">99.9%</span> compared to traditional LoRA training</li>                     <li>At 950M characters, traditional training would cost <span class="font-bold">$4.14 million</span> while combinatorial costs <span class="font-bold">$0.60</span></li>                     <li>Each additional character in traditional approach adds $0.0044 in cost, while combinatorial adds <span class="font-bold">$0.00000000063</span></li>                     <li>The combinatorial method can generate <span class="font-bold">950M+ unique characters</span> from just 50 base LoRAs</li>                     <li>Energy savings equivalent to powering <span class="font-bold">1,400 homes</span> for a year at scale</li>                 </ul>                                  <h4 class="text-lg font-semibold text-slate-700 mt-6">Implementation Details:</h4>                 <p>The system uses a random CSV line picker node that selects:</p>                 <ol class="list-decimal pl-5 space-y-2">                     <li>Race from race CSV (5 options)</li>                     <li>Age from age CSV (5 options)</li>                     <li>Gender from sex CSV (2 options)</li>                     <li>Random strength from 0.05 to 1.00 for 3 separate LoRAs</li>                 </ol>                                  <p class="mt-4">The LoRAs are applied in sequence between the checkpoint output and CLIP input, with model weights controlled by math expression nodes that cycle through weights in 0.05 increments.</p>                                  <h4 class="text-lg font-semibold text-slate-700 mt-6">Environmental Impact:</h4>                 <p>At scale, the combinatorial approach could save:</p>                 <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mt-4">                     <div class="bg-blue-50 p-4 rounded-lg">                         <div class="text-2xl font-bold text-blue-600">14,600 MWh</div>                         <div class="text-sm">Annual energy savings</div>                     </div>                     <div class="bg-green-50 p-4 rounded-lg">                         <div class="text-2xl font-bold text-green-600">10,300 tons</div>                         <div class="text-sm">CO2 emissions avoided</div>                     </div>                     <div class="bg-purple-50 p-4 rounded-lg">                         <div class="text-2xl font-bold text-purple-600">$4.14M</div>                         <div class="text-sm">Annual cost savings at scale</div>                     </div>                 </div>             </div>         </div>     </div>      <script>         document.addEventListener('DOMContentLoaded', function() {             // Cost Timeline Chart (Logarithmic)             const costCtx = document.getElementById('costTimelineChart').getContext('2d');             const costChart = new Chart(costCtx, {                 type: 'line',                 data: {                     labels: ['Day 1', 'Week 1', 'Month 1', 'Month 3', 'Month 6', 'Year 1', 'Year 2', 'Year 5'],                     datasets: [                         {                             label: 'Traditional Approach (Training New LoRAs)',                             data: [4.8, 33.6, 146, 438, 876, 1752, 3504, 8760],                             borderColor: 'rgba(239, 68, 68, 1)',                             backgroundColor: 'rgba(239, 68, 68, 0.1)',                             borderWidth: 3,                             tension: 0.3,                             fill: true                         },                         {                             label: 'Combinatorial Approach (50 Base LoRAs)',                             data: [0.048, 0.336, 1.46, 4.38, 8.76, 17.52, 35.04, 87.6],                             borderColor: 'rgba(16, 185, 129, 1)',                             backgroundColor: 'rgba(16, 185, 129, 0.1)',                             borderWidth: 3,                             tension: 0.3,                             fill: true                         },                         {                             label: '950M Characters Traditional',                             data: [4.8, 33.6, 146, 438, 876, 1752, 3504, 8760, 17520, 43800, 87600, 175200, 350400, 876000, 1752000, 3504000, 4140000],                             borderColor: 'rgba(156, 163, 175, 1)',                             borderWidth: 2,                             borderDash: [5, 5],                             pointRadius: 0,                             fill: false                         },                         {                             label: '950M Characters Combinatorial',                             data: [0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6],                             borderColor: 'rgba(99, 102, 241, 1)',                             borderWidth: 2,                             borderDash: [5, 5],                             pointRadius: 0,                             fill: false                         }                     ]                 },                 options: {                     responsive: true,                     plugins: {                         title: {                             display: true,                             text: 'Cumulative Cost Over Time ($) - Logarithmic Scale',                             font: {                                 size: 16                             }                         },                         tooltip: {                             callbacks: {                                 label: function(context) {                                     return context.dataset.label + ': $' + context.raw.toFixed(2);                                 }                             }                         }                     },                     scales: {                         y: {                             type: 'logarithmic',                             beginAtZero: false,                             min: 0.1,                             title: {                                 display: true,                                 text: 'Cost ($) - Log Scale'                             },                             ticks: {                                 callback: function(value) {                                     return '$' + value;                                 }                             }                         }                     }                 }             });              // Energy Consumption Chart (Logarithmic)             const energyCtx = document.getElementById('energyChart').getContext('2d');             const energyChart = new Chart(energyCtx, {                 type: 'bar',                 data: {                     labels: ['Per Day', 'Per Month', 'Per Year', '950M Chars'],                     datasets: [                         {                             label: 'Traditional Approach',                             data: [40, 1200, 14600, 4140000],                             backgroundColor: 'rgba(239, 68, 68, 0.7)',                             borderColor: 'rgba(239, 68, 68, 1)',                             borderWidth: 1                         },                         {                             label: 'Combinatorial Approach',                             data: [0.4, 12, 146, 5],                             backgroundColor: 'rgba(16, 185, 129, 0.7)',                             borderColor: 'rgba(16, 185, 129, 1)',                             borderWidth: 1                         }                     ]                 },                 options: {                     responsive: true,                     plugins: {                         title: {                             display: true,                             text: 'Energy Consumption (kWh) - Logarithmic Scale',                             font: {                                 size: 16                             }                         },                         tooltip: {                             callbacks: {                                 label: function(context) {                                     return context.dataset.label + ': ' + context.raw + ' kWh';                                 }                             }                         }                     },                     scales: {                         y: {                             type: 'logarithmic',                             beginAtZero: false,                             min: 0.1,                             title: {                                 display: true,                                 text: 'Energy (kWh) - Log Scale'                             },                             ticks: {                                 callback: function(value) {                                      return value + ' kWh';                                 }                             }                         }                     }                 }             });         });     </script>          <!-- Font Awesome for icons -->     <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js"></script> </body> </html>