Update README.md
Browse files
README.md
CHANGED
@@ -13,7 +13,7 @@ metrics:
|
|
13 |
- f1
|
14 |
- worst_group_accuracy
|
15 |
model-index:
|
16 |
-
- name: davanstrien/
|
17 |
results:
|
18 |
- task:
|
19 |
type: text-classification
|
@@ -157,7 +157,7 @@ Example usage:
|
|
157 |
# Use a pipeline as a high-level helper
|
158 |
from transformers import pipeline
|
159 |
|
160 |
-
pipe = pipeline("text-classification", model="davanstrien/
|
161 |
|
162 |
# direct use
|
163 |
|
@@ -165,7 +165,7 @@ from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
|
165 |
import torch
|
166 |
|
167 |
# Load model and tokenizer
|
168 |
-
model_name = "davanstrien/
|
169 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
170 |
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
171 |
|
@@ -199,7 +199,7 @@ import torch
|
|
199 |
import torch.nn.functional as F
|
200 |
|
201 |
# Load the model with vLLM
|
202 |
-
llm = LLM(model="davanstrien/
|
203 |
|
204 |
# Single prediction
|
205 |
text = "This article discusses various approaches to content categorization using machine learning"
|
@@ -219,7 +219,7 @@ from toolz import keymap
|
|
219 |
id2label = (
|
220 |
httpx.get(
|
221 |
hf_hub_url(
|
222 |
-
"davanstrien/
|
223 |
filename="config.json"
|
224 |
)
|
225 |
)
|
|
|
13 |
- f1
|
14 |
- worst_group_accuracy
|
15 |
model-index:
|
16 |
+
- name: davanstrien/ModernBERT-web-topics-1m
|
17 |
results:
|
18 |
- task:
|
19 |
type: text-classification
|
|
|
157 |
# Use a pipeline as a high-level helper
|
158 |
from transformers import pipeline
|
159 |
|
160 |
+
pipe = pipeline("text-classification", model="davanstrien/ModernBERT-web-topics-1m")
|
161 |
|
162 |
# direct use
|
163 |
|
|
|
165 |
import torch
|
166 |
|
167 |
# Load model and tokenizer
|
168 |
+
model_name = "davanstrien/ModernBERT-web-topics-1m"
|
169 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
170 |
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
171 |
|
|
|
199 |
import torch.nn.functional as F
|
200 |
|
201 |
# Load the model with vLLM
|
202 |
+
llm = LLM(model="davanstrien/ModernBERT-web-topics-1m", task="classify")
|
203 |
|
204 |
# Single prediction
|
205 |
text = "This article discusses various approaches to content categorization using machine learning"
|
|
|
219 |
id2label = (
|
220 |
httpx.get(
|
221 |
hf_hub_url(
|
222 |
+
"davanstrien/ModernBERT-web-topics-1m",
|
223 |
filename="config.json"
|
224 |
)
|
225 |
)
|