KingKazma commited on
Commit
d6a4a77
1 Parent(s): cce4460

Add BERTopic model

Browse files
Files changed (4) hide show
  1. README.md +81 -0
  2. config.json +15 -0
  3. topic_embeddings.safetensors +3 -0
  4. topics.json +0 -0
README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ tags:
4
+ - bertopic
5
+ library_name: bertopic
6
+ pipeline_tag: text-classification
7
+ ---
8
+
9
+ # xsum_108_5000000_2500000_test
10
+
11
+ This is a [BERTopic](https://github.com/MaartenGr/BERTopic) model.
12
+ BERTopic is a flexible and modular topic modeling framework that allows for the generation of easily interpretable topics from large datasets.
13
+
14
+ ## Usage
15
+
16
+ To use this model, please install BERTopic:
17
+
18
+ ```
19
+ pip install -U bertopic
20
+ ```
21
+
22
+ You can use the model as follows:
23
+
24
+ ```python
25
+ from bertopic import BERTopic
26
+ topic_model = BERTopic.load("KingKazma/xsum_108_5000000_2500000_test")
27
+
28
+ topic_model.get_topic_info()
29
+ ```
30
+
31
+ ## Topic overview
32
+
33
+ * Number of topics: 14
34
+ * Number of training documents: 11334
35
+
36
+ <details>
37
+ <summary>Click here for an overview of all topics.</summary>
38
+
39
+ | Topic ID | Topic Keywords | Topic Frequency | Label |
40
+ |----------|----------------|-----------------|-------|
41
+ | -1 | said - win - first - one - time | 13 | -1_said_win_first_one |
42
+ | 0 | said - mr - would - people - also | 1003 | 0_said_mr_would_people |
43
+ | 1 | win - game - league - goal - right | 7868 | 1_win_game_league_goal |
44
+ | 2 | race - olympic - sport - gold - team | 1707 | 2_race_olympic_sport_gold |
45
+ | 3 | england - cricket - wicket - test - captain | 225 | 3_england_cricket_wicket_test |
46
+ | 4 | race - hamilton - mercedes - f1 - lap | 192 | 4_race_hamilton_mercedes_f1 |
47
+ | 5 | match - murray - konta - seed - set | 62 | 5_match_murray_konta_seed |
48
+ | 6 | round - birdie - shot - par - bogey | 59 | 6_round_birdie_shot_par |
49
+ | 7 | fight - boxing - champion - ali - title | 49 | 7_fight_boxing_champion_ali |
50
+ | 8 | yn - ar - ei - yr - wedi | 48 | 8_yn_ar_ei_yr |
51
+ | 9 | unsupported - updated - playback - media - device | 33 | 9_unsupported_updated_playback_media |
52
+ | 10 | world - champion - osullivan - event - snooker | 29 | 10_world_champion_osullivan_event |
53
+ | 11 | fifa - blatter - football - platini - fifas | 25 | 11_fifa_blatter_football_platini |
54
+ | 12 | ebola - sierra - leone - outbreak - people | 21 | 12_ebola_sierra_leone_outbreak |
55
+
56
+ </details>
57
+
58
+ ## Training hyperparameters
59
+
60
+ * calculate_probabilities: True
61
+ * language: english
62
+ * low_memory: False
63
+ * min_topic_size: 10
64
+ * n_gram_range: (1, 1)
65
+ * nr_topics: None
66
+ * seed_topic_list: None
67
+ * top_n_words: 10
68
+ * verbose: False
69
+
70
+ ## Framework versions
71
+
72
+ * Numpy: 1.22.4
73
+ * HDBSCAN: 0.8.33
74
+ * UMAP: 0.5.3
75
+ * Pandas: 1.5.3
76
+ * Scikit-Learn: 1.2.2
77
+ * Sentence-transformers: 2.2.2
78
+ * Transformers: 4.31.0
79
+ * Numba: 0.57.1
80
+ * Plotly: 5.13.1
81
+ * Python: 3.10.12
config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "calculate_probabilities": true,
3
+ "language": "english",
4
+ "low_memory": false,
5
+ "min_topic_size": 10,
6
+ "n_gram_range": [
7
+ 1,
8
+ 1
9
+ ],
10
+ "nr_topics": null,
11
+ "seed_topic_list": null,
12
+ "top_n_words": 10,
13
+ "verbose": false,
14
+ "embedding_model": "sentence-transformers/all-MiniLM-L6-v2"
15
+ }
topic_embeddings.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7066515e4043182de69ef1cd986471c942834086630432a3406944084e4acf91
3
+ size 21592
topics.json ADDED
The diff for this file is too large to render. See raw diff