-
Notifications
You must be signed in to change notification settings - Fork 12.1k
server: tests: embeddings use a real embeddings model #5908
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,8 @@ jobs: | |
cmake \ | ||
python3-pip \ | ||
wget \ | ||
psmisc | ||
psmisc \ | ||
language-pack-en | ||
|
||
- name: Build | ||
id: cmake_build | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
@llama.cpp | ||
@embeddings | ||
Feature: llama.cpp server | ||
|
||
Background: Server startup | ||
Given a server listening on localhost:8080 | ||
And a model file bert-bge-small/ggml-model-f16.gguf from HF repo ggml-org/models | ||
And a model alias bert-bge-small | ||
And 42 as server seed | ||
And 2 slots | ||
And 512 as batch size | ||
And 1024 KV cache size | ||
And embeddings extraction | ||
Then the server is starting | ||
Then the server is healthy | ||
|
||
Scenario: Embedding | ||
When embeddings are computed for: | ||
""" | ||
What is the capital of Bulgaria ? | ||
""" | ||
Then embeddings are generated | ||
|
||
Scenario: OAI Embeddings compatibility | ||
Given a model bert-bge-small | ||
When an OAI compatible embeddings computation request for: | ||
""" | ||
What is the capital of Spain ? | ||
""" | ||
Then embeddings are generated | ||
|
||
Scenario: OAI Embeddings compatibility with multiple inputs | ||
Given a model bert-bge-small | ||
Given a prompt: | ||
""" | ||
In which country Paris is located ? | ||
""" | ||
And a prompt: | ||
""" | ||
Is Madrid the capital of Spain ? | ||
""" | ||
When an OAI compatible embeddings computation request for multiple inputs | ||
Then embeddings are generated | ||
|
||
Scenario: Multi users embeddings | ||
Given a prompt: | ||
""" | ||
Write a very long story about AI. | ||
""" | ||
And a prompt: | ||
""" | ||
Write another very long music lyrics. | ||
""" | ||
And a prompt: | ||
""" | ||
Write a very long poem. | ||
""" | ||
And a prompt: | ||
""" | ||
Write a very long joke. | ||
""" | ||
Given concurrent embedding requests | ||
Then the server is busy | ||
Then the server is idle | ||
Then all embeddings are generated | ||
|
||
Scenario: Multi users OAI compatibility embeddings | ||
Given a prompt: | ||
""" | ||
In which country Paris is located ? | ||
""" | ||
And a prompt: | ||
""" | ||
Is Madrid the capital of Spain ? | ||
""" | ||
And a prompt: | ||
""" | ||
What is the biggest US city ? | ||
""" | ||
And a prompt: | ||
""" | ||
What is the capital of Bulgaria ? | ||
""" | ||
And a model bert-bge-small | ||
Given concurrent OAI embedding requests | ||
Then the server is busy | ||
Then the server is idle | ||
Then all embeddings are generated | ||
|
||
@wip | ||
Scenario: All embeddings should be the same | ||
Given 20 fixed prompts | ||
And a model bert-bge-small | ||
Given concurrent OAI embedding requests | ||
Then the server is busy | ||
Then the server is idle | ||
Then all embeddings are the same |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ggerganov Tests added, if the KV Cache size exceeds batch size, embeddings ouputs are different.