Breadcrumb

  1. Red Hat Interactive Learning Portal
  2. How to learn AI with Red Hat
  3. Get started with consuming GPU-hosted large language models on Developer Sandbox
  4. Log in and examine the models

Get started with consuming GPU-hosted large language models on Developer Sandbox

Learn the many ways you can interact with GPU-hosted large language models (LLMs) on Developer Sandbox, including connecting the model endpoints, interacting with the API endpoints using the hosted Red Hat OpenShift AI component, and standing up a web-based chat user interface.

Access the Developer Sandbox

The first step is to log in to your Developer Sandbox account. If you do not have one, go to the Developer Sandbox and follow the instructions to create an account.

Prerequisites:

  • Access to the Developer Sandbox (A free trial is available).

In this lesson, you will:

  • Access the Red Hat OpenShift client in the Developer Sandbox to examine the hosted large language models.
  • List the projects, pods, and exposed endpoints for the model.

View the models

Follow these steps to view the models.

  1. Once you are logged in, click on the OpenShift tile (Figure 1):

    OpenShift tile in Sandbox startup
    Figure 1: OpenShift tile in sandbox startup.
    Figure 1: Click on the OpenShift tile in the Developer Sandbox startup. 
  2. Once the UI renders, click on the >_ icon at the top right of the interface. 

    For this part of the exercise, we will use the built-in terminal and the OpenShift client (oc) to examine the hosted models.

  3. To list all the projects you can see on the sandbox, type the following:

    oc projects

    Note that you have access to three projects: 

    1. Your development project, which limits you in terms of creating objects, ends with -dev and starts with your username.  For example, i.e.,  mrdeveloper-dev

    2. You will also see the shared stored OS images for Red Hat OpenShift Virtualization.

    3. Finally, we are interested in the sandbox-shared-models because the models are hosted using Objects within this project.

  4. Type the following:

    oc project sandbox-shared-models
    oc get pods
  5. There are three pods running in this project. You can’t delete or change them. 

  6. Now try the following:

    oc explain isvc

    This is a new type of object provided by Red Hat AI components that wraps and handles the API serving and endpoint for a hosted LLM. 

  7. Now enter the following:

    oc get isvc

    You will see that there are three hosted models in this project. 

  8. Type the following:

    oc get isvc -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}'

    This command uses jsonpath to get the names, making it easier to read them. 

  9. Type the following:

    oc get isvc -o jsonpath='{range .items[*]}{.status.address.url}{"\n"}{end}'

    Note: This will list the exposed endpoints for the models we will use during the rest of the exercise. There will be three individual URLs, starting with https:// and ending with :8443. Copy the output from this command somewhere safe. 

Previous resource
Overview: Get started with consuming GPU-hosted large language models on Developer Sandbox
Next resource
Interact with the hosted models using curl