File size: 799 Bytes
7d1a1d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
language:
- en
tags:
- openvino
---

# google-bert/bert-base-uncased

This is the [google-bert/bert-base-uncased](https://huggingface.co/google-bert/bert-base-uncased) model converted to [OpenVINO](https://openvino.ai), for accelerated inference.

An example of how to do inference on this model:
```python
from optimum.intel import OVModelForMaskedLM
from transformers import AutoTokenizer, pipeline

# model_id should be set to either a local directory or a model available on the HuggingFace hub.
model_id = "helenai/google-bert-bert-base-uncased-ov"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = OVModelForMaskedLM.from_pretrained(model_id)
pipe = pipeline("fill-mask", model=model, tokenizer=tokenizer)
result = pipe(f"I am a {tokenizer.mask_token} model")
print(result)
```