grammatical / pretraining-bea2019

Models, system configurations and outputs of our winning GEC systems in the BEA 2019 shared task described in R. Grundkiewicz, M. Junczys-Dowmunt, K. Heafield: Neural Grammatical Error Correction Systems with Unsupervised Pre-training on Synthetic Data, BEA 2019.
MIT License
50 stars 8 forks source link

Inference requires GPU #4

Closed borgr closed 3 years ago

borgr commented 4 years ago

Inference on even one sentence (with the example code) fails. I used no GPU, and it seems the code doesn't support CPU inference, suppose it is better to note that if that is an expected behaviour.

[2019-10-22 08:57:51] [data] Loading SentencePiece vocabulary from file /cs/snapless/oabend/borgr/UEDIN2019/systems/model.restricted/vocab.spm [2019-10-22 08:57:51] Error: Curand error 203 - /cs/snapless/oabend/borgr/UEDIN2019/systems/tools/marian-dev/src/tensors/rand.cpp:75: curandCreateGenerator(&generator_, CURAND_RNG_PSEUDODEFAULT) [2019-10-22 08:57:51] Error: Curand error 203 - /cs/snapless/oabend/borgr/UEDIN2019/systems/tools/marian-dev/src/tensors/rand.cpp:75: curandCreateGenerator(&generator, CURAND_RNG_PSEUDO_DEFAULT) [2019-10-22 08:57:51] Error: Aborted from marian::CurandRandomGenerator::CurandRandomGenerator(size_t, marian::DeviceId) in /cs/snapless/oabend/borgr/UEDIN2019/systems/tools/marian-dev/src/tensors/rand.cpp:75 Aborted from marian::CurandRandomGenerator::CurandRandomGenerator(size_t, marian::DeviceId) in /cs/snapless/oabend/borgr/UEDIN2019/systems/tools/marian-dev/src/tensors/rand.cpp:75

snukky commented 3 years ago

Thanks for noting this! Marian works on CPU too, it needs to be compiled with make -DCOMPILE_CPU=on and then --cpu-threads needs to be added to the marian-decoder options.