Instructions to use MultiBertGunjanPatrick/multiberts-seed-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MultiBertGunjanPatrick/multiberts-seed-2 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForPreTraining tokenizer = AutoTokenizer.from_pretrained("MultiBertGunjanPatrick/multiberts-seed-2") model = AutoModelForPreTraining.from_pretrained("MultiBertGunjanPatrick/multiberts-seed-2") - Notebooks
- Google Colab
- Kaggle
Commit ·
37c103e
1
Parent(s): 491bad1
Add README.md
Browse files
README.md
CHANGED
|
@@ -42,8 +42,8 @@ generation you should look at model like GPT2.
|
|
| 42 |
Here is how to use this model to get the features of a given text in PyTorch:
|
| 43 |
```python
|
| 44 |
from transformers import BertTokenizer, BertModel
|
| 45 |
-
tokenizer = BertTokenizer.from_pretrained('
|
| 46 |
-
model = BertModel.from_pretrained("
|
| 47 |
text = "Replace me by any text you'd like."
|
| 48 |
encoded_input = tokenizer(text, return_tensors='pt')
|
| 49 |
output = model(**encoded_input)
|
|
|
|
| 42 |
Here is how to use this model to get the features of a given text in PyTorch:
|
| 43 |
```python
|
| 44 |
from transformers import BertTokenizer, BertModel
|
| 45 |
+
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
|
| 46 |
+
model = BertModel.from_pretrained("multiberts-seed-2")
|
| 47 |
text = "Replace me by any text you'd like."
|
| 48 |
encoded_input = tokenizer(text, return_tensors='pt')
|
| 49 |
output = model(**encoded_input)
|