Update README.md
Browse files
README.md
CHANGED
@@ -40,9 +40,12 @@ Here is how to use the model to extract features from the pre-trained backbone:
|
|
40 |
```python
|
41 |
import torch
|
42 |
from transformers import AutoModel
|
43 |
-
model = AutoModel.from_pretrained("vector-institute/atomformer-base",
|
|
|
44 |
|
45 |
-
input_ids
|
|
|
|
|
46 |
|
47 |
output = model(input_ids, coords=coords, attention_mask=attention_mask)
|
48 |
output[0].shape # (torch.Size([1, 10, 768])
|
|
|
40 |
```python
|
41 |
import torch
|
42 |
from transformers import AutoModel
|
43 |
+
model = AutoModel.from_pretrained("vector-institute/atomformer-base",
|
44 |
+
trust_remote_code=True)
|
45 |
|
46 |
+
input_ids = torch.randint(0, 50, (1, 10))
|
47 |
+
coords = torch.randn(1, 10, 3)
|
48 |
+
attn_mask = torch.ones(1, 10)
|
49 |
|
50 |
output = model(input_ids, coords=coords, attention_mask=attention_mask)
|
51 |
output[0].shape # (torch.Size([1, 10, 768])
|