Instructions to use mirth/chonky_modernbert_base_1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mirth/chonky_modernbert_base_1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="mirth/chonky_modernbert_base_1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("mirth/chonky_modernbert_base_1") model = AutoModelForTokenClassification.from_pretrained("mirth/chonky_modernbert_base_1", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -31,10 +31,10 @@ I've made a small python library for this model: [chonky](https://github.com/mir
|
|
| 31 |
Here is the usage:
|
| 32 |
|
| 33 |
```
|
| 34 |
-
from chonky import
|
| 35 |
|
| 36 |
# on the first run it will download the transformer model
|
| 37 |
-
splitter =
|
| 38 |
model_id="mirth/chonky_modernbert_base_1",
|
| 39 |
device="cpu"
|
| 40 |
)
|
|
|
|
| 31 |
Here is the usage:
|
| 32 |
|
| 33 |
```
|
| 34 |
+
from chonky import ParagraphSplitter
|
| 35 |
|
| 36 |
# on the first run it will download the transformer model
|
| 37 |
+
splitter = ParagraphSplitter(
|
| 38 |
model_id="mirth/chonky_modernbert_base_1",
|
| 39 |
device="cpu"
|
| 40 |
)
|