Skip to content

Commit

Permalink
Rename WrappedGPT to WandaGPT
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-tuli committed Dec 1, 2023
1 parent b8d4dff commit 563efd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import torch
from torch.nn import Module

from sparseml.modifiers.pruning.wanda.utils.wrapped_gpt import WrappedGPT
from sparseml.modifiers.pruning.wanda.utils.wrapped_gpt import WandaGPT
from sparseml.pytorch.utils.helpers import get_dependency_order
from sparseml.utils.pytorch.module import get_prunable_layers

Expand Down Expand Up @@ -76,7 +76,7 @@ def pre_compress_parallel(self, **kwargs) -> Dict:

gpts = {}
for name in subset:
gpts[name] = WrappedGPT(subset[name])
gpts[name] = WandaGPT(subset[name])

def add_batch(name):
def tmp(_, inp, out):
Expand Down Expand Up @@ -167,7 +167,7 @@ def sequentially_compress(self, **kwargs):

nsamples = len(self.inputs)
for name in order: # create WrappedGPT object for each compressible module
gpts = WrappedGPT(subset[name])
gpts = WandaGPT(subset[name])

def add_batch(name):
def tmp(_, inp, out):
Expand Down
4 changes: 2 additions & 2 deletions src/sparseml/modifiers/pruning/wanda/utils/wrapped_gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
transformers = None
transformers_err = err

__all__ = ["WrappedGPT"]
__all__ = ["WandaGPT"]


DEBUG = False
Expand All @@ -35,7 +35,7 @@
torch.backends.cudnn.allow_tf32 = False


class WrappedGPT:
class WandaGPT:
"""
Runs Wanda on a single module that contains no sub-modules
Expand Down

0 comments on commit 563efd7

Please sign in to comment.