Instructions to use google/electra-base-discriminator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/electra-base-discriminator with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForPreTraining tokenizer = AutoTokenizer.from_pretrained("google/electra-base-discriminator") model = AutoModelForPreTraining.from_pretrained("google/electra-base-discriminator", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Removed
#7
by anon-repair-bot - opened
README.md
CHANGED
|
@@ -32,5 +32,5 @@ predictions = torch.round((torch.sign(discriminator_outputs[0]) + 1) / 2)
|
|
| 32 |
|
| 33 |
[print("%7s" % token, end="") for token in fake_tokens]
|
| 34 |
|
| 35 |
-
[print("%7s" % int(
|
| 36 |
```
|
|
|
|
| 32 |
|
| 33 |
[print("%7s" % token, end="") for token in fake_tokens]
|
| 34 |
|
| 35 |
+
[print("%7s" % int(pred), end="") for pred in predictions[0]]
|
| 36 |
```
|