model-carving

KadenZheng

A Python research codebase for training Transformers that jointly optimize both their weights and sublayer network topology in one run.

PythonCreated

What is KadenZheng/model-carving?

model-carving is the official Python research codebase for "Model Carving: Training Transformers That Optimize Their Own Topology." It introduces a method to learn both a Transformer's weights and its architecture in a single training run.

By applying learnable gates to scale sublayers and connections during training, models prune and shape their own topology dynamically.

Deep learning researchers exploring neural architecture search, dynamic pruning, or efficient Transformer design can run the training scripts.