Browse Source

num parallel embed

Roy Han 9 tháng trước cách đây
mục cha
commit
2647a0e443
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      server/sched.go

+ 2 - 0
server/sched.go

@@ -132,6 +132,8 @@ func (s *Scheduler) processPending(ctx context.Context) {
 			if len(pending.model.ProjectorPaths) > 0 && numParallel != 1 {
 				numParallel = 1
 				slog.Warn("multimodal models don't support parallel requests yet")
+			} else if strings.Contains(pending.model.Config.ModelFamily, "bert") {
+				numParallel = runtime.NumCPU()
 			}
 
 			for {