How to use from the
Use from the
Transformers library
# 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="context-mt/scat-mbart50-1toM-target-ctx4-cwd0-en-fr")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("context-mt/scat-mbart50-1toM-target-ctx4-cwd0-en-fr")
model = AutoModelForSeq2SeqLM.from_pretrained("context-mt/scat-mbart50-1toM-target-ctx4-cwd0-en-fr", device_map="auto")
Quick Links

*This model corresponds to the mBART 1-to-50 model further trained on English-to-French translation on the IWSLT17 dataset with context tags using the format:

Input: SOURCE_CTX <brk> SOURCE_CURR
Output: TARGET_CTX <brk> TARGET_CURR

and further fine-tuned on the training split of SCAT+. The model was used in the evaluation of the paper Quantifying the Plausibility of Context Reliance in Neural Machine Translation published at ICLR 2024, also available on Arxiv. It can be used for English to French contextual and non-contextual translation.

Downloads last month
10
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Datasets used to train context-mt/scat-mbart50-1toM-target-ctx4-cwd0-en-fr

Paper for context-mt/scat-mbart50-1toM-target-ctx4-cwd0-en-fr