Skip to content

Commit

Permalink
Fix: local variable 'dataset' referenced before assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyouga authored Dec 15, 2023
1 parent 7376c6a commit 6384ab5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions optimum/gptq/quantizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ def quantize_model(self, model: nn.Module, tokenizer: Optional[Any] = None):

# Step 1: Prepare the data
if isinstance(self.dataset, list) and not isinstance(self.dataset[0], str):
dataset = self.dataset
logger.info("GPTQQuantizer dataset appears to be already tokenized. Skipping tokenization.")
else:
if isinstance(tokenizer, str):
Expand Down

0 comments on commit 6384ab5

Please sign in to comment.