brunch

[BERT/서빙서버] bert-as-service 팁들

cpu, gpu, worker

by 무명

- https://bert-as-service.readthedocs.io/en/latest/section/faq.html#how-can-i-choose-num-worker

1. num _worker 숫자

일반적으로 GPU/CPU숫자와 작거나 같아야 함.

그렇지 않으면 여러 워커들이 하나의 GPU/CPU에 할당되고 메모리 문제가 일어날 수 있음.


2. CPU머신에서 구동

-cpu 옵션, -max_batch_size 16 권장.

max_batch_size 작게 해라 16 or 32


keyword
매거진의 이전글[데이터/스터디] 하용호 님 온라인 강의 #3