|
102 | 102 | "\n", |
103 | 103 | "REGION = \"\" # @param {type:\"string\"}\n", |
104 | 104 | "\n", |
| 105 | + "# @markdown 4. If you want to run predictions with A100 80GB or H100 GPUs, we recommend using the regions listed below. **NOTE:** Make sure you have associated quota in selected regions. Click the links to see your current quota for each GPU type: [Nvidia A100 80GB](https://console.cloud.google.com/iam-admin/quotas?metric=aiplatform.googleapis.com%2Fcustom_model_serving_nvidia_a100_80gb_gpus), [Nvidia H100 80GB](https://console.cloud.google.com/iam-admin/quotas?metric=aiplatform.googleapis.com%2Fcustom_model_serving_nvidia_h100_gpus).\n", |
| 106 | + "\n", |
| 107 | + "# @markdown > | Machine Type | Accelerator Type | Recommended Regions |\n", |
| 108 | + "# @markdown | ----------- | ----------- | ----------- |\n", |
| 109 | + "# @markdown | a2-ultragpu-1g | 1 NVIDIA_A100_80GB | us-central1, us-east4, europe-west4, asia-southeast1, us-east4 |\n", |
| 110 | + "# @markdown | a3-highgpu-2g | 2 NVIDIA_H100_80GB | us-west1, asia-southeast1, europe-west4 |\n", |
| 111 | + "# @markdown | a3-highgpu-4g | 4 NVIDIA_H100_80GB | us-west1, asia-southeast1, europe-west4 |\n", |
| 112 | + "# @markdown | a3-highgpu-8g | 8 NVIDIA_H100_80GB | us-central1, us-east5, europe-west4, us-west1, asia-southeast1 |\n", |
| 113 | + "\n", |
105 | 114 | "import datetime\n", |
106 | 115 | "# Import the necessary packages\n", |
107 | 116 | "import importlib\n", |
|
355 | 364 | "image_url = \"https://llava-vl.github.io/static/images/view.jpg\" # @param {type:\"string\"}\n", |
356 | 365 | "# fmt: on\n", |
357 | 366 | "\n", |
358 | | - "image = common_util.download_image(image_url)\n", |
359 | | - "resized_image = common_util.resize_image(image, 800)\n", |
360 | | - "image_base64 = common_util.image_to_base64(resized_image)\n", |
361 | | - "display(resized_image)\n", |
362 | | - "\n", |
363 | 367 | "# Loads an existing endpoint instance using the endpoint name:\n", |
364 | 368 | "# - Using `endpoint_name = endpoint.name` allows us to get the\n", |
365 | 369 | "# endpoint name of the endpoint `endpoint` created in the cell\n", |
|
385 | 389 | "instances = [\n", |
386 | 390 | " {\n", |
387 | 391 | " \"prompt\": prompt,\n", |
388 | | - " \"multi_modal_data\": {\"image\": image_base64},\n", |
| 392 | + " \"multi_modal_data\": {\"image\": image_url},\n", |
389 | 393 | " \"max_tokens\": max_tokens,\n", |
390 | 394 | " \"temperature\": temperature,\n", |
391 | 395 | " \"top_p\": top_p,\n", |
|
0 commit comments