Original Author: Rui Ueyama (creator of the mold linker)
Translated by @windowsboy111
Minimally edited by @lleyton
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from modal import Image, Stub, Secret, gpu | |
from pathlib import Path | |
import os | |
MODEL_PATH = "/model" | |
def download_models(): | |
from transformers import AutoTokenizer, AutoModelForCausalLM | |
token = os.environ["HUGGINGFACE_TOKEN"] | |
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-hf", use_auth_token=token) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import itertools | |
import math | |
import signal | |
import subprocess | |
import tempfile | |
import shutil | |
import time | |
import os |
- Install Xcode (Avaliable on the Mac App Store)
- Install Xcode Command Line Tools (Preferences > Downloads)
- Install depot_tools
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ nano ~/.zshrc
- Add
path=('/path/to/depot_tools' $path)