You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: model-deployment/containers/nim/README-multillm-nim-containers.md
+9-14Lines changed: 9 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,13 +11,11 @@ We describe two approaches to create this Model Deployment on OCI:
11
11
* Utilising Object storage to store the model and creating a model catalog pointing to Object storage bucket [Refer](https://github.com/oracle-samples/oci-data-science-ai-samples/tree/main/model-deployment/containers/nim/README-MODEL-CATALOG.md)
12
12
13
13
## Prerequisites
14
-
* Access the corresponding NIM container for the model. For example for llama3, fetch the latest available image from [NGC catalog](https://catalog.ngc.nvidia.com/orgs/nim/teams/meta/containers/llama3-8b-instruct/tags). If you are a first time user, you need to sign up a developer account and wait for access to be granted to required container image.
15
-
Click Get Container Button and click Request Access for NIM. At the time of writing this blog, you need a business email address to get access to NIM.
14
+
* Access the corresponding NIM container llm. Click Get Container Button and click Request Access for NIM. At the time of writing this blog, you need a business email address to get access to NIM.
16
15
* For downloading this image from NGC catalog, you need to perform docker login to nvcr.io. Details of login information are mentioned on their [public doc](https://docs.nvidia.com/launchpad/ai/base-command-coe/latest/bc-coe-docker-basics-step-02.html).
17
16
Once logged in, we can directly pull image using -
18
17
`docker pull nvcr.io/nim/nvidia/llm-nim:1.12.0`
19
18
* Generate API key to interact with NIM NGC APIs. [Reference document](https://org.ngc.nvidia.com/setup/api-key).
20
-
* Create a VCN with public connectivity as NIM container needs to call NGC publicaly exposed APIs. Please refer [public document](https://docs.oracle.com/en-us/iaas/data-science/using/model-dep-create-cus-net.htm) for relevant information on custom networking.
21
19
* Once the image is successfully pulled on your workstation, we will bring this image to Oracle Cloud Infrastructure Registry (OCIR). The necessary policies and process for OCIR interaction are mentioned in our [public docs](https://docs.oracle.com/en-us/iaas/data-science/using/mod-dep-byoc.htm).
22
20
23
21
## OCI Logging
@@ -48,15 +46,18 @@ When experimenting with new frameworks and models, it is highly advisable to att
Once you built and pushed the NIM container, you can now use the `Bring Your Own Container` Deployment in OCI Data Science to deploy the Llama3 model
57
55
58
56
### Creating Model catalog
59
-
Use any zip file to create a dummy model artifact. As we will be downloading model directly from NGC, we do not need to catalog the model. For catalogued based solution, refer [Readme](README-MODEL-CATALOG.md).
57
+
58
+
Follow the steps mentioned [here](https://github.com/oracle-samples/oci-data-science-ai-samples/blob/main/model-deployment/containers/llama2/README.md#model-store-export-api-for-creating-model-artifacts-greater-than-6-gb-in-size)), refer the section One time download to OCI Model Catalog.
59
+
60
+
We would utilise the above created model in the next steps to create the Model Deployment.
60
61
61
62
### Create Model deploy
62
63
@@ -68,17 +69,11 @@ Use any zip file to create a dummy model artifact. As we will be downloading mod
* Under `Models` click on the `Select` button and selectthe Model Catalog entry we created earlier
80
75
* Under `Compute` and then`Specialty and previous generation`selectthe`VM.GPU.A10.2` instance
81
-
* Under `Networking` choose the `Custom Networking` option and bring the VCN and subnet, which allows Internet access.
76
+
* Under `Networking` choose the `Default Networking` option.
82
77
* Under `Logging`selectthe Log Group where you've created your predict and access log and select those correspondingly
83
78
* Select the custom container option `Use a Custom Container Image` and click `Select`
84
79
* Select the OCIR repository and image we pushed earlier
@@ -97,7 +92,7 @@ Use any zip file to create a dummy model artifact. As we will be downloading mod
97
92
oci raw-request \
98
93
--http-method POST \
99
94
--target-uri <MODEL-DEPLOY-ENDPOINT> \
100
-
--request-body '{"model": "meta/llama3-8b-instruct", "messages": [ { "role":"user", "content":"Hello! How are you?" }, { "role":"assistant", "content":"Hi! I am quite well, how can I help you today?" }, { "role":"user", "content":"Can you write me a song?" } ], "top_p": 1, "n": 1, "max_tokens": 200, "stream": false, "frequency_penalty": 1.0, "stop": ["hello"] }' \
95
+
--request-body '{"model": "/opt/ds/model/deployed_model", "messages": [ { "role":"user", "content":"Hello! How are you?" }, { "role":"assistant", "content":"Hi! I am quite well, how can I help you today?" }, { "role":"user", "content":"Can you write me a song?" } ], "top_p": 1, "n": 1, "max_tokens": 200, "stream": false, "frequency_penalty": 1.0, "stop": ["hello"] }' \
0 commit comments