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
switch automodel for automodelforseqclass
Browse files
README.md
CHANGED
|
@@ -71,7 +71,7 @@ EmCoder uses the `ModernBERT` tokenizer for correct token-to-embedding mapping.
|
|
| 71 |
Ensure you allow remote code execution since it's a custom architecture.
|
| 72 |
```python
|
| 73 |
import torch
|
| 74 |
-
from transformers import
|
| 75 |
|
| 76 |
repo_id = "yezdata/EmCoder"
|
| 77 |
|
|
@@ -79,7 +79,7 @@ repo_id = "yezdata/EmCoder"
|
|
| 79 |
tokenizer = AutoTokenizer.from_pretrained("answerdotai/ModernBERT-base")
|
| 80 |
|
| 81 |
# Initialize with same config as training
|
| 82 |
-
model =
|
| 83 |
```
|
| 84 |
### 2. Bayesian inference
|
| 85 |
To obtain probabilistic outputs and uncertainty metrics, use the `mc_forward` method:
|
|
|
|
| 71 |
Ensure you allow remote code execution since it's a custom architecture.
|
| 72 |
```python
|
| 73 |
import torch
|
| 74 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 75 |
|
| 76 |
repo_id = "yezdata/EmCoder"
|
| 77 |
|
|
|
|
| 79 |
tokenizer = AutoTokenizer.from_pretrained("answerdotai/ModernBERT-base")
|
| 80 |
|
| 81 |
# Initialize with same config as training
|
| 82 |
+
model = AutoModelForSequenceClassification.from_pretrained(repo_id, trust_remote_code=True)
|
| 83 |
```
|
| 84 |
### 2. Bayesian inference
|
| 85 |
To obtain probabilistic outputs and uncertainty metrics, use the `mc_forward` method:
|