Update README.md
Browse files
README.md
CHANGED
|
@@ -5,8 +5,24 @@ datasets:
|
|
| 5 |
language:
|
| 6 |
- ar
|
| 7 |
---
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
# how to load the model
|
|
@@ -17,12 +33,14 @@ tokenizer = AutoTokenizer.from_pretrained("not-lain/TunBERT")
|
|
| 17 |
model = AutoModelForSequenceClassification.from_pretrained("not-lain/TunBERT",trust_remote_code=True)
|
| 18 |
```
|
| 19 |
|
| 20 |
-
**IMPORTANT** : make sure to enable `trust_remote_code=True`
|
| 21 |
-
|
| 22 |
|
| 23 |
# how to use the model
|
| 24 |
```python
|
| 25 |
text = "[insert text here]"
|
| 26 |
-
inputs = tokenizer(text,return_tensors='pt')
|
| 27 |
output = model(**inputs)
|
| 28 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
language:
|
| 6 |
- ar
|
| 7 |
---
|
| 8 |
+
|
| 9 |
+
This is a converted version of [Instadeep's](https://huggingface.co/InstaDeepAI) [TunBERT](https://github.com/instadeepai/tunbert/) from nemo to safetensors.
|
| 10 |
+
|
| 11 |
+
Make sure to read the original model [licence](https://github.com/instadeepai/tunbert/blob/main/LICENSE)
|
| 12 |
+
<details>
|
| 13 |
+
<summary>architectural changes </summary>
|
| 14 |
+
|
| 15 |
+
## original model head
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
## this model head
|
| 21 |
+
|
| 22 |
+

|
| 23 |
+
|
| 24 |
+
</details>
|
| 25 |
+
|
| 26 |
|
| 27 |
|
| 28 |
# how to load the model
|
|
|
|
| 33 |
model = AutoModelForSequenceClassification.from_pretrained("not-lain/TunBERT",trust_remote_code=True)
|
| 34 |
```
|
| 35 |
|
|
|
|
|
|
|
| 36 |
|
| 37 |
# how to use the model
|
| 38 |
```python
|
| 39 |
text = "[insert text here]"
|
| 40 |
+
inputs = tokenizer(text,return_tensors='pt')
|
| 41 |
output = model(**inputs)
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
**IMPORTANT** :
|
| 45 |
+
* Make sure to enable `trust_remote_code=True`
|
| 46 |
+
* Avoid using the pipeline method
|