Run this model with HF Jobs
Run aaa961/rag-topic-model on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/aaa961/rag-topic-model. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/aaa961/rag-topic-model on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use aaa961/rag-topic-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- BERTopic
How to use aaa961/rag-topic-model with BERTopic:
from bertopic import BERTopic model = BERTopic.load("aaa961/rag-topic-model") - Notebooks
- Google Colab
- Kaggle
Add BERTopic model
Browse filesFiles changed (4)
- README.mdAdded+75
- config.jsonAdded+16
- topic_embeddings.safetensorsAdded+3
- topics.jsonAdded+483
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
---
tags:
- bertopic
library_name: bertopic
pipeline_tag: text-classification
---
# rag-topic-model
This is a [BERTopic](https://github.com/MaartenGr/BERTopic) model.
BERTopic is a flexible and modular topic modeling framework that allows for the generation of easily interpretable topics from large datasets.
## Usage
To use this model, please install BERTopic:
```
pip install -U bertopic
```
You can use the model as follows:
```python
from bertopic import BERTopic
topic_model = BERTopic.load("aaa961/rag-topic-model")
topic_model.get_topic_info()
```
## Topic overview
* Number of topics: 6
* Number of training documents: 168
<details>
<summary>Click here for an overview of all topics.</summary>
| Topic ID | Topic Keywords | Topic Frequency | Label |
|----------|----------------|-----------------|-------|
| -1 | to - my - klarna - for - the | 12 | -1_to_my_klarna_for |
| 0 | klarna - my - declined - in - for | 62 | 0_klarna_my_declined_in |
| 1 | my - details - klarna - and - call | 34 | 1_my_details_klarna_and |
| 2 | the - payment - for - to - pay | 24 | 2_the_payment_for_to |
| 3 | the - store - it - for - ago | 19 | 3_the_store_it_for |
| 4 | the - ago - sneakers - and - shoes | 17 | 4_the_ago_sneakers_and |
</details>
## Training hyperparameters
* calculate_probabilities: False
* language: None
* low_memory: False
* min_topic_size: 10
* n_gram_range: (1, 1)
* nr_topics: auto
* seed_topic_list: None
* top_n_words: 10
* verbose: False
* zeroshot_min_similarity: 0.7
* zeroshot_topic_list: None
## Framework versions
* Numpy: 1.26.4
* HDBSCAN: 0.8.40
* UMAP: 0.5.7
* Pandas: 2.3.0+4.g1dfc98e16a
* Scikit-Learn: 1.6.1
* Sentence-transformers: 3.1.1
* Transformers: 4.42.2
* Numba: 0.60.0
* Plotly: 6.1.2
* Python: 3.9.2212345678910111213141516{
"calculate_probabilities": false,
"language": null,
"low_memory": false,
"min_topic_size": 10,
"n_gram_range": [
1,
1
],
"nr_topics": "auto",
"seed_topic_list": null,
"top_n_words": 10,
"verbose": false,
"zeroshot_min_similarity": 0.7,
"zeroshot_topic_list": null
}123version https://git-lfs.github.com/spec/v1oid sha256:285573612da1923445777782408f8e2a36423c3909759bbd12ba58d70021af3dsize 9304123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483{
"topic_representations": {
"-1": [
[
"to",
0.062480953781426124
],
[
"my",
0.05976113732434668
],
[
"klarna",
0.05727940719918197
],
[
"for",
0.054670834558747855
],
[
"the",
0.047328587214639194
],
[
"payment",
0.04590553230978397
],
[
"card",
0.0431318606480702
],
[
"but",
0.04267127708146233
],
[
"just",
0.038543093523400226
],
[
"this",
0.03846527464754652
]
],
"0": [
[
"klarna",
0.07507421375334357
],
[
"my",
0.06749832637087703
],
[
"declined",
0.06685493723261081
],
[
"in",
0.06019350229402318
],
[
"for",
0.05682281768605802
],
[
"ive",
0.05278677705000323
],
[
"was",
0.04660771634780512
],
[
"used",
0.04325599629327667
],
[
"before",
0.0389699485165667
],
[
"the",
0.03766228874384047
]
],
"1": [
[
"my",
0.10576245511406396
],
[
"details",
0.07259637784624312
],
[
"klarna",
0.07041977759659818
],
[
"and",
0.0611150465282049
],
[
"call",
0.0593308380493404
],
[
"account",
0.0562773485300191
],
[
"someone",
0.05248492331395655
],
[
"card",
0.050080740769583514
],
[
"to",
0.04896930880293832
],
[
"email",
0.04709243986994599
]
],
"2": [
[
"the",
0.09804572351389455
],
[
"payment",
0.09077510430335803
],
[
"for",
0.07627437862590468
],
[
"to",
0.07280736141563629
],
[
"pay",
0.07238444683295255
],
[
"bought",
0.064149074234103
],
[
"due",
0.061310260943393334
],
[
"my",
0.05391331590170644
],
[
"of",
0.052803073510384956
],
[
"air",
0.04875401273928599
]
],
"3": [
[
"the",
0.06629758447130013
],
[
"store",
0.061501153704158755
],
[
"it",
0.059121340343231195
],
[
"for",
0.05907797326297345
],
[
"ago",
0.057510456543095306
],
[
"refund",
0.05651901054710944
],
[
"back",
0.05651901054710944
],
[
"days",
0.05603287284574961
],
[
"and",
0.05352319963725679
],
[
"to",
0.05251375401153196
]
],
"4": [
[
"the",
0.08156485155775096
],
[
"ago",
0.0725683994234641
],
[
"sneakers",
0.06984358149368186
],
[
"and",
0.06512511898179059
],
[
"shoes",
0.06446649957008656
],
[
"days",
0.061865947936947524
],
[
"adidas",
0.05854349038114099
],
[
"havent",
0.05854349038114099
],
[
"ordered",
0.05820298457806822
],
[
"on",
0.05040620516478464
]
]
},
"topics": [
1,
3,
0,
1,
-1,
3,
-1,
-1,
-1,
-1,
-1,
-1,
2,
-1,
-1,
-1,
-1,
-1,
0,
-1,
3,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
0,
2,
-1,
-1,
-1,
3,
-1,
3,
3,
3,
3,
0,
1,
4,
-1,
-1,
3,
-1,
-1,
-1,
-1,
4,
2,
2,
-1,
-1,
-1,
-1,
1,
-1,
1,
2,
4,
1,
0,
-1,
4,
-1,
-1,
-1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
-1,
1,
1,
1,
1,
0,
1,
1,
-1,
-1,
-1,
-1,
4,
3,
4,
3,
3,
3,
4,
3,
-1,
-1,
3,
3,
4,
4,
0,
2,
2,
2,
2,
-1,
2,
0,
0,
0,
0,
-1,
0,
0,
0,
0,
3,
0,
-1,
4,
4,
0,
0,
0,
0,
0,
0,
-1,
0,
0,
4,
0,
-1,
0,
-1,
0,
-1,
0,
0,
0,
0,
0,
-1,
2,
-1,
0,
1,
-1,
2,
-1,
-1,
2,
-1,
-1,
2,
2,
2,
2,
2,
-1,
-1,
2
],
"topic_sizes": {
"1": 24,
"3": 17,
"0": 34,
"-1": 62,
"2": 19,
"4": 12
},
"topic_mapper": [
[
-1,
-1,
-1,
-1
],
[
0,
0,
0,
3
],
[
1,
1,
1,
1
],
[
2,
2,
2,
4
],
[
3,
3,
3,
2
],
[
4,
4,
4,
0
]
],
"topic_labels": {
"-1": "-1_to_my_klarna_for",
"0": "0_klarna_my_declined_in",
"1": "1_my_details_klarna_and",
"2": "2_the_payment_for_to",
"3": "3_the_store_it_for",
"4": "4_the_ago_sneakers_and"
},
"custom_labels": null,
"_outliers": 1,
"topic_aspects": {}
}README.mdAdded+75
config.jsonAdded+16
topic_embeddings.safetensorsAdded+3
topics.jsonAdded+483