ParaCrawl/para_crawl
Updated • 269 • 12
How to use inseq/wmt20-mlqe-en-de with Transformers:
# Use a pipeline as a high-level helper
# Warning: Pipeline type "translation" is no longer supported in transformers v5.
# You must load the model directly (see below) or downgrade to v4.x with:
# 'pip install "transformers<5.0.0'
from transformers import pipeline
pipe = pipeline("translation", model="inseq/wmt20-mlqe-en-de") # Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("inseq/wmt20-mlqe-en-de")
model = AutoModelForSeq2SeqLM.from_pretrained("inseq/wmt20-mlqe-en-de")This repository contains the English-German model trained with the fairseq toolkit that was used to produce translations used in the WMT20 shared task on quality estimation (QE) on the MLQE dataset.
The checkpoint was converted from the original fairseq checkpoint available here using the convert_fsmt_original_pytorch_checkpoint_to_pytorch.py script from the 🤗 Transformers library (v4.26.0).
Please refer to the repositories linked above for additional information on usage, parameters and training data.