Downloads · 30 days
19
1% of all-time downloads
junnyu/roformer_small_discriminator
roformer_small_discriminator is a feature extraction model from junnyu. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as mit.
- 数据集 openwebtext - 训练batchsize 256 - 学习率lr 5e-4 - 最大句子长度maxseqlen 128 - 训练total step 50W - GPU RTX3090 - 训练时间总共耗费55h
Downloads · 30 days
19
1% of all-time downloads
All-time downloads
1.7K
Public
Repo size
108 MB
Likes
0
Public
Click a slice to open those files.
.bin53.8 MB · 100%
From the Hugging Face model README
| Model | CoLA | SST | MRPC | STS | QQP | MNLI | QNLI | RTE | Avg. |
|---|---|---|---|---|---|---|---|---|---|
| ELECTRA-Small-OWT(original) | 56.8 | 88.3 | 87.4 | 86.8 | 88.3 | 78.9 | 87.9 | 68.5 | 80.36 |
| ELECTRA-RoFormer-Small-OWT (this) | 55.76 | 90.45 | 87.3 | 86.64 | 89.61 | 81.17 | 88.85 | 62.71 | 80.31 |
import torch
from transformers import ElectraTokenizer,RoFormerModel
tokenizer = ElectraTokenizer.from_pretrained("junnyu/roformer_small_discriminator")
model = RoFormerModel.from_pretrained("junnyu/roformer_small_discriminator")
inputs = tokenizer("Beijing is the capital of China.", return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
print(outputs[0].shape)