Skip to content

Commit 0ad4665

Browse files
vertex-mg-botcopybara-github
authored andcommitted
LLaVA Deployment notebook
PiperOrigin-RevId: 699223982
1 parent ff2f20f commit 0ad4665

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

notebooks/community/model_garden/model_garden_pytorch_llava.ipynb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,15 @@
102102
"\n",
103103
"REGION = \"\" # @param {type:\"string\"}\n",
104104
"\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",
105114
"import datetime\n",
106115
"# Import the necessary packages\n",
107116
"import importlib\n",
@@ -355,11 +364,6 @@
355364
"image_url = \"https://llava-vl.github.io/static/images/view.jpg\" # @param {type:\"string\"}\n",
356365
"# fmt: on\n",
357366
"\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",
363367
"# Loads an existing endpoint instance using the endpoint name:\n",
364368
"# - Using `endpoint_name = endpoint.name` allows us to get the\n",
365369
"# endpoint name of the endpoint `endpoint` created in the cell\n",
@@ -385,7 +389,7 @@
385389
"instances = [\n",
386390
" {\n",
387391
" \"prompt\": prompt,\n",
388-
" \"multi_modal_data\": {\"image\": image_base64},\n",
392+
" \"multi_modal_data\": {\"image\": image_url},\n",
389393
" \"max_tokens\": max_tokens,\n",
390394
" \"temperature\": temperature,\n",
391395
" \"top_p\": top_p,\n",

0 commit comments

Comments
 (0)