Daft icon indicating copy to clipboard operation
Daft copied to clipboard

feat(text_embed): Add vLLM as a provider

Open desmondcheongzx opened this issue 3 months ago • 1 comments

Changes Made

Adds vLLM as a provider for text embedding.

import daft
from daft.ai.provider import load_provider
from daft.functions.ai import embed_text

provider = load_provider("vllm")
model = "Qwen/Qwen3-Embedding-0.6B"

(
    daft.read_huggingface("Open-Orca/OpenOrca")
    .with_column("embedding", embed_text(daft.col("response"), provider=provider, model=model))
    .show()
)

desmondcheongzx avatar Sep 04 '25 01:09 desmondcheongzx

Codecov Report

:x: Patch coverage is 87.71930% with 7 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 71.92%. Comparing base (81c2e1a) to head (1567b08). :warning: Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
daft/ai/provider.py 16.66% 5 Missing :warning:
daft/ai/vllm/protocols/text_embedder.py 97.22% 1 Missing :warning:
daft/ai/vllm/provider.py 93.33% 1 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5136      +/-   ##
==========================================
- Coverage   76.54%   71.92%   -4.63%     
==========================================
  Files         953      955       +2     
  Lines      130653   130581      -72     
==========================================
- Hits       100006    93918    -6088     
- Misses      30647    36663    +6016     
Files with missing lines Coverage Δ
daft/ai/vllm/protocols/text_embedder.py 97.22% <97.22%> (ø)
daft/ai/vllm/provider.py 93.33% <93.33%> (ø)
daft/ai/provider.py 47.16% <16.66%> (-8.39%) :arrow_down:

... and 155 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Sep 04 '25 08:09 codecov[bot]