-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcommon.py
More file actions
36 lines (31 loc) · 976 Bytes
/
common.py
File metadata and controls
36 lines (31 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import modal
import os
DATASET_ID = "bigcode/starcoderdata"
DATASET_VOLUME_NAME = f"{DATASET_ID.replace('/', '-')}-dataset"
DATASET_MOUNT_PATH = "/data"
MODEL_MOUNT_PATH = "/model"
MODEL_CACHE_DIR = f"{MODEL_MOUNT_PATH}/model_cache"
MODEL_VOLUME_NAME = "starcoder-model-v2"
MODEL_NAME = "meta-llama/Llama-2-7b-hf"
base_image = (
modal.Image.debian_slim(python_version="3.11")
.apt_install("libibverbs-dev", "libibverbs1")
.pip_install(
"datasets>=2.19",
"sympy",
"transformers",
"trl",
"wandb",
"huggingface_hub",
"torch==2.6.0",
"accelerate",
)
.add_local_python_source("common")
)
LOCAL_CODE_DIR = os.path.dirname(os.path.abspath(__file__))
REMOTE_CODE_DIR = "/root/"
REMOTE_TRAIN_SCRIPT_PATH = "/root/train.py"
train_image = base_image.add_local_dir(
LOCAL_CODE_DIR,
remote_path=REMOTE_CODE_DIR,
).add_local_file("../utils/mlx_monitor.py", remote_path="/root/mlx_monitor.py")