Download index.html from OptimaMT/results: direct link, hf CLI and curl.
- Browser
- Download file 60.8 kB
-
https://huggingface.co/spaces/OptimaMT/results/resolve/main/index.html
- Command line
-
hf download hf://spaces/OptimaMT/results/index.html
-
curl -L -o index.html https://huggingface.co/spaces/OptimaMT/results/resolve/main/index.html
60.8 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>OptimaMT results</title> | |
| <style> | |
| :root { | |
| color-scheme: light; | |
| --surface: #fcfcfb; --card: #ffffff; --line: #e4e3df; --text: #0b0b0b; --muted: #52514e; | |
| --original: #eb6834; --ours: #2a78d6; --link: #1c5cab; | |
| } | |
| @media (prefers-color-scheme: dark) { | |
| :root:not([data-theme="light"]) { | |
| color-scheme: dark; | |
| --surface: #1a1a19; --card: #222220; --line: #383835; --text: #f0efec; --muted: #c3c2b7; | |
| --original: #d95926; --ours: #3987e5; --link: #86b6ef; | |
| } | |
| } | |
| :root[data-theme="dark"] { | |
| color-scheme: dark; | |
| --surface: #1a1a19; --card: #222220; --line: #383835; --text: #f0efec; --muted: #c3c2b7; | |
| --original: #d95926; --ours: #3987e5; --link: #86b6ef; | |
| } | |
| * { box-sizing: border-box; } | |
| body { margin: 0; background: var(--surface); color: var(--text); | |
| font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; } | |
| main { max-width: 880px; margin: 0 auto; padding: 32px 16px 48px; } | |
| h1 { font-size: 28px; margin: 0; letter-spacing: -0.01em; } | |
| h2 { font-size: 17px; margin: 0 0 4px; } | |
| p { margin: 4px 0; } | |
| a { color: var(--link); } | |
| .muted { color: var(--muted); } | |
| .links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; } | |
| .controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 24px 0 16px; } | |
| .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; } | |
| .seg button { border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; | |
| padding: 6px 12px; cursor: pointer; } | |
| .seg button[aria-pressed="true"] { background: var(--text); color: var(--surface); } | |
| .seg button:focus-visible, select:focus-visible { outline: 2px solid var(--ours); outline-offset: 2px; } | |
| select { font: inherit; font-size: 14px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); | |
| background: var(--card); color: var(--text); } | |
| .tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; } | |
| .tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; } | |
| .tile b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; } | |
| .tile span { font-size: 13px; color: var(--muted); } | |
| .card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; | |
| margin-bottom: 16px; } | |
| .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; | |
| margin-bottom: 8px; } | |
| .legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); } | |
| .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; | |
| vertical-align: -1px; } | |
| svg { display: block; width: 100%; height: auto; overflow: visible; } | |
| svg text { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; } | |
| svg .label { fill: var(--text); } | |
| svg .row:hover .band, svg .row:focus .band { fill: var(--line); opacity: 0.5; } | |
| svg .row:focus { outline: none; } | |
| #tip { position: fixed; pointer-events: none; background: var(--card); color: var(--text); | |
| border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; | |
| box-shadow: 0 4px 16px rgba(0,0,0,0.12); display: none; z-index: 10; min-width: 180px; } | |
| #tip .v { font-weight: 600; font-variant-numeric: tabular-nums; } | |
| #tip .k { display: inline-block; width: 12px; height: 2px; margin-right: 6px; vertical-align: 4px; } | |
| details { margin-top: 8px; font-size: 14px; } | |
| textarea { width: 100%; font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); | |
| background: var(--surface); color: var(--text); resize: vertical; } | |
| button.go { font: inherit; font-size: 14px; padding: 7px 16px; border-radius: 8px; border: 0; cursor: pointer; | |
| background: var(--ours); color: #fff; } | |
| button.go:disabled { opacity: 0.6; cursor: progress; } | |
| table { border-collapse: collapse; width: 100%; margin-top: 8px; font-variant-numeric: tabular-nums; } | |
| th, td { text-align: right; padding: 4px 8px; border-bottom: 1px solid var(--line); } | |
| th:first-child, td:first-child { text-align: left; } | |
| footer { font-size: 13px; color: var(--muted); margin-top: 24px; } | |
| @media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } h1 { font-size: 24px; } } | |
| </style> | |
| </head> | |
| <body> | |
| <main> | |
| <h1 id="name"></h1> | |
| <p id="tagline" class="muted"></p> | |
| <div class="links" id="links"></div> | |
| <div class="controls" role="group" aria-label="Chart options"> | |
| <div class="seg" id="os" aria-label="Operating system"></div> | |
| <div class="seg" id="setting" aria-label="ONNX Runtime session options"> | |
| <button data-v="qdq_off" aria-pressed="true">disable_quant_qdq = 1</button> | |
| <button data-v="default" aria-pressed="false">Defaults</button> | |
| </div> | |
| <label class="muted" for="sort">Sort</label> | |
| <select id="sort"> | |
| <option value="saved">Memory saved</option> | |
| <option value="pair">Pair A–Z</option> | |
| <option value="orig">Original size</option> | |
| </select> | |
| </div> | |
| <div class="tiles" id="tiles"></div> | |
| <section class="card" id="demo"> | |
| <div class="head"><h2>Try it in your browser</h2> | |
| <select id="demoPair" aria-label="Language pair"></select></div> | |
| <p class="muted" style="font-size:13px">Runs on your device with transformers.js in fast mode. The first | |
| translation downloads the model (about 110 MB) once.</p> | |
| <textarea id="demoText" rows="2" aria-label="Text to translate"></textarea> | |
| <div style="display:flex;gap:12px;align-items:center;margin-top:8px;flex-wrap:wrap"> | |
| <button id="demoGo" class="go">Translate</button><span id="demoStatus" class="muted" style="font-size:13px"></span></div> | |
| <p id="demoOut" style="font-size:17px;margin-top:8px" dir="auto"></p> | |
| </section> | |
| <section class="card"> | |
| <div class="head"> | |
| <h2 id="allTitle"></h2> | |
| <div class="legend"><span><i style="background:var(--original)"></i>Original</span> | |
| <span><i style="background:var(--ours)"></i><span class="nm"></span></span></div> | |
| </div> | |
| <p class="muted" style="font-size:13px">Memory after loading encoder + decoder, MiB. Hover a row for the numbers.</p> | |
| <svg id="all" role="list" aria-label="Memory after load for every pair"></svg> | |
| <details><summary>Table</summary><table id="allTable"></table></details> | |
| </section> | |
| <section class="card"> | |
| <div class="head"> | |
| <h2>Five reference pairs</h2> | |
| <div class="seg" id="metric" aria-label="Metric"> | |
| <button data-v="load" aria-pressed="true">After load</button> | |
| <button data-v="peak" aria-pressed="false">Peak, 20 lines</button> | |
| <button data-v="ms" aria-pressed="false">ms per step</button> | |
| </div> | |
| </div> | |
| <svg id="ref" role="list" aria-label="Reference pairs"></svg> | |
| </section> | |
| <section class="card"> | |
| <h2>Same translations</h2> | |
| <p id="floresLine" class="muted" style="font-size:14px"></p> | |
| <details><summary>FLORES-200 scores per pair</summary><table id="floresTable"></table></details> | |
| </section> | |
| <section class="card"> | |
| <h2>In the browser</h2> | |
| <p class="muted" style="font-size:14px">transformers.js in headless Chromium (WebAssembly, 4 threads): memory added | |
| to all browser processes by loading the model, and decoder time per step.</p> | |
| <table id="browserTable"></table> | |
| </section> | |
| <footer id="foot"></footer> | |
| </main> | |
| <div id="tip" role="tooltip"></div> | |
| <script> | |
| const D = {"name": "OptimaMT", "tagline": "ONNX Runtime's fast mode at half the memory: 2.3\u20132.5\u00d7 faster than the default, same translations.", "github": "AmerAlreyahi/OptimaMT", "namespace": "OptimaMT", "os": {"Linux": {"ort": "1.31.1", "cpu": "Intel(R) Core(TM) Ultra 7 265KF", "threads": 4, "platform": "Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.39", "pairs": [{"pair": "en-ar", "repo": "OptimaMT/en-ar", "v1-default": 281.9, "v2-default": 220.5, "v1-qdq_off": 527.4, "v2-qdq_off": 282.2, "identical": true}, {"pair": "en-fr", "repo": "OptimaMT/en-fr", "v1-default": 270.4, "v2-default": 212.3, "v1-qdq_off": 504.0, "v2-qdq_off": 271.7, "identical": true}, {"pair": "en-es", "repo": "OptimaMT/en-es", "v1-default": 290.8, "v2-default": 227.4, "v1-qdq_off": 544.9, "v2-qdq_off": 291.2, "identical": true}, {"pair": "en-de", "repo": "OptimaMT/en-de", "v1-default": 265.3, "v2-default": 208.5, "v1-qdq_off": 495.3, "v2-qdq_off": 268.6, "identical": true}, {"pair": "en-ru", "repo": "OptimaMT/en-ru", "v1-default": 280.8, "v2-default": 219.7, "v1-qdq_off": 525.2, "v2-qdq_off": 281.2, "identical": true}, {"pair": "en-zh", "repo": "OptimaMT/en-zh", "v1-default": 290.7, "v2-default": 227.2, "v1-qdq_off": 544.9, "v2-qdq_off": 291.1, "identical": true}, {"pair": "ar-en", "repo": "OptimaMT/ar-en", "v1-default": 283.3, "v2-default": 222.0, "v1-qdq_off": 529.1, "v2-qdq_off": 283.6, "identical": true}, {"pair": "fr-en", "repo": "OptimaMT/fr-en", "v1-default": 270.0, "v2-default": 211.8, "v1-qdq_off": 504.7, "v2-qdq_off": 271.9, "identical": true}, {"pair": "zh-en", "repo": "OptimaMT/zh-en", "v1-default": 290.0, "v2-default": 226.5, "v1-qdq_off": 544.1, "v2-qdq_off": 290.3, "identical": true}, {"pair": "ja-en", "repo": "OptimaMT/ja-en", "v1-default": 273.9, "v2-default": 214.5, "v1-qdq_off": 513.0, "v2-qdq_off": 275.9, "identical": true}, {"pair": "es-en", "repo": "OptimaMT/es-en", "v1-default": 290.4, "v2-default": 226.9, "v1-qdq_off": 544.5, "v2-qdq_off": 290.4, "identical": true}, {"pair": "de-en", "repo": "OptimaMT/de-en", "v1-default": 265.3, "v2-default": 208.5, "v1-qdq_off": 495.3, "v2-qdq_off": 268.5, "identical": true}, {"pair": "ru-en", "repo": "OptimaMT/ru-en", "v1-default": 280.8, "v2-default": 219.9, "v1-qdq_off": 527.4, "v2-qdq_off": 282.0, "identical": true}, {"pair": "it-en", "repo": "OptimaMT/it-en", "v1-default": 254.7, "v2-default": 215.8, "v1-qdq_off": 648.3, "v2-qdq_off": 333.3, "identical": true}, {"pair": "nl-en", "repo": "OptimaMT/nl-en", "v1-default": 232.9, "v2-default": 198.9, "v1-qdq_off": 558.5, "v2-qdq_off": 297.4, "identical": true}, {"pair": "uk-en", "repo": "OptimaMT/uk-en", "v1-default": 278.1, "v2-default": 217.8, "v1-qdq_off": 519.6, "v2-qdq_off": 279.3, "identical": true}, {"pair": "pl-en", "repo": "OptimaMT/pl-en", "v1-default": 285.4, "v2-default": 223.5, "v1-qdq_off": 533.6, "v2-qdq_off": 285.7, "identical": true}, {"pair": "hi-en", "repo": "OptimaMT/hi-en", "v1-default": 276.8, "v2-default": 217.2, "v1-qdq_off": 517.8, "v2-qdq_off": 278.0, "identical": true}, {"pair": "id-en", "repo": "OptimaMT/id-en", "v1-default": 254.5, "v2-default": 200.9, "v1-qdq_off": 472.1, "v2-qdq_off": 257.6, "identical": true}, {"pair": "vi-en", "repo": "OptimaMT/vi-en", "v1-default": 250.9, "v2-default": 198.4, "v1-qdq_off": 465.0, "v2-qdq_off": 254.7, "identical": true}, {"pair": "th-en", "repo": "OptimaMT/th-en", "v1-default": 279.6, "v2-default": 218.9, "v1-qdq_off": 523.5, "v2-qdq_off": 279.8, "identical": true}, {"pair": "ko-en", "repo": "OptimaMT/ko-en", "v1-default": 290.8, "v2-default": 227.5, "v1-qdq_off": 545.0, "v2-qdq_off": 291.1, "identical": true}, {"pair": "en-it", "repo": "OptimaMT/en-it", "v1-default": 254.9, "v2-default": 215.9, "v1-qdq_off": 645.0, "v2-qdq_off": 332.6, "identical": true}, {"pair": "en-nl", "repo": "OptimaMT/en-nl", "v1-default": 230.5, "v2-default": 197.2, "v1-qdq_off": 557.1, "v2-qdq_off": 296.0, "identical": true}, {"pair": "en-uk", "repo": "OptimaMT/en-uk", "v1-default": 277.2, "v2-default": 217.0, "v1-qdq_off": 518.7, "v2-qdq_off": 279.3, "identical": true}, {"pair": "en-hi", "repo": "OptimaMT/en-hi", "v1-default": 279.0, "v2-default": 218.2, "v1-qdq_off": 521.9, "v2-qdq_off": 279.1, "identical": true}, {"pair": "en-id", "repo": "OptimaMT/en-id", "v1-default": 254.0, "v2-default": 200.6, "v1-qdq_off": 471.9, "v2-qdq_off": 257.0, "identical": true}, {"pair": "en-vi", "repo": "OptimaMT/en-vi", "v1-default": 250.6, "v2-default": 198.3, "v1-qdq_off": 464.2, "v2-qdq_off": 256.6, "identical": true}, {"pair": "de-es", "repo": "OptimaMT/de-es", "v1-default": 276.6, "v2-default": 216.8, "v1-qdq_off": 516.5, "v2-qdq_off": 277.9, "identical": true}, {"pair": "de-fr", "repo": "OptimaMT/de-fr", "v1-default": 276.3, "v2-default": 216.6, "v1-qdq_off": 516.2, "v2-qdq_off": 277.4, "identical": true}, {"pair": "es-de", "repo": "OptimaMT/es-de", "v1-default": 276.3, "v2-default": 216.5, "v1-qdq_off": 516.1, "v2-qdq_off": 276.6, "identical": true}, {"pair": "es-fr", "repo": "OptimaMT/es-fr", "v1-default": 244.0, "v2-default": 207.7, "v1-qdq_off": 609.9, "v2-qdq_off": 317.8, "identical": true}, {"pair": "es-it", "repo": "OptimaMT/es-it", "v1-default": 268.6, "v2-default": 211.1, "v1-qdq_off": 501.3, "v2-qdq_off": 269.8, "identical": true}, {"pair": "es-ru", "repo": "OptimaMT/es-ru", "v1-default": 283.9, "v2-default": 221.9, "v1-qdq_off": 532.0, "v2-qdq_off": 284.2, "identical": true}, {"pair": "fr-de", "repo": "OptimaMT/fr-de", "v1-default": 275.9, "v2-default": 216.1, "v1-qdq_off": 515.7, "v2-qdq_off": 276.3, "identical": true}, {"pair": "fr-es", "repo": "OptimaMT/fr-es", "v1-default": 242.8, "v2-default": 207.8, "v1-qdq_off": 609.6, "v2-qdq_off": 316.4, "identical": true}, {"pair": "fr-ru", "repo": "OptimaMT/fr-ru", "v1-default": 287.2, "v2-default": 224.4, "v1-qdq_off": 538.9, "v2-qdq_off": 287.4, "identical": true}, {"pair": "it-es", "repo": "OptimaMT/it-es", "v1-default": 268.6, "v2-default": 211.1, "v1-qdq_off": 501.3, "v2-qdq_off": 271.0, "identical": true}, {"pair": "it-fr", "repo": "OptimaMT/it-fr", "v1-default": 269.7, "v2-default": 211.9, "v1-qdq_off": 502.8, "v2-qdq_off": 271.9, "identical": true}, {"pair": "ru-es", "repo": "OptimaMT/ru-es", "v1-default": 283.9, "v2-default": 221.9, "v1-qdq_off": 532.8, "v2-qdq_off": 285.0, "identical": true}, {"pair": "ru-fr", "repo": "OptimaMT/ru-fr", "v1-default": 287.4, "v2-default": 224.4, "v1-qdq_off": 539.9, "v2-qdq_off": 288.3, "identical": true}, {"pair": "ru-uk", "repo": "OptimaMT/ru-uk", "v1-default": 264.8, "v2-default": 208.4, "v1-qdq_off": 494.0, "v2-qdq_off": 267.8, "identical": true}, {"pair": "uk-ru", "repo": "OptimaMT/uk-ru", "v1-default": 264.8, "v2-default": 208.2, "v1-qdq_off": 494.4, "v2-qdq_off": 268.3, "identical": true}, {"pair": "nl-fr", "repo": "OptimaMT/nl-fr", "v1-default": 265.9, "v2-default": 209.6, "v1-qdq_off": 494.3, "v2-qdq_off": 270.0, "identical": true}, {"pair": "fr-ar", "repo": "OptimaMT/fr-ar", "v1-default": 280.6, "v2-default": 219.5, "v1-qdq_off": 525.3, "v2-qdq_off": 280.7, "identical": true}, {"pair": "es-ar", "repo": "OptimaMT/es-ar", "v1-default": 280.8, "v2-default": 220.0, "v1-qdq_off": 526.2, "v2-qdq_off": 281.9, "identical": true}, {"pair": "ar-fr", "repo": "OptimaMT/ar-fr", "v1-default": 288.4, "v2-default": 225.9, "v1-qdq_off": 542.4, "v2-qdq_off": 289.5, "identical": true}, {"pair": "ar-es", "repo": "OptimaMT/ar-es", "v1-default": 281.3, "v2-default": 220.2, "v1-qdq_off": 525.7, "v2-qdq_off": 281.2, "identical": true}, {"pair": "ar-de", "repo": "OptimaMT/ar-de", "v1-default": 283.0, "v2-default": 221.2, "v1-qdq_off": 529.6, "v2-qdq_off": 283.0, "identical": true}, {"pair": "en-pt", "repo": "OptimaMT/en-pt", "v1-default": 290.7, "v2-default": 225.3, "v1-qdq_off": 542.5, "v2-qdq_off": 289.0, "identical": true}, {"pair": "pt-en", "repo": "OptimaMT/pt-en", "v1-default": 290.7, "v2-default": 227.1, "v1-qdq_off": 543.3, "v2-qdq_off": 291.1, "identical": true}], "reference": [{"pair": "en-ar", "config": "v1-default", "load": 281.9, "peak": 528.6, "ms": 17.21}, {"pair": "en-ar", "config": "v1-qdq_off", "load": 528.1, "peak": 604.7, "ms": 7.16}, {"pair": "en-ar", "config": "v2-qdq_off", "load": 282.0, "peak": 358.3, "ms": 6.83}, {"pair": "en-ar", "config": "v2-default", "load": 220.5, "peak": 476.4, "ms": 17.27}, {"pair": "ar-en", "config": "v1-default", "load": 283.4, "peak": 529.9, "ms": 18.67}, {"pair": "ar-en", "config": "v1-qdq_off", "load": 529.1, "peak": 594.6, "ms": 7.83}, {"pair": "ar-en", "config": "v2-qdq_off", "load": 283.6, "peak": 349.1, "ms": 7.14}, {"pair": "ar-en", "config": "v2-default", "load": 222.0, "peak": 478.7, "ms": 17.17}, {"pair": "en-de", "config": "v1-default", "load": 265.3, "peak": 519.9, "ms": 17.43}, {"pair": "en-de", "config": "v1-qdq_off", "load": 495.3, "peak": 560.8, "ms": 6.83}, {"pair": "en-de", "config": "v2-qdq_off", "load": 268.4, "peak": 332.9, "ms": 6.94}, {"pair": "en-de", "config": "v2-default", "load": 208.5, "peak": 444.9, "ms": 17.44}, {"pair": "de-en", "config": "v1-default", "load": 265.3, "peak": 519.8, "ms": 17.27}, {"pair": "de-en", "config": "v1-qdq_off", "load": 494.5, "peak": 547.1, "ms": 6.87}, {"pair": "de-en", "config": "v2-qdq_off", "load": 268.4, "peak": 320.9, "ms": 6.92}, {"pair": "de-en", "config": "v2-default", "load": 208.4, "peak": 436.8, "ms": 15.08}, {"pair": "ja-en", "config": "v1-default", "load": 273.9, "peak": 530.6, "ms": 15.73}, {"pair": "ja-en", "config": "v1-qdq_off", "load": 512.0, "peak": 579.3, "ms": 6.71}, {"pair": "ja-en", "config": "v2-qdq_off", "load": 275.1, "peak": 342.4, "ms": 7.38}, {"pair": "ja-en", "config": "v2-default", "load": 214.5, "peak": 463.6, "ms": 18.33}]}, "Windows": {"ort": "1.31.1", "cpu": "Intel(R) Core(TM) Ultra 7 265KF", "threads": 4, "platform": "Windows-10-10.0.19045-SP0", "pairs": [{"pair": "en-ar", "repo": "OptimaMT/en-ar", "v1-default": 197.7, "v2-default": 165.8, "v1-qdq_off": 503.9, "v2-qdq_off": 256.5, "identical": true}, {"pair": "en-fr", "repo": "OptimaMT/en-fr", "v1-default": 189.8, "v2-default": 162.7, "v1-qdq_off": 480.9, "v2-qdq_off": 251.4, "identical": true}, {"pair": "en-es", "repo": "OptimaMT/en-es", "v1-default": 200.8, "v2-default": 170.4, "v1-qdq_off": 517.0, "v2-qdq_off": 266.6, "identical": true}, {"pair": "en-de", "repo": "OptimaMT/en-de", "v1-default": 187.0, "v2-default": 158.4, "v1-qdq_off": 471.4, "v2-qdq_off": 243.6, "identical": true}, {"pair": "en-ru", "repo": "OptimaMT/en-ru", "v1-default": 194.9, "v2-default": 166.9, "v1-qdq_off": 500.1, "v2-qdq_off": 256.7, "identical": true}, {"pair": "en-zh", "repo": "OptimaMT/en-zh", "v1-default": 201.0, "v2-default": 173.2, "v1-qdq_off": 518.8, "v2-qdq_off": 263.2, "identical": true}, {"pair": "ar-en", "repo": "OptimaMT/ar-en", "v1-default": 196.0, "v2-default": 167.0, "v1-qdq_off": 503.9, "v2-qdq_off": 258.1, "identical": true}, {"pair": "fr-en", "repo": "OptimaMT/fr-en", "v1-default": 192.1, "v2-default": 162.0, "v1-qdq_off": 480.7, "v2-qdq_off": 249.1, "identical": true}, {"pair": "zh-en", "repo": "OptimaMT/zh-en", "v1-default": 202.4, "v2-default": 170.8, "v1-qdq_off": 517.8, "v2-qdq_off": 266.4, "identical": true}, {"pair": "ja-en", "repo": "OptimaMT/ja-en", "v1-default": 193.7, "v2-default": 163.5, "v1-qdq_off": 488.5, "v2-qdq_off": 252.7, "identical": true}, {"pair": "es-en", "repo": "OptimaMT/es-en", "v1-default": 201.6, "v2-default": 170.4, "v1-qdq_off": 519.4, "v2-qdq_off": 263.2, "identical": true}, {"pair": "de-en", "repo": "OptimaMT/de-en", "v1-default": 189.9, "v2-default": 158.2, "v1-qdq_off": 473.6, "v2-qdq_off": 245.1, "identical": true}, {"pair": "ru-en", "repo": "OptimaMT/ru-en", "v1-default": 195.6, "v2-default": 165.4, "v1-qdq_off": 501.8, "v2-qdq_off": 258.6, "identical": true}, {"pair": "it-en", "repo": "OptimaMT/it-en", "v1-default": 231.2, "v2-default": 194.8, "v1-qdq_off": 626.4, "v2-qdq_off": 311.2, "identical": true}, {"pair": "nl-en", "repo": "OptimaMT/nl-en", "v1-default": 204.3, "v2-default": 172.7, "v1-qdq_off": 532.9, "v2-qdq_off": 271.3, "identical": true}, {"pair": "uk-en", "repo": "OptimaMT/uk-en", "v1-default": 194.9, "v2-default": 164.0, "v1-qdq_off": 495.2, "v2-qdq_off": 257.2, "identical": true}, {"pair": "pl-en", "repo": "OptimaMT/pl-en", "v1-default": 200.0, "v2-default": 168.7, "v1-qdq_off": 508.7, "v2-qdq_off": 261.1, "identical": true}, {"pair": "hi-en", "repo": "OptimaMT/hi-en", "v1-default": 194.0, "v2-default": 164.4, "v1-qdq_off": 491.4, "v2-qdq_off": 255.8, "identical": true}, {"pair": "id-en", "repo": "OptimaMT/id-en", "v1-default": 181.2, "v2-default": 154.8, "v1-qdq_off": 448.8, "v2-qdq_off": 234.6, "identical": true}, {"pair": "vi-en", "repo": "OptimaMT/vi-en", "v1-default": 180.7, "v2-default": 153.8, "v1-qdq_off": 442.2, "v2-qdq_off": 232.3, "identical": true}, {"pair": "th-en", "repo": "OptimaMT/th-en", "v1-default": 199.3, "v2-default": 167.3, "v1-qdq_off": 500.9, "v2-qdq_off": 259.9, "identical": true}, {"pair": "ko-en", "repo": "OptimaMT/ko-en", "v1-default": 200.3, "v2-default": 168.7, "v1-qdq_off": 520.2, "v2-qdq_off": 265.4, "identical": true}, {"pair": "en-it", "repo": "OptimaMT/en-it", "v1-default": 230.2, "v2-default": 190.5, "v1-qdq_off": 621.4, "v2-qdq_off": 307.3, "identical": true}, {"pair": "en-nl", "repo": "OptimaMT/en-nl", "v1-default": 205.5, "v2-default": 172.8, "v1-qdq_off": 532.7, "v2-qdq_off": 269.8, "identical": true}, {"pair": "en-uk", "repo": "OptimaMT/en-uk", "v1-default": 195.1, "v2-default": 163.2, "v1-qdq_off": 494.5, "v2-qdq_off": 256.5, "identical": true}, {"pair": "en-hi", "repo": "OptimaMT/en-hi", "v1-default": 195.8, "v2-default": 164.5, "v1-qdq_off": 497.7, "v2-qdq_off": 255.4, "identical": true}, {"pair": "en-id", "repo": "OptimaMT/en-id", "v1-default": 180.9, "v2-default": 154.3, "v1-qdq_off": 448.3, "v2-qdq_off": 235.9, "identical": true}, {"pair": "en-vi", "repo": "OptimaMT/en-vi", "v1-default": 179.4, "v2-default": 155.0, "v1-qdq_off": 440.6, "v2-qdq_off": 231.7, "identical": true}, {"pair": "de-es", "repo": "OptimaMT/de-es", "v1-default": 192.7, "v2-default": 165.3, "v1-qdq_off": 493.3, "v2-qdq_off": 254.1, "identical": true}, {"pair": "de-fr", "repo": "OptimaMT/de-fr", "v1-default": 194.5, "v2-default": 165.5, "v1-qdq_off": 492.7, "v2-qdq_off": 253.3, "identical": true}, {"pair": "es-de", "repo": "OptimaMT/es-de", "v1-default": 195.5, "v2-default": 165.2, "v1-qdq_off": 492.2, "v2-qdq_off": 252.7, "identical": true}, {"pair": "es-fr", "repo": "OptimaMT/es-fr", "v1-default": 222.4, "v2-default": 184.7, "v1-qdq_off": 585.8, "v2-qdq_off": 295.3, "identical": true}, {"pair": "es-it", "repo": "OptimaMT/es-it", "v1-default": 192.1, "v2-default": 163.2, "v1-qdq_off": 478.7, "v2-qdq_off": 248.6, "identical": true}, {"pair": "es-ru", "repo": "OptimaMT/es-ru", "v1-default": 201.0, "v2-default": 166.5, "v1-qdq_off": 508.5, "v2-qdq_off": 258.9, "identical": true}, {"pair": "fr-de", "repo": "OptimaMT/fr-de", "v1-default": 194.9, "v2-default": 164.2, "v1-qdq_off": 494.4, "v2-qdq_off": 254.9, "identical": true}, {"pair": "fr-es", "repo": "OptimaMT/fr-es", "v1-default": 221.1, "v2-default": 184.3, "v1-qdq_off": 587.2, "v2-qdq_off": 292.7, "identical": true}, {"pair": "fr-ru", "repo": "OptimaMT/fr-ru", "v1-default": 199.7, "v2-default": 168.3, "v1-qdq_off": 513.4, "v2-qdq_off": 264.3, "identical": true}, {"pair": "it-es", "repo": "OptimaMT/it-es", "v1-default": 189.8, "v2-default": 161.4, "v1-qdq_off": 477.6, "v2-qdq_off": 245.9, "identical": true}, {"pair": "it-fr", "repo": "OptimaMT/it-fr", "v1-default": 191.2, "v2-default": 161.7, "v1-qdq_off": 481.0, "v2-qdq_off": 248.9, "identical": true}, {"pair": "ru-es", "repo": "OptimaMT/ru-es", "v1-default": 196.8, "v2-default": 168.5, "v1-qdq_off": 509.2, "v2-qdq_off": 260.5, "identical": true}, {"pair": "ru-fr", "repo": "OptimaMT/ru-fr", "v1-default": 199.4, "v2-default": 167.6, "v1-qdq_off": 514.6, "v2-qdq_off": 262.0, "identical": true}, {"pair": "ru-uk", "repo": "OptimaMT/ru-uk", "v1-default": 189.2, "v2-default": 159.1, "v1-qdq_off": 470.5, "v2-qdq_off": 244.4, "identical": true}, {"pair": "uk-ru", "repo": "OptimaMT/uk-ru", "v1-default": 188.2, "v2-default": 158.5, "v1-qdq_off": 471.0, "v2-qdq_off": 243.2, "identical": true}, {"pair": "nl-fr", "repo": "OptimaMT/nl-fr", "v1-default": 186.9, "v2-default": 157.8, "v1-qdq_off": 467.4, "v2-qdq_off": 242.0, "identical": true}, {"pair": "fr-ar", "repo": "OptimaMT/fr-ar", "v1-default": 196.1, "v2-default": 165.2, "v1-qdq_off": 499.5, "v2-qdq_off": 256.6, "identical": true}, {"pair": "es-ar", "repo": "OptimaMT/es-ar", "v1-default": 197.2, "v2-default": 165.6, "v1-qdq_off": 502.3, "v2-qdq_off": 259.8, "identical": true}, {"pair": "ar-fr", "repo": "OptimaMT/ar-fr", "v1-default": 199.5, "v2-default": 169.5, "v1-qdq_off": 513.9, "v2-qdq_off": 265.4, "identical": true}, {"pair": "ar-es", "repo": "OptimaMT/ar-es", "v1-default": 195.7, "v2-default": 167.8, "v1-qdq_off": 503.2, "v2-qdq_off": 256.3, "identical": true}, {"pair": "ar-de", "repo": "OptimaMT/ar-de", "v1-default": 198.6, "v2-default": 166.6, "v1-qdq_off": 505.8, "v2-qdq_off": 258.6, "identical": true}], "reference": [{"pair": "en-ar", "config": "v1-default", "load": 196.0, "peak": 396.8, "ms": 22.13}, {"pair": "en-ar", "config": "v1-qdq_off", "load": 502.6, "peak": 582.7, "ms": 9.84}, {"pair": "en-ar", "config": "v2-qdq_off", "load": 258.7, "peak": 339.0, "ms": 10.19}, {"pair": "en-ar", "config": "v2-default", "load": 166.5, "peak": 367.7, "ms": 21.18}, {"pair": "ar-en", "config": "v1-default", "load": 195.6, "peak": 390.2, "ms": 22.87}, {"pair": "ar-en", "config": "v1-qdq_off", "load": 503.5, "peak": 572.9, "ms": 9.76}, {"pair": "ar-en", "config": "v2-qdq_off", "load": 257.7, "peak": 327.0, "ms": 10.61}, {"pair": "ar-en", "config": "v2-default", "load": 166.0, "peak": 364.9, "ms": 22.6}, {"pair": "en-de", "config": "v1-default", "load": 187.3, "peak": 469.1, "ms": 21.26}, {"pair": "en-de", "config": "v1-qdq_off", "load": 472.8, "peak": 541.2, "ms": 8.78}, {"pair": "en-de", "config": "v2-qdq_off", "load": 244.1, "peak": 313.1, "ms": 8.46}, {"pair": "en-de", "config": "v2-default", "load": 158.7, "peak": 345.9, "ms": 19.3}, {"pair": "de-en", "config": "v1-default", "load": 189.7, "peak": 465.5, "ms": 20.9}, {"pair": "de-en", "config": "v1-qdq_off", "load": 472.2, "peak": 527.2, "ms": 9.24}, {"pair": "de-en", "config": "v2-qdq_off", "load": 245.0, "peak": 300.5, "ms": 9.07}, {"pair": "de-en", "config": "v2-default", "load": 157.9, "peak": 337.9, "ms": 19.94}, {"pair": "ja-en", "config": "v1-default", "load": 193.7, "peak": 483.4, "ms": 21.31}, {"pair": "ja-en", "config": "v1-qdq_off", "load": 488.9, "peak": 559.6, "ms": 8.84}, {"pair": "ja-en", "config": "v2-qdq_off", "load": 251.1, "peak": 321.9, "ms": 8.89}, {"pair": "ja-en", "config": "v2-default", "load": 164.8, "peak": 363.4, "ms": 20.21}]}}, "demo": [{"pair": "de-en", "repo": "OptimaMT/de-en", "text": "Der Leuchtturm steht an der K\u00fcste."}, {"pair": "en-fr", "repo": "OptimaMT/en-fr", "text": "The lighthouse stands on the coast."}, {"pair": "fr-en", "repo": "OptimaMT/fr-en", "text": "Le phare se dresse sur la c\u00f4te."}, {"pair": "en-de", "repo": "OptimaMT/en-de", "text": "The lighthouse stands on the coast."}, {"pair": "es-en", "repo": "OptimaMT/es-en", "text": "El faro est\u00e1 en la costa."}, {"pair": "en-es", "repo": "OptimaMT/en-es", "text": "The lighthouse stands on the coast."}], "flores": [{"pair": "en-ar", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "22.03", "bleu_rebuilt": "22.03", "chrf_original": "54.14", "chrf_rebuilt": "54.14"}, {"pair": "en-ar", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "22.03", "bleu_rebuilt": "22.03", "chrf_original": "54.14", "chrf_rebuilt": "54.14"}, {"pair": "en-fr", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "46.42", "bleu_rebuilt": "46.42", "chrf_original": "68.96", "chrf_rebuilt": "68.96"}, {"pair": "en-fr", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "46.42", "bleu_rebuilt": "46.42", "chrf_original": "68.96", "chrf_rebuilt": "68.96"}, {"pair": "en-es", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "26.15", "bleu_rebuilt": "26.15", "chrf_original": "54.81", "chrf_rebuilt": "54.81"}, {"pair": "en-es", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "26.15", "bleu_rebuilt": "26.15", "chrf_original": "54.81", "chrf_rebuilt": "54.81"}, {"pair": "en-de", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "34.7", "bleu_rebuilt": "34.7", "chrf_original": "62.51", "chrf_rebuilt": "62.51"}, {"pair": "en-de", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "34.7", "bleu_rebuilt": "34.7", "chrf_original": "62.51", "chrf_rebuilt": "62.51"}, {"pair": "en-ru", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "24.14", "bleu_rebuilt": "24.14", "chrf_original": "52.27", "chrf_rebuilt": "52.27"}, {"pair": "en-ru", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "24.14", "bleu_rebuilt": "24.14", "chrf_original": "52.27", "chrf_rebuilt": "52.27"}, {"pair": "en-zh", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "31.63", "bleu_rebuilt": "31.63", "chrf_original": "28.29", "chrf_rebuilt": "28.29"}, {"pair": "en-zh", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "31.63", "bleu_rebuilt": "31.63", "chrf_original": "28.29", "chrf_rebuilt": "28.29"}, {"pair": "ar-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "33.43", "bleu_rebuilt": "33.43", "chrf_original": "60.37", "chrf_rebuilt": "60.37"}, {"pair": "ar-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "33.43", "bleu_rebuilt": "33.43", "chrf_original": "60.37", "chrf_rebuilt": "60.37"}, {"pair": "fr-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "41.43", "bleu_rebuilt": "41.43", "chrf_original": "66.62", "chrf_rebuilt": "66.62"}, {"pair": "fr-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "41.43", "bleu_rebuilt": "41.43", "chrf_original": "66.62", "chrf_rebuilt": "66.62"}, {"pair": "zh-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "22.34", "bleu_rebuilt": "22.34", "chrf_original": "52.63", "chrf_rebuilt": "52.63"}, {"pair": "zh-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "22.34", "bleu_rebuilt": "22.34", "chrf_original": "52.63", "chrf_rebuilt": "52.63"}, {"pair": "ja-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "17.68", "bleu_rebuilt": "17.68", "chrf_original": "47.7", "chrf_rebuilt": "47.7"}, {"pair": "ja-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "17.68", "bleu_rebuilt": "17.68", "chrf_original": "47.7", "chrf_rebuilt": "47.7"}, {"pair": "es-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "27.64", "bleu_rebuilt": "27.64", "chrf_original": "58.08", "chrf_rebuilt": "58.08"}, {"pair": "es-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "27.64", "bleu_rebuilt": "27.64", "chrf_original": "58.08", "chrf_rebuilt": "58.08"}, {"pair": "de-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "40.04", "bleu_rebuilt": "40.04", "chrf_original": "66.18", "chrf_rebuilt": "66.18"}, {"pair": "de-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "40.04", "bleu_rebuilt": "40.04", "chrf_original": "66.18", "chrf_rebuilt": "66.18"}, {"pair": "ru-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "28.51", "bleu_rebuilt": "28.51", "chrf_original": "57.03", "chrf_rebuilt": "57.03"}, {"pair": "ru-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "28.51", "bleu_rebuilt": "28.51", "chrf_original": "57.03", "chrf_rebuilt": "57.03"}, {"pair": "it-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "29.6", "bleu_rebuilt": "29.6", "chrf_original": "59.75", "chrf_rebuilt": "59.75"}, {"pair": "it-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "29.6", "bleu_rebuilt": "29.6", "chrf_original": "59.75", "chrf_rebuilt": "59.75"}, {"pair": "nl-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "29.11", "bleu_rebuilt": "29.11", "chrf_original": "57.99", "chrf_rebuilt": "57.99"}, {"pair": "nl-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "29.11", "bleu_rebuilt": "29.11", "chrf_original": "57.99", "chrf_rebuilt": "57.99"}, {"pair": "uk-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "27.11", "bleu_rebuilt": "27.11", "chrf_original": "55.26", "chrf_rebuilt": "55.26"}, {"pair": "uk-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "27.11", "bleu_rebuilt": "27.11", "chrf_original": "55.26", "chrf_rebuilt": "55.26"}, {"pair": "pl-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "23.7", "bleu_rebuilt": "23.7", "chrf_original": "53.09", "chrf_rebuilt": "53.09"}, {"pair": "pl-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "23.7", "bleu_rebuilt": "23.7", "chrf_original": "53.09", "chrf_rebuilt": "53.09"}, {"pair": "hi-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "18.11", "bleu_rebuilt": "18.11", "chrf_original": "44.76", "chrf_rebuilt": "44.76"}, {"pair": "hi-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "18.11", "bleu_rebuilt": "18.11", "chrf_original": "44.76", "chrf_rebuilt": "44.76"}, {"pair": "id-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "32.89", "bleu_rebuilt": "32.89", "chrf_original": "60.75", "chrf_rebuilt": "60.75"}, {"pair": "id-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "32.89", "bleu_rebuilt": "32.89", "chrf_original": "60.75", "chrf_rebuilt": "60.75"}, {"pair": "vi-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "24.31", "bleu_rebuilt": "24.31", "chrf_original": "51.95", "chrf_rebuilt": "51.95"}, {"pair": "vi-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "24.31", "bleu_rebuilt": "24.31", "chrf_original": "51.95", "chrf_rebuilt": "51.95"}, {"pair": "th-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "18.44", "bleu_rebuilt": "18.44", "chrf_original": "47.77", "chrf_rebuilt": "47.77"}, {"pair": "th-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "18.44", "bleu_rebuilt": "18.44", "chrf_original": "47.77", "chrf_rebuilt": "47.77"}, {"pair": "ko-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "19.22", "bleu_rebuilt": "19.22", "chrf_original": "48.81", "chrf_rebuilt": "48.81"}, {"pair": "ko-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "19.22", "bleu_rebuilt": "19.22", "chrf_original": "48.81", "chrf_rebuilt": "48.81"}, {"pair": "en-it", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "27.32", "bleu_rebuilt": "27.32", "chrf_original": "57.45", "chrf_rebuilt": "57.45"}, {"pair": "en-it", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "27.32", "bleu_rebuilt": "27.32", "chrf_original": "57.45", "chrf_rebuilt": "57.45"}, {"pair": "en-nl", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "24.63", "bleu_rebuilt": "24.63", "chrf_original": "56.57", "chrf_rebuilt": "56.57"}, {"pair": "en-nl", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "24.63", "bleu_rebuilt": "24.63", "chrf_original": "56.57", "chrf_rebuilt": "56.57"}, {"pair": "en-uk", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "18.66", "bleu_rebuilt": "18.66", "chrf_original": "47.35", "chrf_rebuilt": "47.35"}, {"pair": "en-uk", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "18.66", "bleu_rebuilt": "18.66", "chrf_original": "47.35", "chrf_rebuilt": "47.35"}, {"pair": "en-hi", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "11.33", "bleu_rebuilt": "11.33", "chrf_original": "32.0", "chrf_rebuilt": "32.0"}, {"pair": "en-hi", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "11.33", "bleu_rebuilt": "11.33", "chrf_original": "32.0", "chrf_rebuilt": "32.0"}, {"pair": "en-id", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "37.56", "bleu_rebuilt": "37.56", "chrf_original": "64.66", "chrf_rebuilt": "64.66"}, {"pair": "en-id", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "37.56", "bleu_rebuilt": "37.56", "chrf_original": "64.66", "chrf_rebuilt": "64.66"}, {"pair": "en-vi", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "24.5", "bleu_rebuilt": "24.5", "chrf_original": "43.68", "chrf_rebuilt": "43.68"}, {"pair": "en-vi", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "24.5", "bleu_rebuilt": "24.5", "chrf_original": "43.68", "chrf_rebuilt": "43.68"}, {"pair": "de-es", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "20.88", "bleu_rebuilt": "20.88", "chrf_original": "49.83", "chrf_rebuilt": "49.83"}, {"pair": "de-es", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "20.88", "bleu_rebuilt": "20.88", "chrf_original": "49.83", "chrf_rebuilt": "49.83"}, {"pair": "de-fr", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "32.2", "bleu_rebuilt": "32.2", "chrf_original": "59.38", "chrf_rebuilt": "59.38"}, {"pair": "de-fr", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "32.2", "bleu_rebuilt": "32.2", "chrf_original": "59.38", "chrf_rebuilt": "59.38"}, {"pair": "es-de", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "17.75", "bleu_rebuilt": "17.75", "chrf_original": "50.18", "chrf_rebuilt": "50.18"}, {"pair": "es-de", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "17.75", "bleu_rebuilt": "17.75", "chrf_original": "50.18", "chrf_rebuilt": "50.18"}, {"pair": "es-fr", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "24.74", "bleu_rebuilt": "24.74", "chrf_original": "55.42", "chrf_rebuilt": "55.42"}, {"pair": "es-fr", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "24.74", "bleu_rebuilt": "24.74", "chrf_original": "55.42", "chrf_rebuilt": "55.42"}, {"pair": "es-it", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "20.58", "bleu_rebuilt": "20.58", "chrf_original": "51.41", "chrf_rebuilt": "51.41"}, {"pair": "es-it", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "20.58", "bleu_rebuilt": "20.58", "chrf_original": "51.41", "chrf_rebuilt": "51.41"}, {"pair": "es-ru", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "14.77", "bleu_rebuilt": "14.77", "chrf_original": "44.71", "chrf_rebuilt": "44.71"}, {"pair": "es-ru", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "14.77", "bleu_rebuilt": "14.77", "chrf_original": "44.71", "chrf_rebuilt": "44.71"}, {"pair": "fr-de", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "25.22", "bleu_rebuilt": "25.22", "chrf_original": "55.56", "chrf_rebuilt": "55.56"}, {"pair": "fr-de", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "25.22", "bleu_rebuilt": "25.22", "chrf_original": "55.56", "chrf_rebuilt": "55.56"}, {"pair": "fr-es", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "21.37", "bleu_rebuilt": "21.37", "chrf_original": "49.9", "chrf_rebuilt": "49.9"}, {"pair": "fr-es", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "21.37", "bleu_rebuilt": "21.37", "chrf_original": "49.9", "chrf_rebuilt": "49.9"}, {"pair": "fr-ru", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "15.07", "bleu_rebuilt": "15.07", "chrf_original": "44.17", "chrf_rebuilt": "44.17"}, {"pair": "fr-ru", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "15.07", "bleu_rebuilt": "15.07", "chrf_original": "44.17", "chrf_rebuilt": "44.17"}, {"pair": "it-es", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "21.72", "bleu_rebuilt": "21.72", "chrf_original": "51.17", "chrf_rebuilt": "51.17"}, {"pair": "it-es", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "21.72", "bleu_rebuilt": "21.72", "chrf_original": "51.17", "chrf_rebuilt": "51.17"}, {"pair": "it-fr", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "30.22", "bleu_rebuilt": "30.22", "chrf_original": "58.86", "chrf_rebuilt": "58.86"}, {"pair": "it-fr", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "30.22", "bleu_rebuilt": "30.22", "chrf_original": "58.86", "chrf_rebuilt": "58.86"}, {"pair": "ru-es", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "18.07", "bleu_rebuilt": "18.07", "chrf_original": "46.65", "chrf_rebuilt": "46.65"}, {"pair": "ru-es", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "18.07", "bleu_rebuilt": "18.07", "chrf_original": "46.65", "chrf_rebuilt": "46.65"}, {"pair": "ru-fr", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "24.43", "bleu_rebuilt": "24.43", "chrf_original": "52.95", "chrf_rebuilt": "52.95"}, {"pair": "ru-fr", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "24.43", "bleu_rebuilt": "24.43", "chrf_original": "52.95", "chrf_rebuilt": "52.95"}, {"pair": "ru-uk", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "20.36", "bleu_rebuilt": "20.36", "chrf_original": "49.51", "chrf_rebuilt": "49.51"}, {"pair": "ru-uk", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "20.36", "bleu_rebuilt": "20.36", "chrf_original": "49.51", "chrf_rebuilt": "49.51"}, {"pair": "uk-ru", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "23.28", "bleu_rebuilt": "23.28", "chrf_original": "51.04", "chrf_rebuilt": "51.04"}, {"pair": "uk-ru", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "23.28", "bleu_rebuilt": "23.28", "chrf_original": "51.04", "chrf_rebuilt": "51.04"}, {"pair": "nl-fr", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "22.88", "bleu_rebuilt": "22.88", "chrf_original": "52.15", "chrf_rebuilt": "52.15"}, {"pair": "nl-fr", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "22.88", "bleu_rebuilt": "22.88", "chrf_original": "52.15", "chrf_rebuilt": "52.15"}, {"pair": "fr-ar", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "13.61", "bleu_rebuilt": "13.61", "chrf_original": "45.82", "chrf_rebuilt": "45.82"}, {"pair": "fr-ar", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "13.61", "bleu_rebuilt": "13.61", "chrf_original": "45.82", "chrf_rebuilt": "45.82"}, {"pair": "es-ar", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "10.52", "bleu_rebuilt": "10.52", "chrf_original": "43.09", "chrf_rebuilt": "43.09"}, {"pair": "es-ar", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "10.52", "bleu_rebuilt": "10.52", "chrf_original": "43.09", "chrf_rebuilt": "43.09"}, {"pair": "ar-fr", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "26.01", "bleu_rebuilt": "26.01", "chrf_original": "53.48", "chrf_rebuilt": "53.48"}, {"pair": "ar-fr", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "26.01", "bleu_rebuilt": "26.01", "chrf_original": "53.48", "chrf_rebuilt": "53.48"}, {"pair": "ar-es", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "17.85", "bleu_rebuilt": "17.85", "chrf_original": "46.35", "chrf_rebuilt": "46.35"}, {"pair": "ar-es", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "17.85", "bleu_rebuilt": "17.85", "chrf_original": "46.35", "chrf_rebuilt": "46.35"}, {"pair": "ar-de", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "17.43", "bleu_rebuilt": "17.43", "chrf_original": "47.48", "chrf_rebuilt": "47.48"}, {"pair": "ar-de", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "17.43", "bleu_rebuilt": "17.43", "chrf_original": "47.48", "chrf_rebuilt": "47.48"}, {"pair": "en-pt", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "41.73", "bleu_rebuilt": "41.73", "chrf_original": "66.59", "chrf_rebuilt": "66.59"}, {"pair": "en-pt", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "41.73", "bleu_rebuilt": "41.73", "chrf_original": "66.59", "chrf_rebuilt": "66.59"}, {"pair": "pt-en", "setting": "qdq_off", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "44.75", "bleu_rebuilt": "44.75", "chrf_original": "69.08", "chrf_rebuilt": "69.08"}, {"pair": "pt-en", "setting": "default", "sentences": "1012", "identical_sentences": "1012", "bleu_original": "44.75", "bleu_rebuilt": "44.75", "chrf_original": "69.08", "chrf_rebuilt": "69.08"}], "browser": [{"pair": "en-ar", "setting": "default", "loaded_mib_original": "754.6", "loaded_mib_rebuilt": "821.8", "after_batch_mib_original": "852.3", "after_batch_mib_rebuilt": "806.0", "ms_per_step_original": "39.13", "ms_per_step_rebuilt": "38.71", "identical": "True", "chromium": "156.0.8078.4"}, {"pair": "en-ar", "setting": "qdq_off", "loaded_mib_original": "1320.7", "loaded_mib_rebuilt": "1070.4", "after_batch_mib_original": "1254.4", "after_batch_mib_rebuilt": "1004.4", "ms_per_step_original": "29.28", "ms_per_step_rebuilt": "29.24", "identical": "True", "chromium": "156.0.8078.4"}, {"pair": "ar-en", "setting": "default", "loaded_mib_original": "755.1", "loaded_mib_rebuilt": "826.1", "after_batch_mib_original": "1387.6", "after_batch_mib_rebuilt": "1111.6", "ms_per_step_original": "69.85", "ms_per_step_rebuilt": "68.15", "identical": "True", "chromium": "156.0.8078.4"}, {"pair": "ar-en", "setting": "qdq_off", "loaded_mib_original": "1319.8", "loaded_mib_rebuilt": "1077.9", "after_batch_mib_original": "1385.8", "after_batch_mib_rebuilt": "1157.7", "ms_per_step_original": "61.31", "ms_per_step_rebuilt": "60.01", "identical": "True", "chromium": "156.0.8078.4"}, {"pair": "en-de", "setting": "default", "loaded_mib_original": "722.4", "loaded_mib_rebuilt": "792.0", "after_batch_mib_original": "846.0", "after_batch_mib_rebuilt": "819.0", "ms_per_step_original": "35.79", "ms_per_step_rebuilt": "36.29", "identical": "True", "chromium": "156.0.8078.4"}, {"pair": "en-de", "setting": "qdq_off", "loaded_mib_original": "1182.0", "loaded_mib_rebuilt": "953.4", "after_batch_mib_original": "1272.3", "after_batch_mib_rebuilt": "1007.9", "ms_per_step_original": "25.44", "ms_per_step_rebuilt": "25.8", "identical": "True", "chromium": "156.0.8078.4"}, {"pair": "de-en", "setting": "default", "loaded_mib_original": "724.0", "loaded_mib_rebuilt": "716.9", "after_batch_mib_original": "849.6", "after_batch_mib_rebuilt": "756.2", "ms_per_step_original": "33.69", "ms_per_step_rebuilt": "33.14", "identical": "True", "chromium": "156.0.8078.4"}, {"pair": "de-en", "setting": "qdq_off", "loaded_mib_original": "1254.1", "loaded_mib_rebuilt": "960.1", "after_batch_mib_original": "1264.6", "after_batch_mib_rebuilt": "979.7", "ms_per_step_original": "25.29", "ms_per_step_rebuilt": "26.39", "identical": "True", "chromium": "156.0.8078.4"}, {"pair": "ja-en", "setting": "default", "loaded_mib_original": "738.9", "loaded_mib_rebuilt": "803.0", "after_batch_mib_original": "1261.9", "after_batch_mib_rebuilt": "1357.8", "ms_per_step_original": "68.93", "ms_per_step_rebuilt": "69.28", "identical": "True", "chromium": "156.0.8078.4"}, {"pair": "ja-en", "setting": "qdq_off", "loaded_mib_original": "1288.0", "loaded_mib_rebuilt": "1050.1", "after_batch_mib_original": "1492.5", "after_batch_mib_rebuilt": "1129.1", "ms_per_step_original": "60.29", "ms_per_step_rebuilt": "60.1", "identical": "True", "chromium": "156.0.8078.4"}]}; | |
| const NS = "http://www.w3.org/2000/svg"; | |
| const $ = (id) => document.getElementById(id); | |
| const OSES = Object.keys(D.os); | |
| const state = { os: OSES[0], setting: "qdq_off", sort: "saved", metric: "load" }; | |
| const UNIT = { load: "MiB", peak: "MiB", ms: "ms" }; | |
| const SET = { qdq_off: "disable_quant_qdq = 1", default: "ONNX Runtime defaults" }; | |
| function el(tag, attrs, parent, text) { | |
| const n = document.createElementNS(NS, tag); | |
| for (const k in attrs) n.setAttribute(k, attrs[k]); | |
| if (text !== undefined) n.textContent = text; | |
| if (parent) parent.appendChild(n); | |
| return n; | |
| } | |
| const median = (xs) => { const s = [...xs].sort((a, b) => a - b), m = s.length >> 1; | |
| return s.length % 2 ? s[m] : (s[m - 1] + s[m]) / 2; }; | |
| const fmt = (x, d = 0) => x.toLocaleString("en-US", { maximumFractionDigits: d, minimumFractionDigits: d }); | |
| const pct = (a, b) => (100 * (b - a) / a); | |
| const tip = $("tip"); | |
| function showTip(ev, title, rows) { | |
| tip.replaceChildren(); | |
| const h = document.createElement("div"); h.textContent = title; h.style.marginBottom = "4px"; tip.appendChild(h); | |
| for (const [color, label, value] of rows) { | |
| const r = document.createElement("div"); | |
| if (color) { const k = document.createElement("span"); k.className = "k"; k.style.background = color; r.appendChild(k); } | |
| const v = document.createElement("span"); v.className = "v"; v.textContent = value; r.appendChild(v); | |
| r.appendChild(document.createTextNode(" " + label)); tip.appendChild(r); | |
| } | |
| tip.style.display = "block"; | |
| const box = ev.currentTarget.getBoundingClientRect ? ev.currentTarget.getBoundingClientRect() : null; | |
| const x = ev.clientX ?? (box.left + box.width / 2), y = ev.clientY ?? box.top; | |
| tip.style.left = Math.min(x + 14, innerWidth - tip.offsetWidth - 8) + "px"; | |
| tip.style.top = Math.max(8, y - tip.offsetHeight - 10) + "px"; | |
| } | |
| const hideTip = () => { tip.style.display = "none"; }; | |
| // Dumbbell rows: [{label, a (original), b (ours), title, extra}] | |
| function dumbbell(svg, rows, unit, digits) { | |
| svg.replaceChildren(); | |
| const W = 840, left = 64, right = 72, rowH = 22, top = 8, axisH = 28; | |
| const H = top + rows.length * rowH + axisH; | |
| svg.setAttribute("viewBox", `0 0 ${W} ${H}`); | |
| const max = Math.max(...rows.map((r) => Math.max(r.a, r.b))) * 1.05; | |
| const step = max > 400 ? 100 : max > 100 ? 50 : max > 40 ? 10 : 5; | |
| const X = (v) => left + (W - left - right) * v / max; | |
| for (let t = 0; t <= max; t += step) { | |
| el("line", { x1: X(t), x2: X(t), y1: top, y2: H - axisH + 4, stroke: "var(--line)", "stroke-width": 1 }, svg); | |
| el("text", { x: X(t), y: H - 8, "text-anchor": "middle" }, svg, fmt(t)); | |
| } | |
| const css = getComputedStyle(document.documentElement); | |
| const cO = css.getPropertyValue("--original").trim(), cU = css.getPropertyValue("--ours").trim(); | |
| rows.forEach((r, i) => { | |
| const y = top + i * rowH + rowH / 2; | |
| const g = el("g", { class: "row", tabindex: 0, role: "listitem", | |
| "aria-label": `${r.label}: original ${fmt(r.a, digits)} ${unit}, ${D.name} ${fmt(r.b, digits)} ${unit}` }, svg); | |
| el("rect", { class: "band", x: 0, y: y - rowH / 2, width: W, height: rowH, fill: "transparent" }, g); | |
| el("text", { class: "label", x: left - 10, y: y + 4, "text-anchor": "end" }, g, r.label); | |
| el("line", { x1: X(r.a), x2: X(r.b), y1: y, y2: y, stroke: "var(--line)", "stroke-width": 3, "stroke-linecap": "round" }, g); | |
| el("circle", { cx: X(r.a), cy: y, r: 5, fill: "var(--original)", stroke: "var(--card)", "stroke-width": 2 }, g); | |
| el("circle", { cx: X(r.b), cy: y, r: 5, fill: "var(--ours)", stroke: "var(--card)", "stroke-width": 2 }, g); | |
| el("text", { x: X(Math.max(r.a, r.b)) + 10, y: y + 4 }, g, `${pct(r.a, r.b) > 0 ? "+" : ""}${fmt(pct(r.a, r.b))} %`); | |
| const show = (ev) => showTip(ev, r.title, [[cO, "original", `${fmt(r.a, digits)} ${unit}`], | |
| [cU, D.name, `${fmt(r.b, digits)} ${unit}`], [null, "change", `${fmt(r.b - r.a, digits)} ${unit} (${fmt(pct(r.a, r.b))} %)`], | |
| ...(r.extra || [])]); | |
| g.addEventListener("pointermove", show); g.addEventListener("focus", show); | |
| g.addEventListener("pointerleave", hideTip); g.addEventListener("blur", hideTip); | |
| }); | |
| } | |
| function render() { | |
| const O = D.os[state.os]; | |
| const s = state.setting, a = "v1-" + s, b = "v2-" + s; | |
| const P = O.pairs.map((p) => ({ ...p, a: p[a], b: p[b], saved: p[a] - p[b] })); | |
| const sorters = { saved: (x, y) => y.saved - x.saved, pair: (x, y) => x.pair.localeCompare(y.pair), | |
| orig: (x, y) => y.a - x.a }; | |
| P.sort(sorters[state.sort]); | |
| // tiles | |
| const ms = (c) => median([...new Set(O.reference.map((r) => r.pair))].map((p) => | |
| O.reference.find((r) => r.pair === p && r.config === c).ms)); | |
| const tiles = [[fmt(ms("v1-default") / ms("v2-qdq_off"), 1) + "×", "faster: fast mode vs defaults"], | |
| [fmt(median(P.map((p) => p.a))) + " MiB", "original, median"], | |
| [fmt(median(P.map((p) => p.b))) + " MiB", D.name + ", median"], | |
| [fmt(median(P.map((p) => -pct(p.a, p.b)))) + " %", "less memory, median"]]; | |
| $("tiles").replaceChildren(...tiles.map(([v, l]) => { const d = document.createElement("div"); d.className = "tile"; | |
| const bb = document.createElement("b"); bb.textContent = v; const sp = document.createElement("span"); sp.textContent = l; | |
| d.append(bb, sp); return d; })); | |
| $("allTitle").textContent = `All ${P.length} pairs · ${state.os} · ${SET[s]}`; | |
| dumbbell($("all"), P.map((p) => ({ label: p.pair, a: p.a, b: p.b, title: `${p.pair} · ${p.repo}`, | |
| extra: [[null, "", p.identical ? "identical tokens" : "tokens differ"]] })), "MiB", 0); | |
| // table | |
| const t = $("allTable"); t.replaceChildren(); | |
| const hr = t.insertRow(); for (const h of ["Pair", "Original (MiB)", D.name + " (MiB)", "Change"]) { | |
| const th = document.createElement("th"); th.textContent = h; hr.appendChild(th); } | |
| for (const p of P) { const r = t.insertRow(); | |
| for (const v of [p.pair, fmt(p.a), fmt(p.b), fmt(pct(p.a, p.b)) + " %"]) r.insertCell().textContent = v; } | |
| // reference | |
| const m = state.metric, R = (pair, c) => O.reference.find((r) => r.pair === pair && r.config === c)[m]; | |
| const pairs = [...new Set(O.reference.map((r) => r.pair))]; | |
| dumbbell($("ref"), pairs.map((p) => ({ label: p, a: R(p, a), b: R(p, b), title: `${p} · ${SET[s]}` })), | |
| UNIT[m], m === "ms" ? 1 : 0); | |
| $("foot").textContent = `${state.os}: ${O.cpu}, ${O.platform}, ONNX Runtime ${O.ort} (CPU, ${O.threads} threads). ` + | |
| "Memory: resident set (Windows: working set) added by loading the encoder and decoder sessions. " + | |
| "Reference pairs: 20-line batch, greedy, median of 5 runs."; | |
| } | |
| function seg(id, key) { | |
| $(id).addEventListener("click", (e) => { | |
| const btn = e.target.closest("button"); if (!btn) return; | |
| state[key] = btn.dataset.v; | |
| for (const x of $(id).querySelectorAll("button")) x.setAttribute("aria-pressed", x === btn ? "true" : "false"); | |
| render(); | |
| }); | |
| } | |
| $("name").textContent = D.name; | |
| $("tagline").textContent = D.tagline; | |
| for (const n of document.querySelectorAll(".nm")) n.textContent = D.name; | |
| for (const [label, href] of [["Models on Hugging Face", `https://huggingface.co/${D.namespace}`], | |
| ["Method and code", `https://github.com/${D.github}`], ["Technical report", `https://github.com/${D.github}/blob/main/REPORT.md`]]) { | |
| const a = document.createElement("a"); a.href = href; a.target = "_blank"; a.rel = "noopener"; a.textContent = label; $("links").appendChild(a); } | |
| for (const o of OSES) { const btn = document.createElement("button"); btn.dataset.v = o; btn.textContent = o; | |
| btn.setAttribute("aria-pressed", o === state.os ? "true" : "false"); $("os").appendChild(btn); } | |
| seg("os", "os"); seg("setting", "setting"); seg("metric", "metric"); | |
| $("sort").addEventListener("change", (e) => { state.sort = e.target.value; render(); }); | |
| matchMedia("(prefers-color-scheme: dark)").addEventListener("change", render); | |
| // FLORES-200 and browser tables (static data) | |
| function table(el, head, rows) { | |
| el.replaceChildren(); | |
| const hr = el.insertRow(); | |
| for (const h of head) { const th = document.createElement("th"); th.textContent = h; hr.appendChild(th); } | |
| for (const r of rows) { const tr = el.insertRow(); for (const c of r) tr.insertCell().textContent = c; } | |
| } | |
| if (D.flores.length) { | |
| const ok = D.flores.filter((r) => r.identical_sentences === r.sentences).length; | |
| $("floresLine").textContent = `FLORES-200 devtest, ${D.flores[0].sentences} sentences per pair, every pair, both ` + | |
| `session settings: identical output in ${ok} of ${D.flores.length} runs, so BLEU and chrF are identical too.`; | |
| table($("floresTable"), ["Pair", "BLEU", "chrF", "Identical sentences"], | |
| D.flores.filter((r) => r.setting === "qdq_off").map((r) => [r.pair, | |
| r.bleu_original === r.bleu_rebuilt ? r.bleu_original : `${r.bleu_original} / ${r.bleu_rebuilt}`, | |
| r.chrf_original === r.chrf_rebuilt ? r.chrf_original : `${r.chrf_original} / ${r.chrf_rebuilt}`, | |
| `${r.identical_sentences} / ${r.sentences}`])); | |
| } | |
| if (D.browser.length) { | |
| table($("browserTable"), ["Pair", "Settings", "Memory (MiB)", "ms/step", "Same tokens"], | |
| D.browser.map((r) => [r.pair, SET[r.setting], | |
| `${fmt(+r.loaded_mib_original)} → ${fmt(+r.loaded_mib_rebuilt)}`, | |
| `${fmt(+r.ms_per_step_original, 1)} → ${fmt(+r.ms_per_step_rebuilt, 1)}`, r.identical === "True" ? "yes" : "no"])); | |
| } | |
| // live demo: transformers.js is loaded only when the button is pressed | |
| const TJS = "https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.8.1"; | |
| const loadedModels = {}; | |
| for (const d of D.demo) { const o = document.createElement("option"); o.value = d.repo; o.textContent = d.pair; | |
| $("demoPair").appendChild(o); } | |
| const sample = () => D.demo.find((d) => d.repo === $("demoPair").value).text; | |
| $("demoText").value = sample(); | |
| $("demoPair").addEventListener("change", () => { $("demoText").value = sample(); $("demoOut").textContent = ""; }); | |
| $("demoGo").addEventListener("click", async () => { | |
| const repo = $("demoPair").value, btn = $("demoGo"), status = $("demoStatus"); | |
| btn.disabled = true; | |
| try { | |
| if (!loadedModels[repo]) { | |
| status.textContent = "Loading the model…"; | |
| const t = performance.now(); | |
| const { pipeline } = await import(TJS); | |
| loadedModels[repo] = await pipeline("translation", repo, | |
| { dtype: "q8", session_options: { extra: { session: { disable_quant_qdq: "1" } } } }); | |
| status.textContent = `Loaded in ${fmt((performance.now() - t) / 1000, 1)} s. Translating…`; | |
| } | |
| const t = performance.now(); | |
| const [out] = await loadedModels[repo]($("demoText").value); | |
| $("demoOut").textContent = out.translation_text; | |
| status.textContent = `Translated in ${fmt(performance.now() - t)} ms on this device.`; | |
| } catch (e) { | |
| status.textContent = "Could not run here: " + (e && e.message ? e.message : e); | |
| } finally { btn.disabled = false; } | |
| }); | |
| render(); | |
| </script> | |
| </body> | |
| </html> | |