/tpu-mllm

Primary LanguagePython

Server Settings

1. Create TPU VM

To create TPU VM in command line:

export PROJECT_ID=YOUR_PROJECT_ID
export PATH=YOUR_SDK_PATH

cd ~

gcloud config set project ${PROJECT_ID}
gcloud config set account YOUR_EMAIL

export TPU_NAME=tpu-v3-8-01
gcloud compute tpus tpu-vm create ${TPU_NAME} \
  --zone=europe-west4-a \
  --accelerator-type=v3-8 \
  --version=tpu-vm-pt-2.0

2. Add an SSH public key to Google Cloud

To view SSH public key:

cat ~/.ssh/id_rsa.pub

3. SSH into TPU VM

Create or edit ~/.ssh/config:

vi ~/.ssh/config

Add content:

Host tpuv3-8-1
    User sodus1102
    Hostname EXTERNAL_ID
    IdentityFile ~/.ssh/KEY_FILE

SSH into the TPU VM using VSCode or command line:

ssh tpuv3-8-1

4. Start Docker Container for Pytorch XLA

sudo docker run -it --name tpu-torch \
    -d --privileged \
    -p 7860:7860 \
    -v `pwd`:/workspace \
    us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:r2.1.0_3.10_tpuvm \
    /bin/bash

5. TPU Monitoring (TODO)

Code

Explore the code:

git clone git@github.com:SoyeonHH/tpu-mllm.git
cd tpu-mllm

Datasets

mkdir data && cd data
wget https://aka.ms/kosmos-iq50

MLLMs

Evaluation