Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 0 additions & 167 deletions models/custom_autotune.py

This file was deleted.

17 changes: 14 additions & 3 deletions models/modeling_moss.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,17 @@ def _reorder_cache(
)

def quantize(self, wbits, groupsize):
from .quantization import quantize_with_gptq
return quantize_with_gptq(self, wbits, groupsize)

from auto_gptq.modeling._utils import make_quant, find_layers
try:
import triton
use_triton = True
except ImportError:
use_triton = False

layers = find_layers(self)
for name in ["lm_head"]:
if name in layers:
del layers[name]
make_quant(self, layers, wbits, groupsize, use_triton=use_triton)

return self
Loading