Skip to content
Merged
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
9 changes: 5 additions & 4 deletions tests/test_calibration_data_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@
"""

import os
import types
import unittest

import pytest
import torch
import torch.nn as nn

import types
import unittest
from gptqmodel.models.base import BaseQModel
from gptqmodel.quantization import QuantizeConfig

Expand Down Expand Up @@ -210,6 +208,7 @@ class FakeGPTQModel:
move_input_capture_example = BaseQModel.move_input_capture_example
prepare_layer_replay_kwargs = BaseQModel.prepare_layer_replay_kwargs
run_input_capture = BaseQModel.run_input_capture
_sanitize_input_ids_for_embeddings = BaseQModel._sanitize_input_ids_for_embeddings

def __init__(self):
self.quantize_config = types.SimpleNamespace(
Expand Down Expand Up @@ -355,6 +354,7 @@ class FakeGPTQModel:
move_input_capture_example = BaseQModel.move_input_capture_example
prepare_layer_replay_kwargs = BaseQModel.prepare_layer_replay_kwargs
run_input_capture = BaseQModel.run_input_capture
_sanitize_input_ids_for_embeddings = BaseQModel._sanitize_input_ids_for_embeddings

def __init__(self):
self.quantize_config = types.SimpleNamespace(
Expand Down Expand Up @@ -509,6 +509,7 @@ class FakeGPTQModel:
move_input_capture_example = BaseQModel.move_input_capture_example
prepare_layer_replay_kwargs = BaseQModel.prepare_layer_replay_kwargs
run_input_capture = BaseQModel.run_input_capture
_sanitize_input_ids_for_embeddings = BaseQModel._sanitize_input_ids_for_embeddings

def __init__(self):
self.quantize_config = types.SimpleNamespace(
Expand Down