Skip to content

Commit 2c1eb85

Browse files
feat: allow for more customization around embedding model
make embedding dimension, model_id, and provider_model_id configurable fields. prev hardcoded values are now defaults. update TrustyAI config to use TRUSTYAI_EMBEDDING_MODEL instead of EMBEDDING_MODEL Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
1 parent 9d5e171 commit 2c1eb85

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

distribution/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You can see an overview of the APIs and Providers the image ships with in the ta
1414
| batches | inline::reference | No || N/A |
1515
| datasetio | inline::localfs | No || N/A |
1616
| datasetio | remote::huggingface | No || N/A |
17-
| eval | inline::trustyai_ragas | Yes (version 0.5.1) || Set the `EMBEDDING_MODEL` environment variable |
17+
| eval | inline::trustyai_ragas | Yes (version 0.5.1) || Set the `TRUSTYAI_EMBEDDING_MODEL` environment variable |
1818
| eval | remote::trustyai_lmeval | Yes (version 0.4.1) || N/A |
1919
| eval | remote::trustyai_ragas | Yes (version 0.5.1) || Set the `KUBEFLOW_LLAMA_STACK_URL` environment variable |
2020
| files | inline::localfs | No || N/A |

distribution/run.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,18 @@ providers:
130130
provider_type: remote::trustyai_lmeval
131131
module: llama_stack_provider_lmeval==0.2.4
132132
config:
133-
use_k8s: ${env.TRUSTYAI_LMEVAL_USE_K8S:=true}
134-
base_url: ${env.VLLM_URL:=http://localhost:8000/v1}
135-
- provider_id: ${env.EMBEDDING_MODEL:+trustyai_ragas_inline}
133+
use_k8s: ${env.TRUSTYAI_LMEVAL_USE_K8S:=true}
134+
base_url: ${env.VLLM_URL:=http://localhost:8000/v1}
135+
- provider_id: ${env.TRUSTYAI_EMBEDDING_MODEL:+trustyai_ragas_inline}
136136
provider_type: inline::trustyai_ragas
137137
module: llama_stack_provider_ragas.inline
138138
config:
139-
embedding_model: ${env.EMBEDDING_MODEL:=}
139+
embedding_model: ${env.TRUSTYAI_EMBEDDING_MODEL:=}
140140
- provider_id: ${env.KUBEFLOW_LLAMA_STACK_URL:+trustyai_ragas_remote}
141141
provider_type: remote::trustyai_ragas
142142
module: llama_stack_provider_ragas.remote
143143
config:
144-
embedding_model: ${env.EMBEDDING_MODEL:=}
144+
embedding_model: ${env.TRUSTYAI_EMBEDDING_MODEL:=}
145145
kubeflow_config:
146146
results_s3_prefix: ${env.KUBEFLOW_RESULTS_S3_PREFIX:=}
147147
s3_credentials_secret_name: ${env.KUBEFLOW_S3_CREDENTIALS_SECRET_NAME:=}
@@ -278,10 +278,10 @@ registered_resources:
278278
provider_id: vllm-inference
279279
model_type: llm
280280
- metadata:
281-
embedding_dimension: 768
282-
model_id: granite-embedding-125m
281+
embedding_dimension: ${env.EMBEDDING_DIMENSION:=768}
282+
model_id: ${env.EMBEDDING_MODEL:=granite-embedding-125m}
283283
provider_id: ${env.EMBEDDING_PROVIDER:=vllm-embedding}
284-
provider_model_id: ibm-granite/granite-embedding-125m-english
284+
provider_model_id: ${env.EMBEDDING_PROVIDER_MODEL_ID:=ibm-granite/granite-embedding-125m-english}
285285
model_type: embedding
286286
shields: []
287287
vector_dbs: []

0 commit comments

Comments
 (0)