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

Semantic search #23

Open
Tracked by #7
reveching opened this issue Aug 21, 2021 · 5 comments · May be fixed by #24
Open
Tracked by #7

Semantic search #23

reveching opened this issue Aug 21, 2021 · 5 comments · May be fixed by #24
Assignees
Labels
enhancement New feature or request

Comments

@reveching
Copy link

Other than classification and completion, Is it possible to implement semantic search endpoint like they did with GPT-3?

@vicgalle
Copy link
Owner

Thanks for the suggestion @reveching , I have added it to the to-do list at #7 and I'll try to make it after I return from vacation

@vicgalle vicgalle mentioned this issue Aug 21, 2021
4 tasks
@vicgalle vicgalle changed the title Is it possible to implement semantic search endpoint? Semantic search endpoint Aug 21, 2021
@vicgalle vicgalle changed the title Semantic search endpoint Semantic search Aug 21, 2021
@vicgalle vicgalle added the enhancement New feature or request label Aug 21, 2021
@vicgalle vicgalle linked a pull request Aug 22, 2021 that will close this issue
@vicgalle vicgalle self-assigned this Aug 22, 2021
@6r1d
Copy link

6r1d commented Sep 30, 2021

I'm also very interested in the feature or any links on its implementation, thanks!

@vicgalle
Copy link
Owner

Hi @6r1d , I have already some working functionality of this, but in another repo: https://github.com/vicgalle/zero-shot-api/blob/main/pipeline.py#L30 In the main.py from there I have some simple examples.

Basically it should work with any model from the transformers library (but I recommend using those from sentence-transformers or summarization models), as it just computes the embedding vector of each query and keys and then computes the cosine similarity between them.

Over the next few days I'll have it integrated and served from this API!

@6r1d
Copy link

6r1d commented Oct 13, 2021

Amazing, thank you very much, @vicgalle !

Is GPT-j less appropriate for that because of its speed?

@leonhuene
Copy link

@vicgalle Is this available via the API now? Also is the API able to return embeddings?

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 a pull request may close this issue.

4 participants