From afe6ff68b2c9fdbf5970d7906dc52389bfafbe83 Mon Sep 17 00:00:00 2001 From: Frederik <147479464+frederik-uni@users.noreply.github.com> Date: Thu, 17 Jul 2025 21:14:24 +0200 Subject: [PATCH] fix instructions for fairseq fairseq does not work with python versions above 3.10. the pip install doesnt work. it installs torch 2, but needs torch 1. same for numpy --- docs/guides/fairseq.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/guides/fairseq.md b/docs/guides/fairseq.md index 9348c413f..0254348a4 100644 --- a/docs/guides/fairseq.md +++ b/docs/guides/fairseq.md @@ -11,7 +11,13 @@ CTranslate2 supports some Transformer models trained with [Fairseq](https://gith The conversion minimally requires the PyTorch model path and the Fairseq data directory which contains the vocabulary files: ```bash -pip install fairseq +python3.10 -m venv venv +source venv/bin/activate +pip install --force pip==24.0 +pip install git+https://github.com/pytorch/fairseq +pip uninstall torch torchaudio numpy +pip install torch==1.13 numpy==1.26 ctranslate2 + ct2-fairseq-converter --model_path model.pt --data_dir data-bin/ --output_dir ct2_model ```