Techpro864 commited on
Commit
6964783
·
verified ·
1 Parent(s): 4fdaa68

Add full model card

Browse files
Files changed (1) hide show
  1. README.md +91 -0
README.md CHANGED
@@ -1,3 +1,94 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ language:
4
+ - en
5
+ - multilingual
6
+ pipeline_tag: token-classification
7
+ tags:
8
+ - gliner
9
+ - ner
10
+ - token-classification
11
+ - social-media
12
+ - username-extraction
13
+ library_name: gliner
14
+ base_model: urchade/gliner_small-v2.1
15
  ---
16
+
17
+ # HandleAtlas-166m
18
+
19
+ A fine-tuned [GLiNER small v2.1](https://huggingface.co/urchade/gliner_small-v2.1) (~166M params)
20
+ for extracting social-media handles from short bios. Built on Twitter/X bios but the
21
+ patterns generalize to other platforms.
22
+
23
+ ## Labels
24
+
25
+ - `instagram_username`
26
+ - `snapchat_username`
27
+ - `youtube_username`
28
+ - `twitch_username`
29
+ - `tiktok_username`
30
+ - `discord_username`
31
+ - `x_username`
32
+ - `cashapp_username`
33
+ - `onlyfans_username`
34
+ - `tumblr_username`
35
+ - `github_username`
36
+ - `kofi_username`
37
+ - `patreon_username`
38
+ - `roblox_username`
39
+ - `generic_username`
40
+
41
+ `generic_username` is a fallback for handle-shaped strings without a clear platform
42
+ indicator.
43
+
44
+ ## Usage
45
+
46
+ ```python
47
+ from gliner import GLiNER
48
+
49
+ model = GLiNER.from_pretrained("LumeData/HandleAtlas-166m")
50
+
51
+ labels = ['instagram_username', 'snapchat_username', 'youtube_username', 'twitch_username', 'tiktok_username', 'discord_username', 'x_username', 'cashapp_username', 'onlyfans_username', 'tumblr_username', 'github_username', 'kofi_username', 'patreon_username', 'roblox_username', 'generic_username']
52
+
53
+ text = "Insta: foodgrammer | Snap: chefchef | DC: gamer420 | $cashtag"
54
+ for ent in model.predict_entities(text, labels, threshold=0.5):
55
+ print(f"{ent['text']!r} -> {ent['label']} ({ent['score']:.2f})")
56
+ ```
57
+
58
+ ## Training
59
+
60
+ - Base: `urchade/gliner_small-v2.1`
61
+ - Real data: ~1,000 hand-labeled Twitter bios
62
+ - Synthetic data: ~2,200 generated bios (template-based + IG→Discord text rewriting
63
+ for the discord_username class)
64
+ - Case augmentation: each training record is emitted in original + fully-lowercased
65
+ form so the model is robust to casing of platform prefixes (`Dc:`/`dc:`/`DC:` etc.)
66
+ - 5 epochs, batch 4 × grad-accum 2, lr 5e-6 (encoder) / 1e-5 (heads), cosine schedule
67
+
68
+ ## Eval
69
+
70
+ On a 100-record held-out slice of real Twitter bios:
71
+
72
+ | metric | value |
73
+ |-----------|-------|
74
+ | precision | 0.849 |
75
+ | recall | 0.929 |
76
+ | F1 | 0.887 |
77
+
78
+ Strong per-label F1 on instagram (0.95), youtube (1.00), tiktok (1.00), twitch (1.00),
79
+ onlyfans (1.00), generic (0.88), cashapp (0.86), snapchat (0.80).
80
+
81
+ ## Recommended thresholds
82
+
83
+ - Default: `threshold=0.5`
84
+ - For `generic_username`, bump to `0.65` to reduce false positives; it's the
85
+ catch-all label and over-fires at the default threshold.
86
+
87
+ ## Limitations
88
+
89
+ - Trained on patterns common in Twitter/X bios; performance on other domains
90
+ (LinkedIn-style, Reddit, forum sigs) will be lower.
91
+ - `discord_invite` is not predicted — invite codes will be classified as
92
+ `discord_username` or skipped.
93
+ - Multi-line bios with many handles can occasionally confuse adjacent URL labels
94
+ (e.g., `patreon.com/x | github.com/x` chains).