Skip to content

Conversation

sbalandi
Copy link
Contributor

@sbalandi sbalandi commented Oct 3, 2025

Description

Added possibility to run text embeddings pipeline via wwb. Also was added some logic for Qwen/Qwen3-Embedding-0.6B model.
similarity is calculated with torch.nn.functional.cosine_similarity.
embeddings are saving to separate folder as file.npy per generation.
options --embeds_pooling_type, --embeds_normalize, --embeds_padding_side were added.

example to run for BAAI/bge-small-en-v1.5:
wwb.py --base-model BAAI/bge-small-en-v1.5 --model-type text-embedding --gt-data gt_embedds.csv -v --output ./output_embeds/ --embeds_pooling_type mean --embeds_normalize --embeds_padding_side left

example to run for Qwen/Qwen3-Embedding-0.6B (--embeds_pooling_type last_token is important):
wwb.py --base-model Qwen/Qwen3-Embedding-0.6B --model-type text-embedding --gt-data gt_embedds.csv -v --output ./output_embeds/ --embeds_pooling_type last_token --embeds_normalize --embeds_padding_side left

Ticket: CVS-173900

Checklist:

  • Tests have been updated or added to cover the new code
  • This patch fully addresses the ticket.
  • I have made corresponding changes to the documentation

@sbalandi sbalandi requested a review from apaniukov October 3, 2025 00:43
@github-actions github-actions bot added the category: WWB PR changes WWB label Oct 3, 2025
@sbalandi sbalandi requested a review from as-suvorov October 3, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: WWB PR changes WWB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant