update loading instructions
Browse files
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
|
| 41 |
-
|
| 42 |
-
|
| 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 |
+
```
|