Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vLLMEmbeddings #920

Merged
merged 2 commits into from
Aug 22, 2024
Merged

Add vLLMEmbeddings #920

merged 2 commits into from
Aug 22, 2024

Conversation

plaguss
Copy link
Contributor

@plaguss plaguss commented Aug 21, 2024

Description

Adds a new embeddings provider:

from distilabel.embeddings import vLLMEmbeddings

embeddings = vLLMEmbeddings(model="intfloat/e5-mistral-7b-instruct")

embeddings.load()

results = embeddings.encode(inputs=["distilabel is awesome!", "and Argilla!"])
# [
#   [-0.05447685346007347, -0.01623094454407692, ...],
#   [4.4889533455716446e-05, 0.044016145169734955, ...],
# ]

Tested on the cluster and works nicely outside of a Pipeline, on a Pipeline with ray fails, not sure if that's due to ray or the CudaDevicePlacement. Still need to investigate that, but this should be ready

@plaguss plaguss added the enhancement New feature or request label Aug 21, 2024
@plaguss plaguss self-assigned this Aug 21, 2024
@plaguss plaguss requested a review from gabrielmbmb August 21, 2024 14:46
Copy link

Documentation for this PR has been built. You can view it at: https://distilabel.argilla.io/pr-920/

Copy link

codspeed-hq bot commented Aug 21, 2024

CodSpeed Performance Report

Merging #920 will not alter performance

Comparing vllm-embeddings (98a337a) with develop (516909e)

Summary

✅ 1 untouched benchmarks

@plaguss plaguss marked this pull request as ready for review August 21, 2024 15:34
Copy link
Member

@gabrielmbmb gabrielmbmb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@plaguss plaguss added this to the 1.4.0 milestone Aug 22, 2024
@plaguss plaguss merged commit a796a75 into develop Aug 22, 2024
7 checks passed
@plaguss plaguss deleted the vllm-embeddings branch August 22, 2024 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants