echarlaix HF staff commited on
Commit
c07b4ad
1 Parent(s): 8dc66f1

update loading instructions

Browse files
Files changed (1) hide show
  1. README.md +5 -5
README.md CHANGED
@@ -37,10 +37,10 @@ The linear module **bert.encoder.layer.9.output.dense** falls back to fp32 to me
37
  #### Load with Intel® Neural Compressor:
38
 
39
  ```python
40
- from optimum.intel.neural_compressor import IncQuantizedModelForSequenceClassification
41
- int8_model = IncQuantizedModelForSequenceClassification.from_pretrained(
42
- 'Intel/bert-base-uncased-mrpc-int8-static',
43
- )
44
  ```
45
 
46
  ### ONNX
@@ -65,4 +65,4 @@ The calibration dataloader is the eval dataloader. The calibration sampling size
65
  ```python
66
  from optimum.onnxruntime import ORTModelForSequenceClassification
67
  model = ORTModelForSequenceClassification.from_pretrained('Intel/bert-base-uncased-mrpc-int8-static')
68
- ```
 
37
  #### Load with Intel® Neural Compressor:
38
 
39
  ```python
40
+ from optimum.intel import INCModelForSequenceClassification
41
+
42
+ model_id = "Intel/bert-base-uncased-mrpc-int8-static"
43
+ int8_model = INCModelForSequenceClassification.from_pretrained(model_id)
44
  ```
45
 
46
  ### ONNX
 
65
  ```python
66
  from optimum.onnxruntime import ORTModelForSequenceClassification
67
  model = ORTModelForSequenceClassification.from_pretrained('Intel/bert-base-uncased-mrpc-int8-static')
68
+ ```