Changes to tokencalc.scroll.pub

root
root
25 days ago
Initial commit
body.html
Changed around line 1
+
+

GPT Token Calculator

+

Estimate token processing performance for GPT models

+
+
+
+
+
+

Model Configuration

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Performance Results

+
+

Estimated Tokens per Second

+

--

+
+
+
+

Memory Usage

+

--

+
+
+
+

Model Efficiency

+

--

+
+
+
+
+
+
+

Built for AI researchers and developers | Updated 2024

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://tokencalc.scroll.pub
+ metaTags
+ editButton /edit.html
+ title GPT Token Calculator - Model Performance Estimator
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "msg_01AVYUyXRYZDL1jy8TJ3qYqe",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "Here's a GPT model token calculator website:\n\n---domain---\ntokencalc.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://tokencalc.scroll.pub\nmetaTags\neditButton /edit.html\ntitle GPT Token Calculator - Model Performance Estimator\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n
\n

GPT Token Calculator

\n

Estimate token processing performance for GPT models

\n
\n\n
\n
\n
\n

Model Configuration

\n \n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n \n
\n\n
\n

Performance Results

\n
\n

Estimated Tokens per Second

\n

--

\n
\n \n
\n

Memory Usage

\n

--

\n
\n\n
\n

Model Efficiency

\n

--

\n
\n
\n
\n
\n\n
\n

Built for AI researchers and developers | Updated 2024

