Text Classification
Transformers
Safetensors
English
emcoder
emotion-recognition
bayesian-deep-learning
mc-dropout
uncertainty-quantification
multi-label-classification
custom_code
Eval Results (legacy)
Instructions to use yezdata/EmCoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yezdata/EmCoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="yezdata/EmCoder", trust_remote_code=True)# Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("yezdata/EmCoder", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Delete configuration_emcoder.py
Browse files- configuration_emcoder.py +0 -34
configuration_emcoder.py
DELETED
|
@@ -1,34 +0,0 @@
|
|
| 1 |
-
from transformers import PretrainedConfig
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
class EmCoderConfig(PretrainedConfig):
|
| 5 |
-
model_type = "emcoder"
|
| 6 |
-
|
| 7 |
-
def __init__(
|
| 8 |
-
self,
|
| 9 |
-
vocab_size=50265,
|
| 10 |
-
max_seq_len=512,
|
| 11 |
-
d_model=768,
|
| 12 |
-
n_head=12,
|
| 13 |
-
n_layers=6,
|
| 14 |
-
d_ffn=3072,
|
| 15 |
-
dropout=0.1,
|
| 16 |
-
num_labels=28,
|
| 17 |
-
base_encoder_path="",
|
| 18 |
-
id2label=None,
|
| 19 |
-
label2id=None,
|
| 20 |
-
**kwargs,
|
| 21 |
-
):
|
| 22 |
-
if id2label is not None:
|
| 23 |
-
id2label = {int(k): v for k, v in id2label.items()}
|
| 24 |
-
|
| 25 |
-
super().__init__(id2label=id2label, label2id=label2id, **kwargs)
|
| 26 |
-
self.vocab_size = vocab_size
|
| 27 |
-
self.max_seq_len = max_seq_len
|
| 28 |
-
self.d_model = d_model
|
| 29 |
-
self.n_head = n_head
|
| 30 |
-
self.n_layers = n_layers
|
| 31 |
-
self.d_ffn = d_ffn
|
| 32 |
-
self.dropout = dropout
|
| 33 |
-
self.num_labels = num_labels
|
| 34 |
-
self.base_encoder_path = base_encoder_path
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|