
GEMBA
CLI微软翻译团队出品的译文质量评估工具:用 GPT 按 MQM 错误体系(或直接打分)逐句给译文评分,加 --list_mqm_errors 可列出错误类型与严重程度,适合批量抽检译文。原文与译文需整理成行数一致的两个文本文件,需要 Python 与 OpenAI 或 Azure OpenAI 的 API Key(按量付费);评分仅供参考,仍需译员复核。
GEMBA-MQM and GEMBA-DA
Setup
Install the package (Python >= 3.8):
pip install .
For editable installs during development:
pip install -e .
Set up secrets either for Azure API or OpenAI API:
export OPENAI_AZURE_ENDPOINT=
export OPENAI_AZURE_KEY=
or
export OPENAI_API_KEY=
Scoring with GEMBA
It assumes two files with the same number of lines. It prints the score for each line pair:
gemba --source=source.txt --hypothesis=hypothesis.txt --source_lang=English --target_lang=Czech --method="GEMBA-MQM" --model="gpt-4"
# or
python -m gemba --source=source.txt --hypothesis=hypothesis.txt --source_lang=English --target_lang=Czech --method="GEMBA-MQM" --model="gpt-4"
The main recommended methods: GEMBA-MQM and GEMBA-DA with the model gpt-4.
Collecting and evaluating experiments for GEMBA-DA
Get mt-metric-eval and download resources:
git clone https://github.com/google-research/mt-metrics-eval.git
cd mt-metrics-eval
pip install .
alias mtme='python3 -m mt_metrics_eval.mtme'
mtme --download
cd ..
mv ~/.mt-metrics-eval/mt-metrics-eval-v2 mt-metrics-eval-v2
Collect data and run the scorer
python gemba_da.py
export PYTHONPATH=mt-metrics-eval:$PYTHONPATH
python evaluate.py
License
GEMBA code and data are released under the CC BY-SA 4.0 license.
Paper
You can read more about GEMBA-DA in our arXiv paper or GEMBA-MQM in our arXiv paper.
How to Cite
GEMBA-MQM
@inproceedings{kocmi-federmann-2023-gemba-mqm,
title = {GEMBA-MQM: Detecting Translation Quality Error Spans with GPT-4},
author = {Kocmi, Tom and Federmann, Christian},
booktitle = "Proceedings of the Eighth Conference on Machine Translation",
month = dec,
year = "2023",
address = "Singapore",
publisher = "Association for Computational Linguistics",
}
GEMBA-DA
@inproceedings{kocmi-federmann-2023-large,
title = "Large Language Models Are State-of-the-Art Evaluators of Translation Quality",
author = "Kocmi, Tom and Federmann, Christian",
booktitle = "Proceedings of the 24th Annual Conference of the European Association for Machine Translation",
month = jun,
year = "2023",
address = "Tampere, Finland",
publisher = "European Association for Machine Translation",
url = "https://aclanthology.org/2023.eamt-1.19",
pages = "193--203",
}
相关资源

sacreBLEU
CLI机器翻译评测的标准工具:命令行计算 BLEU、chrF、TER 分数并做显著性检验,可自动下载 WMT 等公开测试集,便于比较不同翻译引擎或提示词的译文质量。需要 Python 3.9+ 与参考译文;自动指标只能粗筛,定稿仍需人工审校。
mjpost/sacrebleu1.3k
COMET
CLIUnbabel 出品的机器翻译质量评估工具:comet-score 命令给译文逐句和整体打分,XCOMET 模型能标出错误片段及严重程度,CometKiwi 没有参考译文也能评估,适合译者和本地化团队抽检机翻稿。需 Python 3.8+;模型首次使用时从 Hugging Face 下载、体积较大,部分模型要登录并同意许可,有 GPU 会快很多。
Unbabel/COMET783
ChatGPT Subtitle Translator
CLI用 OpenAI 兼容接口分批翻译 SRT 字幕或纯文本,去掉时间码等冗余以节省 token,保证译文与原文逐行对应,可断点续译。需 Node.js 20+ 并从源码安装,准备 OpenAI API Key,或连接本地 Ollama。
Cerlancism/chatgpt-subtitle-translator390
ms-swift
CLI魔搭社区官方的大模型与多模态模型训练框架,swift 命令覆盖预训练、微调、强化学习、推理、评测、量化与部署,支持 600 多种文本模型与 400 多种多模态模型及 Megatron 并行训练,另有 Web UI。训练通常需要 GPU。
modelscope/ms-swift15.9k
OpenCompass
CLI开源的大模型评测平台,opencompass 命令一行指定模型与数据集即可跑评测,覆盖上百个基准,既能评测本地 Hugging Face 模型也能评测 API 模型,并支持 vLLM、LMDeploy 加速推理。
open-compass/opencompass7.5k
AI Research Skills
Plugin面向 AI 研究的技能插件市场,近百个技能分 23 类,覆盖选题构思、微调与后训练、分布式训练、推理部署、评测到论文写作,由 autoresearch 技能统筹全流程。
Orchestra-Research/AI-Research-SKILLs13.7k