404 β no such page
+zerotvm.com β pick a model, it runs in your tab.
+diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..0d8842c798d6250a1b613dd769955a6127b02c9d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +*.png filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.webp filter=lfs diff=lfs merge=lfs -text +*.woff2 filter=lfs diff=lfs merge=lfs -text diff --git a/404.html b/404.html new file mode 100644 index 0000000000000000000000000000000000000000..aa1e978d5f89e5c88dddb0a8c48b54e84836cfd3 --- /dev/null +++ b/404.html @@ -0,0 +1,29 @@ + + + +
+ + +zerotvm.com β pick a model, it runs in your tab.
+scripts/agent-server.mjs gives it an OpenAI-shaped address on :8017.
+ npm run station runs the engine in-process on
+ dawn.node (no browser tab, no throttling) and takes the same :8017. They cannot both hold the port β run one.http://127.0.0.1:8017/v1~/.pi/agent/models.json, api: "openai-completions", that baseUrl.curl 127.0.0.1:8017/v1/chat/completions -d '{"messages":[{"role":"user","content":"hi"}]}' -H 'content-type: application/json'
+
+ This is a developer surface. It downloads the model
+ and then talks to an agent-server on 127.0.0.1:8017 β
+ start it with npm run agent from the repo. Without that
+ server running, this page has nothing to serve.
+
Weights download once and cache locally.
+{y===0&&(f=performance.now()),y++});const w=performance.now(),T=(w-x)/1e3,$=f?f-x:T*1e3,P=y>1&&f?(y-1)/((w-f)/1e3):y/T,C=o.getLastPrefill();C&&(S=C.chunks),d.push($),b.push(P),console.log(`[ttft] prompt=${m.length} tok (target ${s}) run${k+1}: ttft ${$.toFixed(0)}ms Β· ${y} gen tok Β· decode ${P.toFixed(2)} tok/s`+(C?` Β· prefill chunks ${C.chunks} (reused ${C.reused})`:""))}e.push({targetTokens:s,promptTokens:m.length,ttftMsRuns:d,ttftMs:g(d),decodeTokPerS:g(b),chunks:S})}console.log(""),console.log(" prompt tok | TTFT ms | ms/prompt-token | vs shortest | chunks"),console.log(" -----------+----------+------------------+--------------+-------");const c=e[0];for(const s of e)console.log(` ${String(s.promptTokens).padStart(10)} | ${s.ttftMs.toFixed(0).padStart(8)} | ${(s.ttftMs/s.promptTokens).toFixed(3).padStart(16)} | ${(s.ttftMs/c.ttftMs).toFixed(2).padStart(12)}x | ${String(s.chunks).padStart(6)}`);return{mode:"ttft-sweep",engine:"zero-tvm",runsPerPoint:p,genTokensPerPoint:i,points:e}}finally{t.setBusy(!1),t.onIdle()}},window.benchBatched=async(l=4,i=500,p="ffnDown")=>t.isBusy()?(console.warn("[batched-bench] decode in flight β skipping"),null):o.benchBatchedFfnDown(l,i,p),window.specSim=async(l=160,i=3,p=3)=>{if(t.isBusy())return console.warn("[specSim] decode in flight β skipping"),null;t.setBusy(!0);try{const g=[{name:"prose",messages:[{role:"system",content:"You are a helpful assistant."},{role:"user",content:"Write a four-sentence explanation of how photosynthesis works."}]},{name:"code",messages:[{role:"system",content:"You are a helpful coding assistant. Reply with only code, no prose."},{role:"user",content:"Write a TypeScript function that computes the nth Fibonacci number using memoization. Include a short test block that prints fib(10), fib(20), and fib(30)."}]},{name:"summary",messages:[{role:"system",content:"You are a helpful assistant."},{role:"user",content:"List the top five considerations when designing a REST API, with a one-sentence explanation for each."}]}],r=[];for(const e of g){const c=B(o.spec,e.messages,u),s=[];await o.generatePipelined(c,l,d=>{s.push(d)});const a=[...c,...s],m=ye(e.name,a,c.length,i,p);r.push({...m,generatedTokens:s.length}),console.log(`[specSim] ${e.name}: ${s.length} gen tok, hit=${(m.hitRate*100).toFixed(0)}%, Ξ±=${(m.acceptanceRate*100).toFixed(0)}%, accepted/step=${m.meanAcceptedPerStep.toFixed(2)}/${p}, theoretical speedup=${m.theoreticalSpeedup.toFixed(2)}Γ`)}return console.table(r.map(e=>({prompt:e.name,gen:e.generatedTokens,"hit %":+(e.hitRate*100).toFixed(1),"accept Ξ±":+(e.acceptanceRate*100).toFixed(1),"accepted/step":+e.meanAcceptedPerStep.toFixed(2),speedup:+e.theoreticalSpeedup.toFixed(2)}))),r}finally{t.setBusy(!1),t.onIdle()}},window.benchPrefill=async(l=800,i=3)=>{var p;if(t.isBusy())return console.warn("[benchPrefill] decode in flight β skipping"),null;t.setBusy(!0);try{const g="Photosynthesis is the process by which green plants convert light energy into chemical energy, storing it in the bonds of glucose molecules that fuel growth, respiration, and reproduction. ";let r=4,e=[];const c=d=>B(o.spec,[{role:"system",content:"You are a helpful assistant."},{role:"user",content:g.repeat(d)+`
+Summarize the passage above in one sentence.`}],u);for(e=c(r);e.length Anyone with this link chats with the model running in THIS tab,
+ over an encrypted peer-to-peer data channel. Keep the tab open and the
+ machine awake; close the tab to end the room. 1 machine serving Β· 0 guests connectedShare a model
+ Waiting
+ Room link
+ Room
+ Requests
+
+ Remote model
+
+ Connecting
+ Validate
+ Waiting
+ Idle
+ npm run test:kernels)
+ to check that the live chat path generalizes beyond a single
+ memorized prompt.
+