archinetai/surgeon-pytorch
A PyTorch utility for inspecting intermediate model layers and extracting subparts without modifying original model code.

Not currently ranked — collecting fresh signals.
star history
Surgeon-pytorch is a library that enables inspection and extraction of intermediate layers in PyTorch models. It wraps models to capture layer outputs during forward passes, supporting multiple layers, removal of subgraphs, and extraction of model branches for independent use. The tool facilitates debugging, visualization of embeddings, and analysis of attention matrices without requiring changes to the original model implementation.
Frequently asked
- What is archinetai/surgeon-pytorch?
- A PyTorch utility for inspecting intermediate model layers and extracting subparts without modifying original model code.
- Is surgeon-pytorch open source?
- Yes — archinetai/surgeon-pytorch is open source, released under the MIT license.
- What language is surgeon-pytorch written in?
- archinetai/surgeon-pytorch is primarily written in Python.
- How popular is surgeon-pytorch?
- archinetai/surgeon-pytorch has 474 stars on GitHub.
- Where can I find surgeon-pytorch?
- archinetai/surgeon-pytorch is on GitHub at https://github.com/archinetai/surgeon-pytorch.