PageSourceSearch

https://llm-bench-mu.vercel.app/_next/static/chunks/1d75e85c742a0939.js

js llm-bench-mu.vercel.app collected 2026-10-03 07:14:49 UTC 13,436 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,o)=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),Object.defineProperty(o,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22195,e=>{"use strict";let t="Write your response in plain prose only. Do not use markdown formatting of any kind: no asterisks for bold or italic, no hash symbols for headings, no hyphen or asterisk bullet points, no numbered lists with periods, no backticks or code fences, no horizontal rules. Use natural sentences and paragraphs. If you want to list items, write them as prose sentences separated by commas or semicolons, or as a sequence of sentences.";function o(e,o){return o?[e?.trim(),t].filter(Boolean).join("\n\n"):e||void 0}e.s(["NO_MARKDOWN_INSTRUCTION",0,t,"buildSystemPrompt",()=>o])},4730,e=>{e.v({name:"llmbench",version:"2.2.26",license:"GPL-3.0-or-later",private:!0,scripts:{dev:"next dev",build:"next build",start:"next start",lint:"eslint"},dependencies:{"@ai-sdk/anthropic":"^3.0.38","@ai-sdk/google":"^3.0.22","@ai-sdk/openai":"^3.0.26","@codemirror/commands":"^6.10.2","@codemirror/lang-markdown":"^6.5.0","@codemirror/language":"^6.12.1","@codemirror/search":"^6.6.0","@codemirror/state":"^6.5.4","@codemirror/view":"^6.39.12","@google/generative-ai":"^0.24.1","@radix-ui/react-dialog":"^1.1.15","@radix-ui/react-dropdown-menu":"^2.1.16","@radix-ui/react-slot":"^1.2.4","@radix-ui/react-tooltip":"^1.2.8","@react-three/drei":"^10.7.7","@react-three/fiber":"^9.5.0","@supabase/ssr":"^0.8.0","@supabase/supabase-js":"^2.95.3",ai:"^6.0.77","class-variance-authority":"^0.7.1",clsx:"^2.1.1",diff:"^8.0.3",jspdf:"^4.1.0","lucide-react":"^0.563.0",next:"16.1.6",react:"19.2.3","react-dom":"19.2.3","tailwind-merge":"^3.4.0",three:"^0.183.2"},devDependencies:{"@tailwindcss/typography":"^0.5.19","@types/diff":"^7.0.2","@types/node":"^20","@types/react":"^19","@types/react-dom":"^19","@types/three":"^0.183.1",autoprefixer:"^10.4.24",eslint:"^9","eslint-config-next":"16.1.6",postcss:"^8.5.6",tailwindcss:"^3.4.19",typescript:"^5"}})},46912,15164,e=>{"use strict";function t(e){let t=e.trim().split(/\s+/).filter(Boolean),o=t.length,n=e.split(/[.!?]+/).filter(e=>e.trim().length>0).length,r=new Set(t.map(e=>e.toLowerCase().replace(/[^a-z0-9'-]/g,""))).size;return{wordCount:o,sentenceCount:n,avgSentenceLength:n>0?o/n:0,vocabularyDiversity:o>0?r/o:0,uniqueWordCount:r}}function o(e,t){let o=new Set(e.toLowerCase().split(/\s+/).map(e=>e.replace(/[^a-z0-9'-]/g,"")).filter(Boolean)),n=new Set(t.toLowerCase().split(/\s+/).map(e=>e.replace(/[^a-z0-9'-]/g,"")).filter(Boolean)),r=[...o].filter(e=>n.has(e)),s=[...o].filter(e=>!n.has(e)),a=[...n].filter(e=>!o.has(e)),i=new Set([...o,...n]),l=i.size>0?r.length/i.size:0,p=o.size+n.size>0?2*r.length/(o.size+n.size):0;return{shared:r,uniqueA:s,uniqueB:a,jaccardSimilarity:l,diceCoefficient:p,overlapPercentage:100*p}}function n(e){let t=[e,...e.topAlternatives].map(e=>Math.exp(e.logprob)),o=t.reduce((e,t)=>e+t,0);if(0===o)return 0;let n=Math.max(0,1-Math.min(1,o)),r=0;for(let e of t)e>0&&(r-=e*Math.log2(e));return n>0&&(r-=n*Math.log2(n)),r}function r(e){if(0===e.length)return 0;let t=e.map(n);return t.reduce((e,t)=>e+t,0)/t.length}function s(e,t="perplexity",o={}){if("entropy"===t){let t=o.decimals??2;return{value:e.toFixed(t),suffix:" bits",label:"Entropy"}}let n=!Number.isFinite(e)||e<0?1:Math.pow(2,e),r=o.decimals??(n<2?3:n<10?2:+(n<100)),a=!1===o.approx?"":"≈ ";return{value:`${a}${n.toFixed(r)}`,suffix:"",label:"Perplexity"}}e.s(["computeMeanEntropy",()=>r,"computeTextMetrics",()=>t,"computeTokenEntropy",()=>n,"computeWordOverlap",()=>o],46912),e.s(["formatUncertainty",()=>s],15164)},43270,e=>{"use strict";var t=e.i(97381);let o=new Set(["google","openai","openai-compatible","openrouter","huggingface","ollama"]),n='You are a text completion engine, not a chat assistant. The user\'s message is a text fragment — the opening of a passage you must extend. Your response is the immediate continuation: one or more tokens of natural prose that c
1ould be concatenated directly after the user\'s text with no gap. \n\nABSOLUTE RULES:\n1. NEVER repeat, restart, echo, or paraphrase any portion of the user\'s fragment. If the user wrote "Democracy is", do not produce another "Democracy is" anywhere in your response.\n2. NEVER start a fresh sentence, paragraph, or utterance that re-opens the passage the user has already begun. Once a sentence ends, continue into the NEXT sentence of the same passage — as if writing the second sentence of an essay whose first sentence is the user\'s fragment.\n3. NEVER acknowledge, address, or quote the user. No "here is", no "sure", no "the text reads".\n4. NEVER output formatting: no Markdown, no code fences, no quotation marks wrapping your reply.\n\nIf the fragment ends mid-word, complete the word. If it ends mid-sentence, continue the sentence.';async function r(t,o,r){let{GoogleGenerativeAI:s}=await e.A(11480),a=t.customModelId||t.model,i=new s(t.apiKey).getGenerativeModel({model:a,systemInstruction:n,generationConfig:{temperature:0,responseLogprobs:!0,logprobs:r,maxOutputTokens:1}}),l=(await i.generateContent({contents:[{role:"user",parts:[{text:o}]}]})).response,p=l.candidates?.[0],c=p?.logprobsResult,d=c?.chosenCandidates||[],u=c?.topCandidates||[];return{chosen:d[0]?{token:d[0].token||"",logprob:d[0].logProbability??0}:null,distribution:(u[0]?.candidates||[]).map(e=>({token:e.token,logprob:e.logProbability??0}))}}async function s(e,t,o){let n=e.baseUrl||"https://api.openai.com/v1";return i(e,n,t,o)}function a(e){if(e.bytes&&Array.isArray(e.bytes)&&e.bytes.length>0)try{return new TextDecoder("utf-8").decode(new Uint8Array(e.bytes))}catch{}return e.token??""}async function i(e,t,o,r,s={}){let l=e.customModelId||e.model,p=await fetch(`${t}/chat/completions`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`,...s},body:JSON.stringify({model:l,messages:[{role:"system",content:n},{role:"user",content:o}],temperature:0,max_tokens:1,logprobs:!0,top_logprobs:r})});if(!p.ok){let e=await p.text();throw Error(`API error ${p.status}: ${e}`)}let c=await p.json(),d=c.choices?.[0],u=d?.logprobs?.content||[],h="string"==typeof d?.message?.content?d.message.content:"",m=null,g=[];if(u.length>0){let e=u[0],t=a(e),o=h.length>0?h:t;m={token:o,logprob:e.logprob??0},(g=(e.top_logprobs||[]).map(e=>({token:a(e),logprob:e.logprob}))).length>0&&g[0].token!==o&&(g=[{...g[0],token:o},...g.slice(1)])}return{chosen:m,distribution:g}}async function l(e,o,n){var a;let l,p,c=Date.now(),d=e.customModelId||e.model;switch(e.provider){case"google":if(d.includes("2.5"))throw Error(`${d} does not provide logprobs. Use gemini-2.0-flash.`);l=await r(e,o,n);break;case"openai":case"openai-compatible":l=await s(e,o,n);break;case"openrouter":l=await i(e,"https://openrouter.ai/api/v1",o,n,{"HTTP-Referer":"https://llm-bench.vercel.app","X-Title":"LLMbench"});break;case"huggingface":l=await i(e,"https://router.huggingface.co/v1",o,n);break;default:throw Error(`Sampling Probe requires Gemini (2.0), OpenAI, OpenRouter, or Hugging Face. ${e.provider} is not supported.`)}if(!l.distribution||0===l.distribution.length)throw Error("openrouter"===e.provider?`OpenRouter returned no logprobs for ${d}. On OpenRouter only OpenAI models (e.g. openai/gpt-4o, openai/gpt-4o-mini) expose logprobs; other routes silently drop the logprobs field. Switch to a direct OpenAI slot or Google Gemini 2.0.`:"huggingface"===e.provider?`Hugging Face returned no logprobs for ${d}. Not every HF-routed chat model exposes logprobs. Switch to OpenAI or Google Gemini 2.0.`:"openai-compatible"===e.provider?`The OpenAI-compatible endpoint for ${d} returned no logprobs. Verify the provider actually exposes top_logprobs.`:`${e.provider} returned no logprobs for ${d}.`);return{distribution:l.distribution,chosen:l.chosen,provenance:(a=Date.now()-c,p=e.customModelId||e.model,{provider:e.provider,model:p,modelDisplayName:(0,t.getModelDisplayName)(e.provider,p),responseTimeMs:a})}}e.s(["SAMPLING_PROVIDERS",0,o,"SAMPLING_SYSTEM_PROMPT",0,n,"runSamplingStep",()=>l])},25022,e=>{"use strict";async function t(e){let t,o=Date.now(),r=[];e.systemPrompt&&e.systemPrompt.trim().length>0&&r.push({role:"system",content:e.systemPrompt}),r.push({role:"user",content:e.prompt});let s=(e.baseUrl||"http://127.0.0.1:11434").replace("://localhost","://127.0.0.1").replace(/\/+$/,""),a=s.endsWith("/v1")?`${s}/chat/completions`:`${s}/v1/chat/completions`;try{t=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e.model,messages:r,temperature:e.temperature??.7,...e.disableThinking?{think:!1}:{}}),signal:e.signal})}catch(e){if(e instanceof Error&&"AbortError"===e.name)throw e;throw Error(`OLLAMA_UNREACHABLE::${s}`)}if(!t.ok){let e=await t.text().catch(()=>"");throw Error(`Ollama returned ${t.status}${e?`: ${e.slice(0,200)}`:""}`)}let i=await t.json(),l=n(i?.choices?.[0]?.message?.content??"");return{text:l.visible,hiddenChannels:l.hidden.length>0?l.hidden:void 0,responseTimeMs:Date.now()-o}}let o=/<\|?[A-Za-z_]+\|?>/g;function n(e){if(!e||!/<\|channel\|?>/.test(e))return{visible:e??"",hidden:[]};let t=e.split(/<\|channel\|?>/),n=[];for(let e=1;e<t.length;e++){let r=t[e].match(/^\s*(\w+)\s*(?:<\|message\|>)?\s*([\s\S]*)$/);if(!r)continue;let s=r[1].toLowerCase(),a=r[2],i=a.match(/<\|(?:end|return|start)\|>/);i&&"number"==typeof i.index&&(a=a.slice(0,i.index)),(a=a.replace(o,"").trim()).length>0&&n.push({name:s,content:a})}if(0===n.length)return{visible:e.replace(o,"").trim(),hidden:[]};let r=n.findIndex(e=>"final"===e.name);return r>=0?{visible:n[r].content,hidden:n.filter((e,t)=>
1t!==r)}:{visible:n.map(e=>e.content).join("\n\n"),hidden:[]}}function r(e){if(0===e.length)return{visible:[],hiddenByChannel:{}};let t="final",o=!1,n={};for(let r of e){let e=r.token;if(/^<\|channel\|?>$/.test(e.trim())){o=!0;continue}if(o){t=e.trim().toLowerCase().replace(/[^a-z]/g,"")||t,o=!1;continue}if(function(e){let t=e.trim();return"<channel|>"===t||"<|end|>"===t||"<|return|>"===t}(e)){t="final",o=!1;continue}/^<\|?[A-Za-z_]+\|?>$/.test(e.trim())||(n[t]||(n[t]=[]),n[t].push(r))}if("final"in n){let e=n.final;return delete n.final,{visible:e,hiddenByChannel:n}}let r=[];for(let e of Object.values(n))r.push(...e);return{visible:r,hiddenByChannel:{}}}function s(e){if(e.bytes&&Array.isArray(e.bytes)&&e.bytes.length>0)try{return new TextDecoder("utf-8").decode(new Uint8Array(e.bytes))}catch{}return e.token??""}async function a(e){let t,o,n=(o=(e.baseUrl||"http://127.0.0.1:11434").replace("://localhost","://127.0.0.1").replace(/\/+$/,"")).endsWith("/v1")?`${o}/chat/completions`:`${o}/v1/chat/completions`,r=n.replace(/\/v1\/chat\/completions$/,"");try{t=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e.model,messages:e.messages,temperature:e.temperature,...e.maxTokens?{max_tokens:e.maxTokens}:{},logprobs:!0,top_logprobs:e.topLogprobs,...e.disableThinking?{think:!1}:{}}),signal:e.signal})}catch(e){if(e instanceof Error&&"AbortError"===e.name)throw e;throw Error(`OLLAMA_UNREACHABLE::${r}`)}if(!t.ok){let e=await t.text().catch(()=>"");throw Error(`Ollama returned ${t.status}${e?`: ${e.slice(0,200)}`:""}`)}return{data:await t.json(),baseForError:r}}
1async function i(e){let t=Date.now(),o=[];e.systemPrompt&&e.systemPrompt.trim().length>0&&o.push({role:"system",content:e.systemPrompt}),o.push({role:"user",content:e.prompt});let i=Math.min(Math.max(e.topK??5,1),20),{data:l}=await a({baseUrl:e.baseUrl,model:e.model,messages:o,temperature:e.temperature??.7,topLogprobs:i,signal:e.signal,disableThinking:e.disableThinking}),p=l.choices?.[0],c=p?.message?.content??"",d=(p?.logprobs?.content??[]).map(e=>({token:s(e),logprob:e.logprob??0,topAlternatives:(e.top_logprobs??[]).filter(t=>t.token!==e.token).slice(0,i).map(e=>({token:s(e),logprob:e.logprob}))})),u=n(c),h=r(d);return{text:u.visible,tokens:h.visible,hiddenChannels:u.hidden.length>0?u.hidden:void 0,responseTimeMs:Date.now()-t}}async function l(e){let t=Date.now(),o=Math.min(Math.max(e.topK,1),20),{data:n}=await a({baseUrl:e.baseUrl,model:e.model,messages:e.messages,temperature:e.temperature,maxTokens:1,topLogprobs:o,signal:e.signal,disableThinking:e.disableThinking}),r=n.choices?.[0],i=r?.logprobs?.content??[],l="string"==typeof r?.message?.content?r.message.content:"",p=null,c=[];if(i.length>0){let e=i[0],t=s(e),o=l.length>0?l:t;p={token:o,logprob:e.logprob??0},(c=(e.top_logprobs??[]).map(e=>({token:s(e),logprob:e.logprob}))).length>0&&c[0].token!==o&&(c=[{...c[0],token:o},...c.slice(1)])}return{chosen:p,distribution:c,responseTimeMs:Date.now()-t}}e.s(["generateOllamaFromBrowser",()=>t,"generateOllamaLogprobs",()=>i,"ollamaStepLogprobs",()=>l,"parseHarmonyOutput",()=>n,"partitionHarmonyTokens",()=>r])},34162,e=>{e.v(t=>Promise.all(["static/chunks/ecc9ee2c08b4c5c6.js","static/chunks/4fed18ff197c79aa.js"].map(t=>e.l(t))).then(()=>t(55749)))},24130,e=>{e.v(e=>Promise.resolve().then(()=>e(25022)))},47648,e=>{e.v(e=>Promise.resolve().then(()=>e(22195)))},87660,e=>{e.v(t=>Promise.all(["static/chunks/f4b11894366c509c.js"].map(t=>e.l(t))).then(()=>t(41753)))},11480,e=>{e.v(t=>Promise.all(["static/chunks/7d0f8d27372599e4.js"].map(t=>e.l(t))).then(()=>t(62636)))},70158,e=>{e.v(e=>Promise.resolve().then(()=>e(43270)))}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.