liveBook · Manning

Google Compute Engine

As explained in LLMs in Production

Google Compute Engine is Google Cloud's infrastructure service for creating and running virtual machines.

Google Compute Engine provides a practical way to create a cloud virtual machine for multi-GPU training when local hardware is unavailable. The trade-off is speed and capacity versus hourly cost: shut down environments when they are no longer needed. section 5.1.1

A typical setup involves:

  • Creating a Google Cloud account and project, configuring billing, and installing the gcloud CLI. section 5.1.1
  • Choosing a GPU-capable machine image and instance configuration. section 5.1.1
  • Connecting through SSH, copying project files, and deleting the instance after use. section 5.1.1
$ INSTANCE_NAME="g2-llminprod-example"
    $ gcloud compute instances create ${INSTANCE_NAME} --zone=us-west1-a 
    --machine-type=g2-standard-24 --image-project=deeplearning-platform-release
    --image=common-gpu-v20230925-debian-11-py310 --boot-disk-size=200GB --scopes
    cloud-platform --metadata=install-unattended-upgrades=False,install-nvidia-
    driver=True --maintenance-policy TERMINATE --restart-on-failure

Create a GPU-enabled instance with a selected image, boot disk, cloud-platform scope, NVIDIA driver installation, and restart settings. section 5.1.1

How LLMs in Production covers it

How deep it goes
Guides account, project, billing, image, instance, SSH, file-transfer, and deletion steps.
Examples
Uses gcloud commands to initialize, create, inspect, access, copy files to, and delete an instance.
What it assumes
Assumes access to Google Cloud account, project, billing, and an installed gcloud CLI.
What you can do after
Operate/configure a GPU virtual machine for larger training jobs and remove it to avoid unnecessary charges.
How it connects
Connects virtual machines with multi-GPU training, Google Cloud projects, billing, and the gcloud CLI.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLMs in Production. The section links point to the parts of the book it draws on.