├── .gitignore ├── LICENSE ├── README.md ├── configs ├── channel_mixers │ ├── mlp_hyena_x.yaml │ ├── mlp_ratio_3.yaml │ ├── mlp_ratio_4.yaml │ └── mlp_ratio_6.yaml ├── sampling │ ├── mha_swaps │ │ ├── 50p_hyena_y.yaml │ │ ├── 50p_mamba2.yaml │ │ └── 50p_swa.yaml │ └── mlp_swaps │ │ ├── 50p_mlp_ratio_3.yaml │ │ └── 50p_mlp_ratio_hyena_x.yaml └── sequence_mixers │ ├── hyena_se.yaml │ ├── hyena_x.yaml │ ├── hyena_y.yaml │ ├── mamba2.yaml │ ├── mha_timm.yaml │ └── swa.yaml ├── demo_notebooks ├── demo_configs │ ├── 50p_hyena_y.yaml │ └── 50p_swa.yaml ├── grafting_demo.ipynb ├── sample_hyena_y.png └── sample_swa.png ├── requirements.txt └── src ├── diffusion ├── __init__.py ├── diffusion_utils.py ├── gaussian_diffusion.py ├── respace.py └── timestep_sampler.py ├── graft.py ├── models ├── dit.py └── download.py ├── operators ├── hyena │ ├── hyena_se.py │ ├── hyena_x.py │ └── hyena_y.py └── mlp │ └── mlp_hyena_x.py ├── replacement_factory.py ├── sample.py └── utils.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/README.md -------------------------------------------------------------------------------- /configs/channel_mixers/mlp_hyena_x.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/channel_mixers/mlp_hyena_x.yaml -------------------------------------------------------------------------------- /configs/channel_mixers/mlp_ratio_3.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/channel_mixers/mlp_ratio_3.yaml -------------------------------------------------------------------------------- /configs/channel_mixers/mlp_ratio_4.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/channel_mixers/mlp_ratio_4.yaml -------------------------------------------------------------------------------- /configs/channel_mixers/mlp_ratio_6.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/channel_mixers/mlp_ratio_6.yaml -------------------------------------------------------------------------------- /configs/sampling/mha_swaps/50p_hyena_y.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/sampling/mha_swaps/50p_hyena_y.yaml -------------------------------------------------------------------------------- /configs/sampling/mha_swaps/50p_mamba2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/sampling/mha_swaps/50p_mamba2.yaml -------------------------------------------------------------------------------- /configs/sampling/mha_swaps/50p_swa.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/sampling/mha_swaps/50p_swa.yaml -------------------------------------------------------------------------------- /configs/sampling/mlp_swaps/50p_mlp_ratio_3.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/sampling/mlp_swaps/50p_mlp_ratio_3.yaml -------------------------------------------------------------------------------- /configs/sampling/mlp_swaps/50p_mlp_ratio_hyena_x.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/sampling/mlp_swaps/50p_mlp_ratio_hyena_x.yaml -------------------------------------------------------------------------------- /configs/sequence_mixers/hyena_se.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/sequence_mixers/hyena_se.yaml -------------------------------------------------------------------------------- /configs/sequence_mixers/hyena_x.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/sequence_mixers/hyena_x.yaml -------------------------------------------------------------------------------- /configs/sequence_mixers/hyena_y.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/sequence_mixers/hyena_y.yaml -------------------------------------------------------------------------------- /configs/sequence_mixers/mamba2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/sequence_mixers/mamba2.yaml -------------------------------------------------------------------------------- /configs/sequence_mixers/mha_timm.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/sequence_mixers/mha_timm.yaml -------------------------------------------------------------------------------- /configs/sequence_mixers/swa.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/configs/sequence_mixers/swa.yaml -------------------------------------------------------------------------------- /demo_notebooks/demo_configs/50p_hyena_y.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/demo_notebooks/demo_configs/50p_hyena_y.yaml -------------------------------------------------------------------------------- /demo_notebooks/demo_configs/50p_swa.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/demo_notebooks/demo_configs/50p_swa.yaml -------------------------------------------------------------------------------- /demo_notebooks/grafting_demo.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/demo_notebooks/grafting_demo.ipynb -------------------------------------------------------------------------------- /demo_notebooks/sample_hyena_y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/demo_notebooks/sample_hyena_y.png -------------------------------------------------------------------------------- /demo_notebooks/sample_swa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/demo_notebooks/sample_swa.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/requirements.txt -------------------------------------------------------------------------------- /src/diffusion/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/diffusion/__init__.py -------------------------------------------------------------------------------- /src/diffusion/diffusion_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/diffusion/diffusion_utils.py -------------------------------------------------------------------------------- /src/diffusion/gaussian_diffusion.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/diffusion/gaussian_diffusion.py -------------------------------------------------------------------------------- /src/diffusion/respace.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/diffusion/respace.py -------------------------------------------------------------------------------- /src/diffusion/timestep_sampler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/diffusion/timestep_sampler.py -------------------------------------------------------------------------------- /src/graft.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/graft.py -------------------------------------------------------------------------------- /src/models/dit.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/models/dit.py -------------------------------------------------------------------------------- /src/models/download.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/models/download.py -------------------------------------------------------------------------------- /src/operators/hyena/hyena_se.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/operators/hyena/hyena_se.py -------------------------------------------------------------------------------- /src/operators/hyena/hyena_x.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/operators/hyena/hyena_x.py -------------------------------------------------------------------------------- /src/operators/hyena/hyena_y.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/operators/hyena/hyena_y.py -------------------------------------------------------------------------------- /src/operators/mlp/mlp_hyena_x.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/operators/mlp/mlp_hyena_x.py -------------------------------------------------------------------------------- /src/replacement_factory.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/replacement_factory.py -------------------------------------------------------------------------------- /src/sample.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/sample.py -------------------------------------------------------------------------------- /src/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keshik6/grafting/HEAD/src/utils.py --------------------------------------------------------------------------------