SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.11853 · EMNLP · 2024

PyMarian: Fast Neural Machine Translation and Evaluation in Python

Matt Post, Thamme Gowda, Marcin Junczys-Dowmunt, Roman Grundkiewicz, Elijah Rippeth, Microsoft Translator

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 6 functions out of this paper's own repositories and ran 6 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
OpenNMT/CTranslate2 canonical 5 of 5
pascanur/GroundHog canonical 1 of 1
FunctionStatusWhere it lives
get_vocabs Ran OpenNMT/CTranslate2/python/ctranslate2/converters/eole_ct2.py
code served (permissive licence) · get_code("57d2b237f2f6c212")
get_vocabs Ran OpenNMT/CTranslate2/python/ctranslate2/converters/opennmt_py.py
code served (permissive licence) · get_code("794ef6f28819556a")
index_spec Ran OpenNMT/CTranslate2/python/ctranslate2/specs/model_spec.py
code served (permissive licence) · get_code("de4708f955404e2c")
load_vocab Ran OpenNMT/CTranslate2/python/ctranslate2/converters/marian.py
code served (permissive licence) · get_code("241f78b9e78ef2ea")
print_time Ran pascanur/GroundHog/groundhog/utils/utils.py
code served (permissive licence) · get_code("11b161ee05f4007c")
register_loader Ran OpenNMT/CTranslate2/python/ctranslate2/converters/transformers.py
code served (permissive licence) · get_code("dbf102ede3867ea9")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The deep learning language of choice these days is Python; measured by factors such as available libraries and technical support, it is hard to beat. At the same time, software written in lower-level programming languages like C++ retain advantages in speed. We describe a Python interface to Marian NMT, a C++-based training and inference toolkit for sequence-tosequence models, focusing on machine translation. This interface enables models trained with Marian to be connected to the rich, wide range of tools available in Python. A highlight of the interface is the ability to compute state-of-theart MT evaluation metrics, such as COMET and BLEURT, from Python but using Marian's inference engine, with a speedup factor of up to 7.8× the existing implementations. We also briefly spotlight a number of other integrations, including Jupyter notebooks, connection with prebuilt models, and a web app interface provided with the package. PyMarian is available in PyPI via pip install pymarian.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2408.11853")
get_code_for_paper("2408.11853")
have("2408.11853")

Connect an agent — have() is free.