Skip to content

Instantly share code, notes, and snippets.

import torch
import re
from einops import rearrange, repeat
from functools import lru_cache
import copy
import numpy as np
def isolate_patterns(p):
snippets = re.split(r"\[|\]", p)