Skip to content

Commit

Permalink
Merge pull request #7 from RedHatQuickCourses/screen_capture_additions
Browse files Browse the repository at this point in the history
Screen capture additions
  • Loading branch information
kknoxrht authored Jun 12, 2024
2 parents f0e4aa8 + 9c35386 commit 0bc39e0
Show file tree
Hide file tree
Showing 20 changed files with 23 additions and 2 deletions.
Binary file added modules/chapter3/images/add_dataconnection2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/add_yaml_minio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/create_workbench.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/curl_command.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/dataconnections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/deploy_model1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/deploy_model_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/dsp_create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/experiment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/london.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/minio2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/mistral_config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/model_served.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/ollama_model_project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/paris.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/serverurl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter3/images/serving_runtime.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion modules/chapter3/pages/section1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ spec:
- autoSelect: true
name: any
```
image::serving_runtime.png[width=640]

. After clicking the **Add** button at the bottom of the input area, you will see the new Ollama Runtime in the list. We can re-order the list as needed (the order chosen here is the order in which the users will see these choices).
. After clicking the **Create** button at the bottom of the input area, you will see the new Ollama Runtime in the list. We can re-order the list as needed (the order chosen here is the order in which the users will see these choices).


== Create a Data Science Project
Expand All @@ -83,6 +84,7 @@ Navigate to & select the Data Science Projects section.

. Select Create.

image::dsp_create.png[width=640]

== Deploy MinIO as S3 Compatible Storage

Expand All @@ -102,6 +104,8 @@ To Deploy MinIO, we will utilize the OpenShift Dashboard.

. Then Select the + (plus) icon from the top right of the dashboard.

image::minio2.png[width=640]

. In the new window, we will paste the following YAML file. In the YAML below its recommended to change the default user name & password.


Expand Down Expand Up @@ -322,13 +326,17 @@ Navigate to the Data Science Project section of the OpenShift AI Console /Dashbo
.. Region: This is required for AWS storage & cannot be blank (no-region-minio)
.. Bucket: use the Minio Storage bucket name: *models*

image::dataconnection_models.png[width=800]

Repeat the same process for the Storage bucket, using *storage* for the name & bucket.


== Creating a WorkBench

Navigate to the Data Science Project section of the OpenShift AI Console /Dashboard. Select the Ollama-model project.

image::create_workbench.png[width=800]

. Select the WorkBench button, then click create workbench

.. Name: `ollama-model`
Expand All @@ -351,6 +359,7 @@ Depending on the notebook image selected, it can take between 2-20 minutes for t

From the ollama-model WorkBench Dashboard in the ollama-model project, navigate to the **Models** section, and select Deploy Model from the **Single Model Serving Platform Button**.

image::deploy_model_2.png[width=800]

*Create the model server with the following values:*

Expand Down
14 changes: 13 additions & 1 deletion modules/chapter3/pages/section2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Return the Jupyter Notebook Environment:

. Paste the inference endpoint into the Cell labeled interfence_server_url = *"replace with your own inference address"*

image::serverurl.png[width=800]

. We can now start executing the code in the cells, starting with the set the inference server URL cell.

. Next we run the second cell: !pip install -q langchain==0.1.14 ; there is a notice to update pip, just ignore and continue.
Expand All @@ -45,6 +47,8 @@ Before we continue, we need to perform the following additional step. As mention

We will need to obtain the endpoint from the OpenShift AI model serving console. I usually just paste the text below into a cell in the Jupyter Notebook and paste the url in the code block from there.

image::mistral_config.png[width=640]

[source, yaml]
----
curl https://your-endpoint/api/pull \
Expand All @@ -61,6 +65,8 @@ curl https://your-endpoint/api/pull \

The message: *status: pulling manifest* should appear. This begins the model downloading process.

image::curl_command.png[width=800]

Once the download completes, the *status: success:* message appears. We can now return to the Jupyter Notebook Tab in the browser and proceed.

=== Create the Prompt
Expand All @@ -81,12 +87,16 @@ In green text is the window, there is the setup message that is sent along with

It takes approximately 12 seconds for the model to respond with the first word of the reply, and the final word is printed to the screen approximately 30 seconds after the request was started.

image::paris.png[width=800]

The responce answered the question in a well-considered and informated paragraph that is less than 100 words in length.

=== Second Input

Notice that the Second input - "Is there a River" - does not specify where the location is that might have a River. Because the conversation history is passed with the second input, there is not need to specify any additional informaiton.

image::london.png[width=800]

The total time to first word took approximately 14 seconds this time, just a bit longer due the orginal information being sent. The time for the entire reponse to be printed to the screen just took over 4 seoncds.

Overall our Model is performing well without a GPU and in a container limited to 4 cpus & 10Gb of memory.
Expand All @@ -101,11 +111,13 @@ There is no change to memory setting, but go ahead and evalute where the second

Add a few new cells to the Notebook.

image::experiment.png[width=800]

Experiment with clearing the memory statement, then asking the river question again. Or perhaps copy one of the input statements and add your own question for the model.

Try not clearing the memory and asking a few questions.

You have successfully deployed a Large Language Model, now test the information that it has available and find out what is doesn't know.
**You have successfully deployed a Large Language Model, now test the information that it has available and find out what is doesn't know.**


== Delete the Environment
Expand Down

0 comments on commit 0bc39e0

Please sign in to comment.