-
Notifications
You must be signed in to change notification settings - Fork 260
feat(inference): newest embedding model #3917
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
Show all changes
6 commits
Select commit
Hold shift + click to select a range
17b2a33
feat(inference): newest embedding
tgenaitay c6751aa
feat(inference): edited menu
tgenaitay 7ba1d71
Apply suggestions from code review
bene2k1 7e4bffc
Update ai-data/managed-inference/reference-content/bge-multilingual-g…
tgenaitay e9278c1
Update ai-data/managed-inference/reference-content/bge-multilingual-g…
tgenaitay ea42bbc
Update ai-data/managed-inference/reference-content/bge-multilingual-g…
tgenaitay 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
69 changes: 69 additions & 0 deletions
69
ai-data/managed-inference/reference-content/bge-multilingual-gemma2.mdx
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,69 @@ | ||
| --- | ||
| meta: | ||
| title: Understanding the BGE-Multilingual-Gemma2 embedding model | ||
| description: Deploy your own secure BGE-Multilingual-Gemma2 embedding model with Scaleway Managed Inference. Privacy-focused, fully managed. | ||
| content: | ||
| h1: Understanding the BGE-Multilingual-Gemma2 embedding model | ||
| paragraph: This page provides information on the BGE-Multilingual-Gemma2 embedding model | ||
| tags: embedding | ||
| categories: | ||
| dates: | ||
| validation: 2024-10-30 | ||
| posted: 2024-10-30 | ||
| - ai-data | ||
| --- | ||
|
|
||
| ## Model overview | ||
|
|
||
| | Attribute | Details | | ||
| |-----------------|------------------------------------| | ||
| | Provider | [baai](https://huggingface.co/BAAI) | | ||
| | Compatible Instances | L4 (FP32) | | ||
| | Context size | 4096 tokens | | ||
|
|
||
| ## Model name | ||
|
|
||
| ```bash | ||
| baai/bge-multilingual-gemma2:fp32 | ||
| ``` | ||
|
|
||
| ## Compatible Instances | ||
|
|
||
| | Instance type | Max context length | | ||
| | ------------- |-------------| | ||
| | L4 | 4096 (FP32) | | ||
|
|
||
| ## Model introduction | ||
|
|
||
| BGE is short for BAAI General Embedding. This particular model is an LLM-based embedding, trained on a diverse range of languages and tasks from the lightweight [google/gemma-2-9b](https://huggingface.co/google/gemma-2-9b). | ||
| As such, it is distributed under the [Gemma terms of use](https://ai.google.dev/gemma/terms). | ||
|
|
||
| ## Why is it useful? | ||
|
|
||
| - BGE-Multilingual-Gemma2 tops the [MTEB leaderboard](https://huggingface.co/spaces/mteb/leaderboard), scoring the number one spot in French and Polish, and number seven in English, at the time of writing this page (Q4 2024). | ||
| - As its name suggests, the model's training data spans a broad range of languages, including English, Chinese, Polish, French, and more. | ||
| - It encodes text into 3584-dimensional vectors, providing a very detailed representation of sentence semantics. | ||
| - BGE-Multilingual-Gemma2 in its L4/FP32 configuration boats a high context length of 4096 tokens, particularly useful for ingesting data and building RAG applications. | ||
|
|
||
| ## How to use it | ||
|
|
||
| ### Sending Managed Inference requests | ||
|
|
||
| To perform inference tasks with your embedding model deployed at Scaleway, use the following command: | ||
|
|
||
| ```bash | ||
| curl https://<Deployment UUID>.ifr.fr-par.scaleway.com/v1/embeddings \ | ||
| -H "Authorization: Bearer <IAM API key>" \ | ||
bene2k1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "input": "Embeddings can represent text in a numerical format.", | ||
| "model": "baai/bge-multilingual-gemma2:fp32" | ||
| }' | ||
| ``` | ||
|
|
||
| Make sure to replace `<IAM API key>` and `<Deployment UUID>` with your actual [IAM API key](/identity-and-access-management/iam/how-to/create-api-keys/) and the Deployment UUID you are targeting. | ||
bene2k1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ### Receiving Inference responses | ||
|
|
||
| Upon sending the HTTP request to the public or private endpoints exposed by the server, you will receive inference responses from the managed Managed Inference server. | ||
| Process the output data according to your application's needs. The response will contain the output generated by the embedding model based on the input provided in the request. | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.