srimanth-d
commited on
Commit
•
b2f7974
1
Parent(s):
31f9720
Update README.md
Browse files
README.md
CHANGED
@@ -26,7 +26,7 @@ license: apache-2.0
|
|
26 |
|
27 |
|
28 |
## Usage
|
29 |
-
Inference using Huggingface transformers on
|
30 |
```
|
31 |
torch==2.0.1
|
32 |
torchvision==0.15.2
|
@@ -40,9 +40,9 @@ accelerate==0.28.0
|
|
40 |
```python
|
41 |
from transformers import AutoModel, AutoTokenizer
|
42 |
|
43 |
-
tokenizer = AutoTokenizer.from_pretrained('
|
44 |
-
model = AutoModel.from_pretrained('
|
45 |
-
model = model.eval()
|
46 |
|
47 |
|
48 |
# input your test image
|
|
|
26 |
|
27 |
|
28 |
## Usage
|
29 |
+
Inference using Huggingface transformers on CPU. Requirements tested on python 3.10:
|
30 |
```
|
31 |
torch==2.0.1
|
32 |
torchvision==0.15.2
|
|
|
40 |
```python
|
41 |
from transformers import AutoModel, AutoTokenizer
|
42 |
|
43 |
+
tokenizer = AutoTokenizer.from_pretrained('srimanth-d/GOT_CPU', trust_remote_code=True)
|
44 |
+
model = AutoModel.from_pretrained('srimanth-d/GOT_CPU', trust_remote_code=True, low_cpu_mem_usage=True, use_safetensors=True, pad_token_id=tokenizer.eos_token_id)
|
45 |
+
model = model.eval()
|
46 |
|
47 |
|
48 |
# input your test image
|