This file contains hidden or 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
| # Make sure to add your SSH key to your RunPod account | |
| echo "export HF_HOME=/workspace/hf_home/" >> ~/.bashrc | |
| apt-get update | |
| apt-get upgrade -y | |
| apt-get install -y sudo git vim ssh net-tools htop curl zip unzip tmux rsync libopenmpi-dev iputils-ping make fzf restic ripgrep wget pandoc poppler-utils pigz bzip2 nano locales | |
| pip install uv | |
| # Alternative: curl -LsSf https://astral.sh/uv/install.sh | sh | |
| uv pip install --system --compile-bytecode ipykernel kaleido nbformat numpy scipy scikit-learn scikit-image transformers datasets torchvision pandas matplotlib seaborn plotly jaxtyping einops tqdm ruff basedpyright umap-learn ipywidgets virtualenv pytest git+https://github.com/callummcdougall/eindex.git transformer_lens nnsight | |
| apt-get install -y libnss3 libatk-bridge2.0-0 libcups2 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libxkbcommon0 libpango-1.0-0 libcairo2 libasound2 | |
| # Optional: |
This file contains hidden or 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
| # 1.py (Figure 1 is a zoom into one panel of Figure 3/4) | |
| import os | |
| import random | |
| from collections import defaultdict | |
| from collections.abc import Callable | |
| from dataclasses import dataclass | |
| import matplotlib | |
| import matplotlib.pyplot as plt |
This file contains hidden or 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
| import itertools | |
| import matplotlib as mpl | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| import plotly.graph_objects as go | |
| import torch | |
| import torch.nn as nn | |
| import torch.optim as optim | |
| from jaxtyping import Float |
This file contains hidden or 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
| import math | |
| import os | |
| from abc import abstractmethod | |
| from collections import defaultdict | |
| from functools import partial | |
| from typing import Optional | |
| import joblib | |
| import numpy as np | |
| import sae_bench.custom_saes.base_sae as base_sae |