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

Suport for embedded representation #3156

Merged
merged 2 commits into from
Jan 10, 2025
Merged

Suport for embedded representation #3156

merged 2 commits into from
Jan 10, 2025

Conversation

Radu1999
Copy link
Contributor

@Radu1999 Radu1999 commented Jan 9, 2025

Previously, the SentenceTransformer wrapper did not allow passing precomputed embeddings (embedded representation).
Many models from the transformers library support this, such as llama, gemma, gemma2, mistral, bert etc.

This feature is particularly (but not only) useful for experimenting with different techniques of custom soft prompting.

The implementations do not support passing both input_ids and inputs_embeds simultaneously: example. Therefore, i implemented them as being mutually exclusive, with inputs_embeds taking precedence.

@Radu1999 Radu1999 changed the title Suport for precomputed embeddings Suport for embedded representation Jan 9, 2025
@Radu1999 Radu1999 requested a review from tomaarsen January 9, 2025 13:03
@tomaarsen
Copy link
Collaborator

Looks good! Thanks for this.

  • Tom Aarsen

@tomaarsen tomaarsen merged commit a7e3707 into UKPLab:master Jan 10, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants