echarlaix HF staff commited on
Commit
9b30774
·
1 Parent(s): 01e2dd7

update loading instructions

Browse files
Files changed (1) hide show
  1. README.md +5 -5
README.md CHANGED
@@ -35,10 +35,10 @@ The linear module **bert.encoder.layer.6.attention.self.key** falls back to fp32
35
  #### Load with optimum:
36
 
37
  ```python
38
- from optimum.intel.neural_compressor.quantization import IncQuantizedModelForSequenceClassification
39
- int8_model = IncQuantizedModelForSequenceClassification(
40
- 'Intel/MiniLM-L12-H384-uncased-mrpc-int8-static',
41
- )
42
  ```
43
 
44
  ### ONNX
@@ -62,4 +62,4 @@ The calibration dataloader is the eval dataloader. The calibration sampling size
62
  ```python
63
  from optimum.onnxruntime import ORTModelForSequenceClassification
64
  model = ORTModelForSequenceClassification.from_pretrained('Intel/MiniLM-L12-H384-uncased-mrpc-int8-static')
65
- ```
 
35
  #### Load with optimum:
36
 
37
  ```python
38
+ from optimum.intel import INCModelForSequenceClassification
39
+
40
+ model_id = "Intel/MiniLM-L12-H384-uncased-mrpc-int8-static"
41
+ int8_model = INCModelForSequenceClassification(model_id)
42
  ```
43
 
44
  ### ONNX
 
62
  ```python
63
  from optimum.onnxruntime import ORTModelForSequenceClassification
64
  model = ORTModelForSequenceClassification.from_pretrained('Intel/MiniLM-L12-H384-uncased-mrpc-int8-static')
65
+ ```