Skip to content

Commit

Permalink
fix: skip to create embedder if worker is utilizing vllm
Browse files Browse the repository at this point in the history
Signed-off-by: bjwswang <[email protected]>
  • Loading branch information
bjwswang committed Jan 10, 2024
1 parent 66d1e50 commit ba23106
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,10 @@ func (podWorker *PodWorker) BeforeStart(ctx context.Context) error {

// prepare LLM/Embedder
model := podWorker.Model()
if model.IsEmbeddingModel() {

// If worker is utilizing vllm, then we should not create embedder for it
// vllm doesn't support embedding apis.See https://github.com/vllm-project/vllm/issues/183
if model.IsEmbeddingModel() && podWorker.Worker().Type() != arcadiav1alpha1.WorkerTypeFastchatVLLM {
embedder := &arcadiav1alpha1.Embedder{}
err := podWorker.c.Get(ctx, types.NamespacedName{Namespace: podWorker.Namespace, Name: podWorker.Name}, embedder)
switch ActionOnError(err) {
Expand Down

0 comments on commit ba23106

Please sign in to comment.