4 ms·
It is true that bertopic is a great tool. It's modern, it's modular, and it's pretty performant. That said, I want to caution against using topic modeling as a
by uniqueuid 4y ago
It is true that bertopic is a great tool. It's modern, it's modular, and it's pretty performant.
That said, I want to caution against using topic modeling as a one-fits-all-solution. As the author stresses, this is one particular approach which uses a combination of embeddings (sentence, or other), umap and hdbscan. Both umap and hdbscan can be slow, so it might be worthwhile to check out the GPU enabled versions of both from the cuml package.
In addition, topic models have a huge number of degrees of freedom, and the solution you will get depends on many (seemingly arbitrary) choices. In other words, these are not the topics, they are some topics.
That said, it's awesome, really great work by Maarten Grootendorst and a great blog post by James Briggs.
[edit] here is a link to the fast cuda version of bertopic by rapidsai: https://github.com/rapidsai/rapids-examples/tree/main/cuBERT_topic_modelling https://github.com/rapidsai/rapids-examples/tree/main/cuBERT...
- hack_ml 4y agoIts seamless to accelerate BERTOPIC on GPU's with cuML now with the latest release. (v0.10.0) Checkout the docs at: https://maartengr.github.io/BERTopic/faq.html#can-i-use-the-gpu-to-speed-up-the-model https://maartengr.github.io/BERTopic/faq.html#can-i-use-the-... All you need to do is below from bertopic import BERTopic from cuml.cluster import HDBSCAN from cuml.manifold import UMAP # Create instances of GPU-accelerated UMAP and HDBSCAN umap_model = UMAP(n_components=5, n_neighbors=15, min_dist=0.0) hdbscan_model = HDBSCAN(min_samples=10, gen_min_span_tree=True) # Pass the above models to be used in BERTopic topic_model = BERTopic(umap_model=umap_model, hdbscan_model=hdbscan_model) topics, probs = topic_model.fit_transform(docs)
- whakim 4y agoI agree that this is a cool. That being said, the results show that we have a long, long way to go. The topics are pretty incoherent: what are "would", "should", and "use" doing in there? The words have no context, so (for example) "self" clearly refers to the python reserved keyword, but you have no way of knowing that. Not to mention (as another comment brings up), the topics aren't named so it's pretty hard to actually figure out what they're about. If we think about real-world usage this output would be practically useless - it tells you that people talk about investing in r/investing and pytorch in r/pytorch. If you want meaningful, actionable information about what people are talking about in a large corpus of unstructured text data then for the forseeable future you'll need to involve humans in the loop even if ML assistance plays a big part.