Questions tagged [opennmt]
38 questions
1
vote
1 answer
TypeError: __init__() got an unexpected keyword argument 'tensor_type'
I am trying to run a code that was used with older versions of torch and torchtext. I have adjusted a lot in the code to make it work. I was able to pre-process and train my data. Lastly I tried to run the test script, after solving multiple errors,…

U. Iceman
- 121
- 1
- 1
- 7
1
vote
1 answer
SentencePiece in Google Colab
I want to use sentencepiece, from https://github.com/google/sentencepiece in a Google Colab project where I am training an OpenNMT model. I'm a little confused with how to set up the sentencepiece binaries in Google Colab. Do I need to build with…

Jose Chavez
- 115
- 9
1
vote
1 answer
openNMT translate commands yields garbage results
I am running the following command
onmt_translate -model demo-model_step_100000.pt -src data/src-test.txt -output pred.txt -replace_unk -verbose
The results in the file 'pred.txt' is something completely different than the source sentences given…

girishnjha
- 81
- 1
- 3
1
vote
0 answers
app crash when the execution of model.forward on android code ,i don't know why?
When I execute this code precisely at the line which corresponds to module.forward my apps restarts. Code attached below:
@WorkerThread
@Nullable
public IValue translation(String input){
// loading serialized torchscript module from…

informateur 234
- 11
- 1
1
vote
1 answer
How to take multi-GPU support to the OpenNMT-py (pytorch)?
I used python-2.7 version to run the PyTorch with GPU support. I used this command to train the dataset using multi-GPU.
Can someone please tell me how can I fix this error with PyTorch in OpenNMT-py or is there a way to take pytorch support for…

lnash
- 53
- 10
1
vote
2 answers
Getting attention weights in opennmt-py
Specifically in opennmt-py. Now there are many questions on this topic, such as Getting alignment/attention during translation in OpenNMT-py and the following thread on the opennmt forum https://github.com/OpenNMT/OpenNMT-py/issues/575. I use the…

thaumoctopus
- 113
- 1
- 13
1
vote
0 answers
NeuroX, ValueError: badly formed hexadecimal UUID string
Now this is probably a long shot, but I have a question about a certain flask app called NeuroX, https://github.com/fdalvi/NeuroX. It is a flask app for analyzing neural networks. The details are not that important, but you run the app and enter…

thaumoctopus
- 113
- 1
- 13
1
vote
1 answer
Output hidden state in OpenNMT-py
I just have a short question regarding the pytorch version of OpenNMT. There does not seem to be an option to return the hidden state of encoder and decoder in the options. Am I missing a flag or is this not an option in OpenNMT-py?

thaumoctopus
- 113
- 1
- 13
1
vote
1 answer
OpenNMT issues with Pytorch: cPickle.UnpicklingError: invalid load key, ''
I am trying to run the OpenNMT project using the instruction from the link: http://forum.opennmt.net/t/text-summarization-on-gigaword-and-rouge-scoring/85/6
I am using Python 2.7 and installed pytorch from the github repository.
I am trying to run…

Jaffer Wilson
- 7,029
- 10
- 62
- 139
0
votes
0 answers
what is the Error i am getting while training the NMT Model?
When i Try to train my model with the below code:
!onmt-main --model_type Transformer --config train_files/config.yml --auto_config train --with_eval
Error Screen Shot
then facing this error.
TypeError: 'NoneType' object is not…

Syed Mohtesham
- 1
- 1
0
votes
0 answers
how to run translate command in open nmt
I have a folder called sample1 which is residing in OpenNMT-py
folder i have completed first 2 steps that is
Preparing the data - have created vocabulary
Train the data
but as i am translating the data with this command
You can check the…

Anurag Rao
- 107
- 2
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
How can I use custom tokenizer in opennmt transformer
I'm tring to transformer for translation with opennmt-py.
And I already have the tokenizer trained by sentencepiece(unigram).
But I don't know how to use my custom tokenizer in training config yaml.
I'm refering the site of opennmt-docs…

Shanha_Kim
- 31
- 4
0
votes
1 answer
Machine translation transformer output - "unknown" tokens?
When decoding / translating a test dataset after training on the base Transformer model (Vaswani et. al.), I sometimes see this token "unk" in the ouput.
"unk" here refers to an unknown token, but my question is what is the reasoning behind that?…

Dametime
- 581
- 1
- 6
- 23
0
votes
1 answer
ERROR: Could not find a version that satisfies the requirement ctranslate2
I'm learning to use docker and I'm having trouble installing Ctransalte2 inside a docker image. When I run docker build i'm getting the above error. I'm using python:3.8.12 base image which I suspect is the problem. I know Ctranslate2 will only run…

user3447228
- 478
- 1
- 4
- 12