Instructions to use google/electra-small-discriminator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/electra-small-discriminator with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForPreTraining tokenizer = AutoTokenizer.from_pretrained("google/electra-small-discriminator") model = AutoModelForPreTraining.from_pretrained("google/electra-small-discriminator") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse filesCo-authored-by: david-waterworth
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(prediction), end="") for prediction in predictions.tolist()]
|
| 36 |
```
|
|
|
|
| 32 |
|
| 33 |
[print("%7s" % token, end="") for token in fake_tokens]
|
| 34 |
|
| 35 |
+
[print("%7s" % int(prediction), end="") for prediction in predictions.squeeze().tolist()]
|
| 36 |
```
|