Instructions to use rcds/MiniLM-swiss_citation_extraction-de-fr-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rcds/MiniLM-swiss_citation_extraction-de-fr-it with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="rcds/MiniLM-swiss_citation_extraction-de-fr-it")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("rcds/MiniLM-swiss_citation_extraction-de-fr-it") model = AutoModelForTokenClassification.from_pretrained("rcds/MiniLM-swiss_citation_extraction-de-fr-it", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update config.json
Browse filesUpdated the label2id
- config.json +5 -5
config.json
CHANGED
|
@@ -19,11 +19,11 @@
|
|
| 19 |
"initializer_range": 0.02,
|
| 20 |
"intermediate_size": 1536,
|
| 21 |
"label2id": {
|
| 22 |
-
"
|
| 23 |
-
"
|
| 24 |
-
"
|
| 25 |
-
"
|
| 26 |
-
"
|
| 27 |
},
|
| 28 |
"layer_norm_eps": 1e-12,
|
| 29 |
"max_position_embeddings": 512,
|
|
|
|
| 19 |
"initializer_range": 0.02,
|
| 20 |
"intermediate_size": 1536,
|
| 21 |
"label2id": {
|
| 22 |
+
"0": 0,
|
| 23 |
+
"B-CITATION": 1,
|
| 24 |
+
"I-CITATION": 2,
|
| 25 |
+
"B-LAW": 3,
|
| 26 |
+
"I-LAW": 4
|
| 27 |
},
|
| 28 |
"layer_norm_eps": 1e-12,
|
| 29 |
"max_position_embeddings": 512,
|