Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
echarlaix committed Nov 3, 2023
1 parent 19c521b commit 1929178
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions optimum/intel/neural_compressor/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ def __init__(
task: Optional[str] = None,
save_onnx_model: bool = False,
):
self.neftune_noise_alpha = None

super().__init__(
model,
args,
Expand Down
2 changes: 2 additions & 0 deletions optimum/intel/openvino/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ def __init__(
task: Optional[str] = None,
feature: Optional[str] = None,
):
self.neftune_noise_alpha = None

super().__init__(
model,
args,
Expand Down
2 changes: 1 addition & 1 deletion tests/neural_compressor/test_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_static_quantization(self, task, model_name, expected_quantized_matmuls)
tokenizer.pad_token = tokenizer.eos_token
quantizer = INCQuantizer.from_pretrained(model, task=task)
calibration_dataset = _generate_dataset(quantizer, tokenizer, num_samples=num_samples)
save_onnx_model = True
save_onnx_model = False
op_type_dict = (
{"Embedding": {"weight": {"dtype": ["fp32"]}, "activation": {"dtype": ["fp32"]}}}
if save_onnx_model
Expand Down

0 comments on commit 1929178

Please sign in to comment.