\n
\n\n---style.css---\n:root {\n --primary-color: #2a6b9c;\n --secondary-color: #1d4e74;\n --accent-color: #4ca3d8;\n --background-color: #f5f9fc;\n --text-color: #333;\n --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background: var(--background-color);\n min-height: 100vh;\n}\n\nheader {\n background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));\n color: white;\n padding: 2rem 1rem;\n text-align: center;\n}\n\nh1 {\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n}\n\n.subtitle {\n font-size: 1.1rem;\n opacity: 0.9;\n}\n\nmain {\n max-width: 1200px;\n margin: 2rem auto;\n padding: 0 1rem;\n}\n\n.calculator-container {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2rem;\n background: white;\n padding: 2rem;\n border-radius: 12px;\n box-shadow: var(--card-shadow);\n}\n\n.input-group {\n margin-bottom: 1.5rem;\n}\n\nlabel {\n display: block;\n margin-bottom: 0.5rem;\n font-weight: 500;\n}\n\ninput {\n width: 100%;\n padding: 0.8rem;\n border: 2px solid #ddd;\n border-radius: 6px;\n font-size: 1rem;\n transition: border-color 0.3s;\n}\n\ninput:focus {\n border-color: var(--accent-color);\n outline: none;\n}\n\nbutton {\n background: var(--primary-color);\n color: white;\n border: none;\n padding: 1rem 2rem;\n border-radius: 6px;\n font-size: 1rem;\n cursor: pointer;\n transition: background-color 0.3s;\n width: 100%;\n}\n\nbutton:hover {\n background: var(--secondary-color);\n}\n\n.result-card {\n background: var(--background-color);\n padding: 1.5rem;\n border-radius: 8px;\n margin-bottom: 1rem;\n transition: transform 0.3s;\n}\n\n.result-card:hover {\n transform: translateY(-2px);\n}\n\nfooter {\n text-align: center;\n padding: 2rem;\n background: var(--secondary-color);\n color: white;\n margin-top: 3rem;\n}\n\n@media (max-width: 768px) {\n .calculator-container {\n grid-template-columns: 1fr;\n }\n \n h1 {\n font-size: 2rem;\n }\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const calculateBtn = document.getElementById('calculate-btn');\n \n calculateBtn.addEventListener('click', calculatePerformance);\n\n function calculatePerformance() {\n const vocabSize = parseInt(document.getElementById('vocab-size').value);\n const modelSize = parseFloat(document.getElementById('model-size').value);\n const gpuMemory = parseInt(document.getElementById('gpu-memory').value);\n\n // Basic performance estimation formulas\n // These are simplified approximations\n const baseTokensPerSecond = (gpuMemory * 1024) / (modelSize * 0.5);\n const vocabFactor = Math.log2(vocabSize) / Math.log2(50000);\n const estimatedTokensPerSecond = baseTokensPerSecond / vocabFactor;\n\n const memoryUsagePercentage = (modelSize * 4) / gpuMemory * 100;\n const efficiency = (estimatedTokensPerSecond * vocabFactor) / (modelSize * 1000);\n\n // Update results\n document.getElementById('tokens-per-second').textContent = \n `${Math.round(estimatedTokensPerSecond)} tokens/second`;\n \n document.getElementById('memory-usage').textContent = \n `${memoryUsagePercentage.toFixed(1)}% of GPU memory utilized`;\n \n document.getElementById('efficiency-rating').textContent = \n `${efficiency.toFixed(2)} tokens/parameter/second`;\n\n // Animate results\n document.querySelectorAll('.result-card').forEach(card => {\n card.style.animation = 'pulse 0.5s';\n setTimeout(() => card.style.animation = '', 500);\n });\n }\n});\n\n// Add this to your CSS\ndocument.head.appendChild(document.createElement('style')).textContent = `\n @keyframes pulse {\n 0% { transform: scale(1); }\n 50% { transform: scale(1.02); }\n 100% { transform: scale(1); }\n }\n`;\n\n---end---\n\nThis website provides an interactive calculator for estimating GPT model performance based on vocabulary size, model parameters, and GPU memory. The design is clean and professional with a beautiful gradient header, responsive card layout, and smooth animations. The calculator provides estimated tokens per second, memory usage, and efficiency metrics.\n\nKey features:\n- Responsive design that works on all devices\n- Interactive form with real-time calculations\n- Beautiful gradient and shadow effects\n- Smooth animations and hover states\n- Clean, semantic HTML structure\n- Accessible form controls and ARIA labels\n- Performance-optimized CSS and JavaScript\n- Professional typography and spacing\n\nThe domain name \"tokencalc.scroll.pub\" is short, memorable, and clearly describes the purpose of the website."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 319,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2117
+ }
+ }
readme.scroll
Changed around line 1
+ # tokencalc.scroll.pub
+ Website generated by Claude from prompt: Calculate it for this a 7b parameters gpt model one with 132000 tokens vocab and one with 2 tokens vocab Give me actual calculations for example how many tokens per second it will output on 24 gigs GPU
script.js
Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ const calculateBtn = document.getElementById('calculate-btn');
+
+ calculateBtn.addEventListener('click', calculatePerformance);
+
+ function calculatePerformance() {
+ const vocabSize = parseInt(document.getElementById('vocab-size').value);
+ const modelSize = parseFloat(document.getElementById('model-size').value);
+ const gpuMemory = parseInt(document.getElementById('gpu-memory').value);
+
+ // Basic performance estimation formulas
+ // These are simplified approximations
+ const baseTokensPerSecond = (gpuMemory * 1024) / (modelSize * 0.5);
+ const vocabFactor = Math.log2(vocabSize) / Math.log2(50000);
+ const estimatedTokensPerSecond = baseTokensPerSecond / vocabFactor;
+
+ const memoryUsagePercentage = (modelSize * 4) / gpuMemory * 100;
+ const efficiency = (estimatedTokensPerSecond * vocabFactor) / (modelSize * 1000);
+
+ // Update results
+ document.getElementById('tokens-per-second').textContent =
+ `${Math.round(estimatedTokensPerSecond)} tokens/second`;
+
+ document.getElementById('memory-usage').textContent =
+ `${memoryUsagePercentage.toFixed(1)}% of GPU memory utilized`;
+
+ document.getElementById('efficiency-rating').textContent =
+ `${efficiency.toFixed(2)} tokens/parameter/second`;
+
+ // Animate results
+ document.querySelectorAll('.result-card').forEach(card => {
+ card.style.animation = 'pulse 0.5s';
+ setTimeout(() => card.style.animation = '', 500);
+ });
+ }
+ });
+
+ // Add this to your CSS
+ document.head.appendChild(document.createElement('style')).textContent = `
+ @keyframes pulse {
+ 0% { transform: scale(1); }
+ 50% { transform: scale(1.02); }
+ 100% { transform: scale(1); }
+ }
+ `;
style.css
Changed around line 1
+ :root {
+ --primary-color: #2a6b9c;
+ --secondary-color: #1d4e74;
+ --accent-color: #4ca3d8;
+ --background-color: #f5f9fc;
+ --text-color: #333;
+ --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+ line-height: 1.6;
+ color: var(--text-color);
+ background: var(--background-color);
+ min-height: 100vh;
+ }
+
+ header {
+ background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
+ color: white;
+ padding: 2rem 1rem;
+ text-align: center;
+ }
+
+ h1 {
+ font-size: 2.5rem;
+ margin-bottom: 0.5rem;
+ }
+
+ .subtitle {
+ font-size: 1.1rem;
+ opacity: 0.9;
+ }
+
+ main {
+ max-width: 1200px;
+ margin: 2rem auto;
+ padding: 0 1rem;
+ }
+
+ .calculator-container {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 2rem;
+ background: white;
+ padding: 2rem;
+ border-radius: 12px;
+ box-shadow: var(--card-shadow);
+ }
+
+ .input-group {
+ margin-bottom: 1.5rem;
+ }
+
+ label {
+ display: block;
+ margin-bottom: 0.5rem;
+ font-weight: 500;
+ }
+
+ input {
+ width: 100%;
+ padding: 0.8rem;
+ border: 2px solid #ddd;
+ border-radius: 6px;
+ font-size: 1rem;
+ transition: border-color 0.3s;
+ }
+
+ input:focus {
+ border-color: var(--accent-color);
+ outline: none;
+ }
+
+ button {
+ background: var(--primary-color);
+ color: white;
+ border: none;
+ padding: 1rem 2rem;
+ border-radius: 6px;
+ font-size: 1rem;
+ cursor: pointer;
+ transition: background-color 0.3s;
+ width: 100%;
+ }
+
+ button:hover {
+ background: var(--secondary-color);
+ }
+
+ .result-card {
+ background: var(--background-color);
+ padding: 1.5rem;
+ border-radius: 8px;
+ margin-bottom: 1rem;
+ transition: transform 0.3s;
+ }
+
+ .result-card:hover {
+ transform: translateY(-2px);
+ }
+
+ footer {
+ text-align: center;
+ padding: 2rem;
+ background: var(--secondary-color);
+ color: white;
+ margin-top: 3rem;
+ }
+
+ @media (max-width: 768px) {
+ .calculator-container {
+ grid-template-columns: 1fr;
+ }
+
+ h1 {
+ font-size: 2rem;
+ }
+ }