Questions tagged [fairseq]
40 questions
1
vote
1 answer
Running Fairseq in memory and pre-load language models
I'm running Fairseq in the command line. Fairseq loads language models on the fly and do the translation. It works fine but it takes time to load the models and do the translation. I'm thinking, if we run the Fairseq as an in-memory service and…

Chandana
- 199
- 7
1
vote
1 answer
how to get alignment or attention information for translations produced by a torch hub model?
The torch hub provides pretrained models, such as: https://pytorch.org/hub/pytorch_fairseq_translation/
These models can be used in python, or interactively with a CLI.
With the CLI it is possible to get alignments, with the --print-alignment flag.…

lhk
- 27,458
- 30
- 122
- 201
0
votes
0 answers
KeyError: 'mnli' error when using roberta model from meta hub
I tried to use the roberta model from the torch hub, as:
import torch
roberta = torch.hub.load('pytorch/fairseq', 'roberta.large')
tokens = roberta.encode('Roberta is a heavily optimized version of BERT.', 'Roberta is not very…

Afshin Oroojlooy
- 1,326
- 3
- 21
- 43
0
votes
0 answers
fairseq installation requiring to install pyproject.toml-based projects
I'm trying to install fairseq, but this error keeps occurring.
ERROR: Could not build wheels for fairseq
which is required to install pyproject.toml-based projects
my environment:
Macbook Air 13' zsh M1 chip
Visual studio code 2
I tried these…

keigoo
- 1
- 1
0
votes
2 answers
Getting a fairseq error: ModuleNotFoundError: No module named 'fairseq.data.masked_lm_dictionary
I'm trying to implement MASS on Fairseq for Neural Machine Translation. Following the approach here https://github.com/microsoft/MASS/tree/master/MASS-supNMT, I'm trying to preprocess both the monolingual and bilingual data. I didn't get any errors…

kartikeya saraswat
- 23
- 5
0
votes
0 answers
Empty value for state['args'] when I load model with BARTmodel.from_pretained()
First I train the model with code:
module load libffi
source $HOME/env38/bin/activate
TOTAL_NUM_UPDATES=20000
WARMUP_UPDATES=500 …
0
votes
0 answers
How to use FConvEncoder as word embedding in fairseq?
I want to use pretrained GLoVe in FConvEncoder and then by using something like FConvEncoder.encoder(sentence) (e.g. sentence = "This is a good sentence") turn my sentence into an 2D array with a fixed-length embedding dimension. something like (1,…

Arash Mohamadpour
- 13
- 4
0
votes
1 answer
Can not install fairseq==v0.10.2 in pycharm
I'm a newer in python. My teacher said me to run this code: https://github.com/shirley-wu/text_to_table. But I can't run it in Pycharm, when I install package it install successfully some package except fairseq==v0.10.2. And show error:
Collecting…

dop
- 23
- 8
0
votes
0 answers
Errors encountered during installation of fairseq
I have tried various methods to install fairseq, but still reported an error in the Windows system. I hope someone can answer this question
`
Building wheel for fairseq (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel…

ShelbyChant
- 1
- 1
0
votes
1 answer
Fail to build fairseq editable
I followed the steps on the website https://github.com/facebookresearch/fairseq to build the fairseq. When I tried to execute pip install --editable ./, I met the following error:
Obtaining file:///data_new/private/liuyadi/myenv/fairseq
Checking…

yadi liu
- 1
0
votes
1 answer
Fairseq without dictionary
I used a Hugging face tokenizer and encoder and preprocessed the data, and now I want to use Fairseq's transformer model for the translation task, but I don't have a dict.txt. What should I do, please
Can only give input and output data fit, or how…

rgy k
- 1
0
votes
1 answer
Facing CUDA Error while training MNMT model using fairseq
I was trying to use fairseq to train a model for English-Russian,English-French,English-Spanish,English-German data but have been getting a CUDA Error which prevents me from running the model.
I have tried using multiple batch sizes,learning rate…

Wonderweiss
- 21
- 1
0
votes
1 answer
ljspeech Hugging Face examples not working
When trying to run the ljspeech example, I get the following error, even when the model is moved to the only GPU in the system. I am using Cuda 11.7, Pytorch 1.13.1, and Fairseq 0.12.2.
RuntimeError: Expected all tensors to be on the same device,…

carlos
- 45
- 3
- 7
0
votes
1 answer
Fairseq-generate giving me the error: 'RuntimeError: Mask Type should be defined' on Colab
Some background:
I'm working on a translation problem where I am able to get through the fairseq-preprocess and fairseq-train but during the process of fairseq-generate, the operation fails in the middle.
I have not found any mention of this error…

pranavnairtech
- 105
- 10
0
votes
2 answers
No CUDA runtime is found when I was installing fairseq
GPU:GTX 1650
CUDA:11.7
torch.cuda.is_available() return True
I am trying install fairseq after cloning, but it came some problems.
when F:\research\fairseq>pip install --editable ./
it showed that
error: subprocess-exited-with-error
× Getting…

林御姐
- 1