dariast commited on
Commit
c41ccfc
·
verified ·
1 Parent(s): 6583ff8

Add usage instructions

Browse files
Files changed (1) hide show
  1. README.md +31 -0
README.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Span Identification Adapter
2
+
3
+ This adapter was trained for span identification in Ukrainian news text.
4
+
5
+ ## Usage
6
+
7
+ ```python
8
+ from adapters import AutoAdapterModel
9
+
10
+ # Load base model
11
+ model = AutoAdapterModel.from_pretrained("xlm-roberta-base")
12
+
13
+ # Load this adapter
14
+ adapter_name = model.load_adapter("dariast/span-identification-adapter", source="hf")
15
+
16
+ # Add classification head (if not already present)
17
+ model.add_tagging_head(
18
+ adapter_name,
19
+ num_labels=2,
20
+ id2label={0: "NON-SPAN", 1: "SPAN"}
21
+ )
22
+
23
+ # Activate adapter
24
+ model.set_active_adapters(adapter_name)
25
+ ```
26
+
27
+ ## Performance
28
+
29
+ - Best F1 Score: 0.5849
30
+ - From 5-fold cross-validation
31
+ - Trained on Ukrainian news span identification task