brunch

You can make anything
by writing

C.S.Lewis

by 무명 Jun 26. 2020

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

cpu, gpu, worker

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


매거진의 이전글 [데이터/스터디] 하용호 님 온라인 강의 #3
작품 선택
키워드 선택 0 / 3 0
댓글여부
afliean
브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari