Bert-as-service: "no available GPU thus back-off to CPU". How to support it?

Created on 2 Dec 2018  路  8Comments  路  Source: hanxiao/bert-as-service

"no available GPU thus back-off to CPU". How to support it?

Most helpful comment

i think you are using pretty old master. checkout the latest master and retry.

All 8 comments

no extra config needed. it supports CPU out-of-box

My GPU is in use. I can't make it use the CPU automatically.

i think you are using pretty old master. checkout the latest master and retry.

image
It stays here and can't go on.

ok i will reopen this issue as somebody else also encounter this on cpu-only machine

90 is closed as the reason has been found, maybe you can refer to it?

I found the reason. Because I used "tensorflow-gpu" instead of "tensorflow".
I created a new environment with conda to solve this problem.

if you encounter such problem on a CPU-only machine, please try the latest version 1.5.0 by

pip install -U bert-serving-server bert-serving-client

When start the server side, remember to add a -cpu flag, e.g.

bert-serving-start -model_dir /your/model/path -cpu

For better performance on CPU, please give a smaller max_batch_size, e.g. 16, 32 as suggested in https://github.com/hanxiao/bert-as-service#q-can-i-run-the-server-side-on-cpu-only-machine

Finally, #111 was the PR for fixing this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kapilkd13 picture kapilkd13  路  4Comments

loretoparisi picture loretoparisi  路  6Comments

boxabirds picture boxabirds  路  4Comments

un-lock-me picture un-lock-me  路  3Comments

babai3693 picture babai3693  路  3Comments