Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

Need help to release a pre-trained model from a GPU server #521

Open
hoangyenan opened this issue Feb 15, 2018 · 8 comments
Open

Need help to release a pre-trained model from a GPU server #521

hoangyenan opened this issue Feb 15, 2018 · 8 comments

Comments

@hoangyenan
Copy link

Hi everyone,

I'm a newbie here and looking for your help.
I have a public pre-trained model from a GPU server (download here https://drive.google.com/drive/folders/0BzY0S4QyX701OFJfbkZ3NmhTb1E). I want to use this model to translate some texts. However, I have no GPU server, and according to the instruction here (http://opennmt.net/OpenNMT/translation/inference/), this model needs to be released on a GPU server so that the released model can be used for inference on a CPU server.
Can anyone help me? I would deeply appreciate it.

Bests,
An Vo

@shahbazsyed
Copy link
Contributor

@hoangyenan
Copy link
Author

Thanks a lot, shahbazsyed .
However, when I run the released model to translate, I got the below error, even the option "-fallback_to_cpu true" does not work. Do you have any idea?

[icuser@xxx OpenNMT-Torch]$ th translate.lua -model model_en_vi_epoch19_9.12_release.t7 -src train_snli.txt_textSingles -output train_snli.txt_textSingles_VN
[02/15/18 10:31:57 INFO] Loading 'model_en_vi_epoch19_9.12_release.t7'...
/home/icuser/torch/install/bin/luajit: /home/icuser/torch/install/share/lua/5.1/torch/File.lua:343: unknown Torch class <torch.CudaTensor>
stack traceback:
[C]: in function 'error'
/home/icuser/torch/install/share/lua/5.1/torch/File.lua:343: in function 'readObject'
/home/icuser/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/home/icuser/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/home/icuser/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/home/icuser/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/home/icuser/torch/install/share/lua/5.1/torch/File.lua:409: in function 'load'
./onmt/translate/Translator.lua:200: in function '__init'
/home/icuser/torch/install/share/lua/5.1/torch/init.lua:91: in function 'new'
translate.lua:80: in function 'main'
translate.lua:365: in main chunk
[C]: in function 'dofile'
...user/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x004064f0

@shahbazsyed
Copy link
Contributor

@an-fbk Can you share your files ? I can try to reproduce the same error

@hoangyenan
Copy link
Author

@shahbazsyed sure, you can download my source-language file at https://drive.google.com/file/d/1-jT18jgyEHutuXfV93QrWDKE4UKSJ6pH/view?usp=sharing

@hoangyenan
Copy link
Author

@shahbazsyed Hi, do you have any findings regarding the error I posted before?

@shahbazsyed
Copy link
Contributor

Hi,
I also got the same error when loading it on my system. Can you tell me the source of this model ? What version of OpenNMT was used for training this for example?

@hoangyenan
Copy link
Author

@shahbazsyed the source of model is from here (https://gist.github.com/tuan3w/e18d7b4587ed374610bfbaea17bb3f07)
Btw, did you get any error while releasing the model?

@shahbazsyed
Copy link
Contributor

No there was no error when I released it. I couldn't have shared it otherwise.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants