Skip to content

Commit 2ea3a02

Browse files
committed
Fix scripts
1 parent 45968e4 commit 2ea3a02

2 files changed

Lines changed: 44 additions & 1 deletion

File tree

eval/download_models.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,21 @@
1616
DEEPSEEK_CODER_33B_MODEL,
1717
)
1818

19+
MRI_MODELS = [
20+
CODEGEMMA_7B_MODEL,
21+
STARCODER_2_7B_MODEL,
22+
DEEPSEEK_CODER_1B_MODEL,
23+
DEEPSEEK_CODER_7B_MODEL,
24+
DEEPSEEK_CODER_33B_MODEL,
25+
]
26+
27+
DLLM_MODELS = [
28+
LLADA_MODEL_NAME,
29+
DIFFU_CODER_MODEL_NAME,
30+
DREAM_CODER_MODEL_NAME,
31+
DREAM_MODEL_NAME,
32+
]
33+
1934

2035
def main():
2136
# Default models
@@ -39,10 +54,14 @@ def main():
3954
"--models",
4055
type=str,
4156
default=",".join(default_models),
42-
help=f"Comma-separated list of model names to load.\nDefault: {','.join(default_models)}",
57+
help=f"Comma-separated list of model names to load.\nDefault: {','.join(default_models)}.",
4358
)
4459
args = parser.parse_args()
4560
models = args.models.split(",")
61+
if "mri" in models:
62+
models = MRI_MODELS
63+
elif "dllm" in models:
64+
models = DLLM_MODELS
4665

4766
# Load models
4867
for model in models:

install_datacrunch.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
set -ex
2+
3+
sudo apt update -y
4+
sudo apt install python3-pip python3-venv git wget -y # nvitop
5+
python3 -m venv ~/venv
6+
source ~/venv/bin/activate
7+
# set up huggingface
8+
pip install -U "huggingface_hub[cli]"
9+
huggingface-cli login --add-to-git-credential
10+
11+
# set up typesafe_llm
12+
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N "" || echo "SSH key already exists"
13+
cat ~/.ssh/id_ed25519.pub
14+
echo "Add the above SSH key to your GitLab account at"
15+
echo "https://gitlab.inf.ethz.ch/-/user_settings/ssh_keys"
16+
read -n 1 -p "Press Enter after adding the SSH key to continue..."
17+
git clone git@gitlab.inf.ethz.ch:nmuendler/diffusion_constraint.git
18+
cd diffusion_constraint
19+
bash install_rust.sh
20+
. "$HOME/.cargo/env"
21+
pip install -r requirements.txt
22+
echo "Restart the shell again to complete the installation"
23+
24+
echo "export HF_HUB=/ephemeral/hub" >> "$HOME/.bashrc"

0 commit comments

Comments
 (0)