Skip to content

Commit

Permalink
Merge pull request opendatahub-io#332 from vaibhavjainwiz/sync_1
Browse files Browse the repository at this point in the history
Sync release to main
  • Loading branch information
dtrifiro authored Jul 26, 2024
2 parents ad4195a + 524168b commit 10adcab
Show file tree
Hide file tree
Showing 10 changed files with 1,003 additions and 436 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ spec:
predictor:
serviceAccountName: sa
model:
# https://github.com/kserve/modelmesh-serving/blob/main/docs/predictors/setup-storage.md#3-add-a-storage-entry-to-the-storage-config-secret
modelFormat:
name: caikit
runtime: caikit-standalone-runtime-grpc
storageUri: s3://modelmesh-example-models/llm/models/flan-t5-small-caikit # single model here: target directory must contain a config.yml
storageUri: s3://modelmesh-example-models/models/hf/
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ spec:
predictor:
serviceAccountName: sa
model:
# https://github.com/kserve/modelmesh-serving/blob/main/docs/predictors/setup-storage.md#3-add-a-storage-entry-to-the-storage-config-secret
modelFormat:
name: caikit
runtime: caikit-standalone-runtime
storageUri: s3://modelmesh-example-models/llm/models/flan-t5-small-caikit # single model here: target directory must contain a config.yml
storageUri: s3://modelmesh-example-models/models/hf/
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ spec:
env:
- name: RUNTIME_LOCAL_MODELS_DIR
value: /mnt/models
- name: TRANSFORMERS_CACHE
value: /tmp/transformers_cache
- name: HF_HOME
value: /tmp/hf_home
- name: RUNTIME_GRPC_ENABLED
value: "true"
- name: RUNTIME_HTTP_ENABLED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ spec:
name: caikit
containers:
- name: kserve-container
image: quay.io/opendatahub/caikit-nlp:stable
image: quay.io/opendatahub/caikit-nlp:fast
command: ["python", "-m", "caikit.runtime"]
env:
- name: RUNTIME_LOCAL_MODELS_DIR
value: /mnt/models
- name: TRANSFORMERS_CACHE
value: /tmp/transformers_cache
- name: HF_HOME
value: /tmp/hf_home
- name: RUNTIME_GRPC_ENABLED
value: "false"
- name: RUNTIME_HTTP_ENABLED
Expand Down
57 changes: 57 additions & 0 deletions demo/kserve/deploy-embeddings-scripts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## Using scripts to deploy an embeddings model with the Caikit Standalone Serving Runtime
You can deploy and test a embedding model by running the scripts provided in the the `caikit-tgis-serving` repo. These scripts deploy a all-MiniLM-L12-v2 model with the Caikit Standalone Serving runtime. This model has already been containerized into an S3 MinIO bucket.

**Prerequisites**
- You installed the Caikit-TGIS-Serving image as described in the Caikit-TGIS-Serving README file.

- You installed the scripts as described in Script-based Installation.

- Your current working directory is the /caikit-tgis-serving/demo/kserve/ directory.

**Procedure**
1. Deploy a sample embeddings model

Replace the default value of `image` in `custom-manifests/minio/minio.yaml` with the contanerized embeddings model.

```
.
.
.
image: quay.io/christinaexyou/modelmesh-minio-examples:embedding-models
```

Replace all instances of `tgis` with `standalone` in `scripts/test/deploy-model.sh`

```
sed 's/tgis/standalone/g' ./scripts/test/deploy-model.sh | tee ./scripts/test/deploy-model-standalone.sh
```

For HTTP:

```
./scripts/test/deploy-model-standalone.sh
```

For grPC:

```
./scripts/test/deploy-model-standalone.sh grpc
```
2. Perform inference

For HTTP:

```
./scripts/test/http-call-embeddings.sh
```

For grPC:
```
./scripts/test/grpc-call-embeddings.sh
```

4. Delete the sample model

```
tests/scripts/delete-model.sh
```
Loading

0 comments on commit 10adcab

Please sign in to comment.