Spaces:
Running on Zero
Running on Zero
Make live inference discoverable from the English landing page
Browse filesFiles changed (3)
- workbench/index.html+10-7
- workbench/lab.css+5-7
- workbench/lab.js+33-7
5 unmodified lines6789101112135 unmodified lines192021222324257 unmodified lines3334353637383940414243444546475 unmodified lines<meta name="theme-color" content="#f7f8f6"><link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M3 12 16 5l13 7-13 7L3 12Zm0 7 13 7 13-7' fill='none' stroke='%230f766e' stroke-width='2.5'/%3E%3C/svg%3E"><title>Critique-then-Rerank · Decision Lab</title><link rel="stylesheet" href="./workbench/lab.css?v=tasks"><script type="module" src="./workbench/lab.js?v=tasks"></script></head><body><header class="topbar">5 unmodified lines<div><p class="eyebrow"><span class="signal"></span> LEVIR-CC <span class="dim">/</span> ELEPHANT-1</p><h1 id="headline" data-t="headline">One model, four decision tasks.</h1><p class="lede" data-t="lede">Every task starts with two images of the same place. What changes is the question, the text the model sees, and the options it can choose.</p></div><div class="hero-index task-key"><p><b>01–03</b> <span data-t="diagnosticGroup">Training task examples</span></p><p><b>04</b> <span data-t="inferenceGroup">End-to-end inference</span></p></div></section><section class="cases" aria-labelledby="case-heading"><div class="sectionbar"><h2 id="case-heading" data-t="choose">Choose a decision task</h2><span class="micro">04 TASKS / ELEPHANT-1</span></div>7 unmodified lines</aside><section class="decision panel" id="probe" aria-labelledby="probe-title"></section><section class="decision panel" id="inference-panel" aria-labelledby="trace-title" hidden><div class="sectionbar"><h2 id="trace-title" data-t="trace">Listwise selection · Inference</h2><span class="micro">T₁ / T₂ → CAPTION</span></div><p class="explain" data-t="listIntro">With two images and a list of candidates, choose the best-supported caption. Both stages use this task.</p><div id="list-protocol"></div><details class="pair-picker"><summary data-t="pairs">Change example image pair</summary><div class="case-grid case-options" id="case-grid"></div></details><div class="toolbar"><div class="transport"><button type="button" id="replay" data-t="play">▷ Step through</button><button type="button" id="live" data-t="live">Run on GPU ↗</button></div><span id="source" class="chip"></span></div><p class="run-status" id="status" role="status"></p><nav class="pipeline" id="pipeline" aria-label="Decision trace steps"></nav><div id="inspector" class="inspector"></div></section>5 unmodified lines6789101112135 unmodified lines192021222324252627287 unmodified lines3637383940414243444546474849505 unmodified lines<meta name="theme-color" content="#f7f8f6"><link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M3 12 16 5l13 7-13 7L3 12Zm0 7 13 7 13-7' fill='none' stroke='%230f766e' stroke-width='2.5'/%3E%3C/svg%3E"><title>Critique-then-Rerank · Decision Lab</title><link rel="stylesheet" href="./workbench/lab.css?v=inference-link"><script type="module" src="./workbench/lab.js?v=inference-link"></script></head><body><header class="topbar">5 unmodified lines<div><p class="eyebrow"><span class="signal"></span> LEVIR-CC <span class="dim">/</span> ELEPHANT-1</p><h1 id="headline" data-t="headline">One model, four decision tasks.</h1><p class="lede" data-t="lede">Every task starts with two images of the same place. What changes is the question, the text the model sees, and the options it can choose.</p></div><div class="hero-index task-key"><a class="inference-link" href="#trace-title"><span data-t="openInference">Live GPU Inference</span><span aria-hidden="true">↘</span></a><p data-t="inferencePath">Image pair → Beam-15 → Final caption</p></div></section><section class="cases" aria-labelledby="case-heading"><div class="sectionbar"><h2 id="case-heading" data-t="choose">Choose a decision task</h2><span class="micro">04 TASKS / ELEPHANT-1</span></div>7 unmodified lines</aside><section class="decision panel" id="probe" aria-labelledby="probe-title"></section><section class="decision panel" id="inference-panel" aria-labelledby="trace-title" hidden><div class="sectionbar"><h2 id="trace-title" tabindex="-1" data-t="trace">04 · Listwise selection / Live inference</h2><span class="micro">T₁ / T₂ → CAPTION</span></div><p class="explain" data-t="listIntro">With two images and a list of candidates, choose the best-supported caption. Both stages use this task.</p><div class="toolbar"><div class="transport"><button type="button" id="live" data-t="live">Run on GPU</button><button type="button" id="replay" data-t="play">▷ Step through</button></div><span id="source" class="chip"></span></div><p class="run-status" id="status" role="status"></p><div id="list-protocol"></div><details class="pair-picker"><summary data-t="pairs">Change example image pair</summary><div class="case-grid case-options" id="case-grid"></div></details><nav class="pipeline" id="pipeline" aria-label="Decision trace steps"></nav><div id="inspector" class="inspector"></div></section>
48 unmodified lines49505152535455565758135 unmodified lines19419519619719819920020120248 unmodified linesh1 { max-width: 16ch; margin: .3em 0 .2em; font-size: clamp(2.35rem, 5.6vw, 5.4rem); line-height: 1.05; letter-spacing: -.065em; text-wrap: balance; }[lang='zh-CN'] h1 { max-width: 9em; font-size: clamp(2.15rem, 4.6vw, 4.5rem); letter-spacing: -.032em; }.lede { max-width: 64ch; line-height: 1.62; color: var(--dim); }.hero-index { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 8px; background: #ffffffb3; }.task-key p { display: flex; align-items: center; gap: 13px; min-height: 42px; padding: 8px 12px; font-size: .87rem; }.task-key p + p { border-top: 1px solid var(--line); }.hero-index b { font: 500 .72rem var(--mono); color: var(--green); }.sectionbar { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 12px; }.sectionbar h2 { font-size: 1.05rem; letter-spacing: -.02em; }.sectionbar code { color: var(--dim); }135 unmodified lines@media (max-width: 700px) {.hero, .lab { grid-template-columns: minmax(0,1fr); }.hero { margin-top: 12px; }.hero-index { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }.task-key p + p { border-top: 0; border-inline-start: 1px solid var(--line); }.task-key p { padding-inline: 8px; gap: 7px; font-size: .8rem; }.swipe, video { max-width: 380px; margin-inline: auto; }}@media (max-width: 390px) {48 unmodified lines4950515253545556575859135 unmodified lines19519619719819920048 unmodified linesh1 { max-width: 16ch; margin: .3em 0 .2em; font-size: clamp(2.35rem, 5.6vw, 5.4rem); line-height: 1.05; letter-spacing: -.065em; text-wrap: balance; }[lang='zh-CN'] h1 { max-width: 9em; font-size: clamp(2.15rem, 4.6vw, 4.5rem); letter-spacing: -.032em; }.lede { max-width: 64ch; line-height: 1.62; color: var(--dim); }.hero-index { display: grid; justify-items: start; gap: 8px; }.inference-link { display: inline-flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 44px; border-radius: 7px; color: var(--panel); background: var(--green); font-size: .92rem; font-weight: 700; text-decoration: none; }.inference-link:hover { background: #0c615a; }.task-key p { color: var(--dim); font: .72rem/1.4 var(--mono); }#trace-title { scroll-margin-block-start: 18px; }.sectionbar { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 12px; }.sectionbar h2 { font-size: 1.05rem; letter-spacing: -.02em; }.sectionbar code { color: var(--dim); }135 unmodified lines@media (max-width: 700px) {.hero, .lab { grid-template-columns: minmax(0,1fr); }.hero { margin-top: 12px; }.swipe, video { max-width: 380px; margin-inline: auto; }}@media (max-width: 390px) {
5 unmodified lines678910111213141516171819234 unmodified lines25425525625725825926026126226326426526626726826927027151 unmodified lines3233243253263273285 unmodified linesconst labels = {project: ['Project ↗','项目主页 ↗'], headline: ['One model, four decision tasks.','一个模型,四种决策任务。'],lede: ['Every task starts with two images of the same place. What changes is the question, the text the model sees, and the options it can choose.','四项任务都从同一地点的两期影像出发,区别在于问什么、给模型哪些文字,以及它要从哪些选项中作答。'],choose: ['Choose a decision task','选择决策任务'], observations: ['Bi-temporal observations','双时相观测'], trace: ['Listwise selection · Inference','列表选句 · 完整推理'],diagnosticGroup: ['Training task examples','训练任务示例'], inferenceGroup: ['End-to-end inference','端到端推理'],listIntro: ['With two images and a list of candidates, choose the best-supported caption. Both stages use this task.','给定双时相影像和一组候选,选出最符合影像的一句。正式推理的两个阶段都使用这项任务。'],pairs: ['Change example image pair','更换示例影像'],encode: ['Encode the pair','编码双图'], generate: ['Generate captions','生成候选'], lock: ['Lock the state','锁定状态'],rerank: ['Same-state reranking','同状态精排'], output: ['Final caption','最终描述'],play: ['▷ Step through','▷ 逐步演示'], pause: ['Ⅱ Pause','Ⅱ 暂停演示'], live: ['Run on GPU ↗','实时推理 ↗'],};let lang = new URLSearchParams(location.search).get('lang') === 'zh' ? 'zh' : 'en';const text = (en, zh) => lang === 'zh' ? zh : en;const label = key => text(...labels[key]);234 unmodified linesbyId('language').addEventListener('click', () => {lang = lang === 'en' ? 'zh' : 'en';translate();if (catalog) { renderCases(); showTask(); }});byId('task-grid').addEventListener('click', event => {const button = event.target.closest('[data-task]');if (!button || !catalog || busy || Number(button.dataset.task) === activeTask) return;stopReplay();activeTask = Number(button.dataset.task);alternate = false;divider = 50;renderTasks();showTask();byId('task-grid').querySelector(`[data-task="${activeTask}"]`)?.focus({preventScroll:true});});byId('probe').addEventListener('click', event => {51 unmodified linescatalog = await response.json();select(0);renderTasks();} catch {byId('probe').textContent = text('Examples could not load. Refresh to retry.', '未能加载示例,请刷新重试。');}5 unmodified lines67891011121314151617181920234 unmodified lines25525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529651 unmodified lines3483493503513523533545 unmodified linesconst labels = {project: ['Project ↗','项目主页 ↗'], headline: ['One model, four decision tasks.','一个模型,四种决策任务。'],lede: ['Every task starts with two images of the same place. What changes is the question, the text the model sees, and the options it can choose.','四项任务都从同一地点的两期影像出发,区别在于问什么、给模型哪些文字,以及它要从哪些选项中作答。'],choose: ['Choose a decision task','选择决策任务'], observations: ['Bi-temporal observations','双时相观测'], trace: ['04 · Listwise selection / Live inference','04 · 列表选句 / 实时推理'],openInference: ['Live GPU Inference','GPU 实时推理'], inferencePath: ['Image pair → Beam-15 → Final caption','双时相影像 → Beam-15 → 最终描述'],listIntro: ['With two images and a list of candidates, choose the best-supported caption. Both stages use this task.','给定双时相影像和一组候选,选出最符合影像的一句。正式推理的两个阶段都使用这项任务。'],pairs: ['Change example image pair','更换示例影像'],encode: ['Encode the pair','编码双图'], generate: ['Generate captions','生成候选'], lock: ['Lock the state','锁定状态'],rerank: ['Same-state reranking','同状态精排'], output: ['Final caption','最终描述'],play: ['▷ Step through','▷ 逐步演示'], pause: ['Ⅱ Pause','Ⅱ 暂停演示'], live: ['Run on GPU','开始 GPU 推理'],};const inferenceHash = '#trace-title';let lang = new URLSearchParams(location.search).get('lang') === 'zh' ? 'zh' : 'en';const text = (en, zh) => lang === 'zh' ? zh : en;const label = key => text(...labels[key]);234 unmodified linesbyId('language').addEventListener('click', () => {lang = lang === 'en' ? 'zh' : 'en';const url = new URL(location.href);if (lang === 'zh') url.searchParams.set('lang', 'zh');else url.searchParams.delete('lang');history.replaceState(null, '', url);translate();if (catalog) { renderCases(); showTask(); }});function chooseTask(index) {if (!catalog || busy || index === activeTask) return;stopReplay();activeTask = index;alternate = false;divider = 50;renderTasks();showTask();}function followInferenceLink() {if (!catalog || location.hash !== inferenceHash) return;chooseTask(tasks.length - 1);const title = byId('trace-title');title.scrollIntoView();title.focus({preventScroll: true});}window.addEventListener('hashchange', followInferenceLink);byId('task-grid').addEventListener('click', event => {const button = event.target.closest('[data-task]');if (!button || !catalog || busy) return;chooseTask(Number(button.dataset.task));if (!listwise() && location.hash === inferenceHash) {const url = new URL(location.href);url.hash = '';history.replaceState(null, '', url);}byId('task-grid').querySelector(`[data-task="${activeTask}"]`)?.focus({preventScroll:true});});byId('probe').addEventListener('click', event => {51 unmodified linescatalog = await response.json();select(0);renderTasks();followInferenceLink();} catch {byId('probe').textContent = text('Examples could not load. Refresh to retry.', '未能加载示例,请刷新重试。');}
workbench/index.html+10-7
workbench/lab.css+5-7
workbench/lab.js+33-7