Skip to content

Commit

Permalink
Added display name for models (#1657)
Browse files Browse the repository at this point in the history
  • Loading branch information
kathirsvn authored Nov 5, 2024
1 parent bae4c48 commit 30273a5
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ interface ModelConfig {
@JsonProperty
String name();

@JsonProperty
String displayName();

/**
* vectorDimension is not null if the model supports a single dimension value. It will be null
* if the model supports different dimensions. A parameter called vectorDimension is included.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public record TokenConfigImpl(String accepted, String forwarded) implements Toke

public record ModelConfigImpl(
String name,
String displayName,
Optional<Integer> vectorDimension,
List<ParameterConfig> parameters,
Map<String, String> properties,
Expand All @@ -38,6 +39,7 @@ public ModelConfigImpl(
List<ParameterConfig> modelParameterList) {
this(
grpcModelConfig.getName(),
grpcModelConfig.getDisplayName(),
grpcModelConfig.hasVectorDimension()
? Optional.of(grpcModelConfig.getVectorDimension())
: Optional.empty(),
Expand Down
1 change: 1 addition & 0 deletions src/main/proto/embedding_gateway.proto
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ message GetSupportedProvidersResponse {
map<string, string> properties = 4;
optional bool deprecated = 5;
optional string serviceUrl = 6;
string display_name = 7;
}
}

Expand Down
33 changes: 33 additions & 0 deletions src/main/resources/embedding-providers-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ stargate:
max-batch-size: 2048
models:
- name: text-embedding-3-small
display-name: "text-embedding-3-small"
parameters:
- name: vectorDimension
type: number
Expand All @@ -47,6 +48,7 @@ stargate:
numeric-range: [2, 1536]
help: "Vector dimension to use in the database and when calling OpenAI."
- name: text-embedding-3-large
display-name: "text-embedding-3-large"
parameters:
- name: vectorDimension
type: number
Expand All @@ -56,6 +58,7 @@ stargate:
numeric-range: [256, 3072]
help: "Vector dimension to use in the database and when calling OpenAI."
- name: text-embedding-ada-002
display-name: "text-embedding-ada-002"
vector-dimension: 1536
azureOpenAI:
# see https://learn.microsoft.com/en-us/azure/ai-services/openai/reference
Expand Down Expand Up @@ -92,6 +95,7 @@ stargate:
max-batch-size: 2048
models:
- name: text-embedding-3-small
display-name: "text-embedding-3-small"
parameters:
- name: vectorDimension
type: number
Expand All @@ -101,6 +105,7 @@ stargate:
numeric-range: [2, 1536]
help: "Vector dimension to use in the database and when calling Azure OpenAI."
- name: text-embedding-3-large
display-name: "text-embedding-3-large"
parameters:
- name: vectorDimension
type: number
Expand All @@ -113,6 +118,7 @@ stargate:
numeric-range: [256, 3072]
help: "Vector dimension to use in the database and when calling Azure OpenAI."
- name: text-embedding-ada-002
display-name: "text-embedding-ada-002"
vector-dimension: 1536
bedrock:
display-name: Amazon Bedrock
Expand Down Expand Up @@ -143,8 +149,10 @@ stargate:
max-batch-size: 1
models:
- name: amazon.titan-embed-text-v1
display-name: "amazon.titan-embed-text-v1"
vector-dimension: 1536
- name: amazon.titan-embed-text-v2:0
display-name: "amazon.titan-embed-text-v2:0"
parameters:
- name: vectorDimension
type: number
Expand Down Expand Up @@ -175,16 +183,22 @@ stargate:
max-batch-size: 32
models:
- name: sentence-transformers/all-MiniLM-L6-v2
display-name: "sentence-transformers/all-MiniLM-L6-v2"
vector-dimension: 384
- name: intfloat/multilingual-e5-large
display-name: "intfloat/multilingual-e5-large"
vector-dimension: 1024
- name: intfloat/multilingual-e5-large-instruct
display-name: "intfloat/multilingual-e5-large-instruct"
vector-dimension: 1024
- name: BAAI/bge-small-en-v1.5
display-name: "BAAI/bge-small-en-v1.5"
vector-dimension: 384
- name: BAAI/bge-base-en-v1.5
display-name: "BAAI/bge-base-en-v1.5"
vector-dimension: 768
- name: BAAI/bge-large-en-v1.5
display-name: "BAAI/bge-large-en-v1.5"
vector-dimension: 1024
huggingfaceDedicated:
# see https://huggingface.co/docs/inference-endpoints/en/supported_tasks#sentence-embeddings
Expand All @@ -208,6 +222,7 @@ stargate:
max-batch-size: 32
models:
- name: endpoint-defined-model
display-name: "endpoint-defined-model"
parameters:
- name: vectorDimension
type: number
Expand Down Expand Up @@ -265,6 +280,7 @@ stargate:
max-batch-size: 32
models:
- name: textembedding-gecko@003
display-name: "textembedding-gecko@003"
vector-dimension: 768
parameters:
- name: "autoTruncate"
Expand Down Expand Up @@ -295,8 +311,10 @@ stargate:
max-batch-size: 32
models:
- name: embed-english-v3.0
display-name: "embed-english-v3.0"
vector-dimension: 1024
- name: embed-english-v2.0
display-name: "embed-english-v2.0"
vector-dimension: 4096
nvidia:
display-name: Nvidia
Expand All @@ -309,6 +327,7 @@ stargate:
max-batch-size: 8
models:
- name: NV-Embed-QA
display-name: "NV-Embed-QA"
vector-dimension: 1024
properties:
max-tokens: 512
Expand Down Expand Up @@ -336,14 +355,19 @@ stargate:
max-batch-size: 32
models:
- name: jina-embeddings-v2-base-en
display-name: "jina-embeddings-v2-base-en"
vector-dimension: 768
- name: jina-embeddings-v2-base-de
display-name: "jina-embeddings-v2-base-de"
vector-dimension: 768
- name: jina-embeddings-v2-base-es
display-name: "jina-embeddings-v2-base-es"
vector-dimension: 768
- name: jina-embeddings-v2-base-code
display-name: "jina-embeddings-v2-base-code"
vector-dimension: 768
- name: jina-embeddings-v2-base-zh
display-name: "jina-embeddings-v2-base-zh"
vector-dimension: 768
voyageAI:
# see https://docs.voyageai.com/reference/embeddings-api
Expand Down Expand Up @@ -377,18 +401,25 @@ stargate:
max-batch-size: 32
models:
- name: voyage-large-2-instruct
display-name: "voyage-large-2-instruct"
vector-dimension: 1024
- name: voyage-law-2
display-name: "voyage-law-2"
vector-dimension: 1024
- name: voyage-code-2
display-name: "voyage-code-2"
vector-dimension: 1536
- name: voyage-large-2
display-name: "voyage-large-2"
vector-dimension: 1536
- name: voyage-2
display-name: "voyage-2"
vector-dimension: 1024
- name: voyage-finance-2
display-name: "voyage-finance-2"
vector-dimension: 1024
- name: voyage-multilingual-2
display-name: "voyage-multilingual-2"
vector-dimension: 1024
mistral:
# see https://docs.mistral.ai/api/#operation/createEmbedding
Expand All @@ -413,6 +444,7 @@ stargate:
max-batch-size: 32
models:
- name: mistral-embed
display-name: "mistral-embed"
vector-dimension: 1024

# NOTE: UpstageAI has one model for storing and a diff one for reading: this is different
Expand Down Expand Up @@ -444,4 +476,5 @@ stargate:
# NOTE: this is where weirdness exists; model name is prefix on which
# either "-query" or "-passage" is appended to get the actual model name
- name: solar-embedding-1-large
display-name: "solar-embedding-1-large"
vector-dimension: 4096

0 comments on commit 30273a5

Please sign in to comment.