Download index.html from OptimaMT/README: direct link, hf CLI and curl.
- Browser
- Download file 3.06 kB
-
https://huggingface.co/spaces/OptimaMT/README/resolve/main/index.html
- Command line
-
hf download hf://spaces/OptimaMT/README/index.html
-
curl -L -o index.html https://huggingface.co/spaces/OptimaMT/README/resolve/main/index.html
3.06 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>OptimaMT</title> | |
| <style> | |
| .omt { line-height: 1.6; } | |
| .omt a { color: #3b82f6; text-decoration: none; } | |
| .omt a:hover { text-decoration: underline; } | |
| .omt img { max-width: 100%; border-radius: 10px; margin: 8px 0; } | |
| .omt table { border-collapse: collapse; width: 100%; margin: 12px 0; } | |
| .omt th, .omt td { padding: 8px 10px; border-bottom: 1px solid rgba(127, 127, 127, 0.3); text-align: left; } | |
| .omt td + td, .omt th + th { text-align: right; white-space: nowrap; } | |
| .omt h3 { font-size: 1.1em; font-weight: 600; margin: 18px 0 6px; } | |
| .omt pre { background: rgba(127, 127, 127, 0.12); color: inherit; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 13px; } | |
| .omt .links a { margin-right: 18px; white-space: nowrap; } | |
| </style> | |
| </head> | |
| <body> | |
| <main class="omt"> | |
| <p><strong>Lighter OPUS-MT translation models that run locally</strong>, in ONNX Runtime or in the browser with | |
| transformers.js. 51 translation directions, the same translations, and about half the memory in fast mode.</p> | |
| <p class="links"> | |
| <a href="https://huggingface.co/collections/OptimaMT/optimamt-lighter-opus-mt-onnx-models-6af228dc9cd91f015e56e869" target="_blank" rel="noopener">All 51 models</a> | |
| <a href="https://huggingface.co/spaces/OptimaMT/results" target="_blank" rel="noopener">Interactive results and live demo</a> | |
| <a href="https://github.com/AmerAlreyahi/OptimaMT" target="_blank" rel="noopener">Method and code</a> | |
| <a href="https://github.com/AmerAlreyahi/OptimaMT/blob/main/REPORT.md" target="_blank" rel="noopener">Technical report</a> | |
| </p> | |
| <img src="https://huggingface.co/spaces/OptimaMT/README/resolve/main/tradeoff.png" alt="Memory against speed, original and OptimaMT, on Linux and Windows"> | |
| <table> | |
| <tr><th>Memory after load (median; Linux 51 pairs, Windows 49)</th><th>Linux</th><th>Windows</th></tr> | |
| <tr><td>Fast mode (<code>disable_quant_qdq = 1</code>)</td><td>525 → 281 MiB (-46 %)</td><td>500 → 257 MiB (-49 %)</td></tr> | |
| <tr><td>ONNX Runtime defaults</td><td>277 → 217 MiB (-22 %)</td><td>196 → 166 MiB (-16 %)</td></tr> | |
| </table> | |
| <p>Identical output on FLORES-200 devtest for every pair, so identical BLEU and chrF.</p> | |
| <h3>Quick start</h3> | |
| <pre><code>import { pipeline } from "@huggingface/transformers"; | |
| const translator = await pipeline("translation", "OptimaMT/en-ar", { | |
| dtype: "q8", | |
| session_options: { extra: { session: { disable_quant_qdq: "1" } } }, // fast mode | |
| }); | |
| console.log((await translator("The lighthouse stands on the coast."))[0].translation_text);</code></pre> | |
| <p><strong>Used in production:</strong> <a href="https://github.com/AmerAlreyahi/OpenCircle" target="_blank" rel="noopener">OpenCircle</a>, a desktop screen translator for Windows and Linux, ships these models since v0.1.4.</p> | |
| <p><small>Models: CC BY 4.0 (OPUS-MT by the University of Helsinki; ONNX exports by Xenova, modified). Code: MIT.</small></p> | |
| </main> | |
| </body> | |
| </html> | |