Andrea Soria

asoria

AI & ML interests

Maintainer of πŸ€—Datasets: Data processing

Articles

Organizations

Posts 4

view post
Post
1715
πŸš€ Exploring Topic Modeling with BERTopic πŸ€–

When you come across an interesting dataset, you often wonder:
Which topics frequently appear in these documents? πŸ€”
What is this data really about? πŸ“Š

Topic modeling helps answer these questions by identifying recurring themes within a collection of documents. This process enables quick and efficient exploratory data analysis.

I’ve been working on an app that leverages BERTopic, a flexible framework designed for topic modeling. Its modularity makes BERTopic powerful, allowing you to switch components with your preferred algorithms. It also supports handling large datasets efficiently by merging models using the BERTopic.merge_models approach. πŸ”—

πŸ” How do we make this work?
Here’s the stack we’re using:

πŸ“‚ Data Source ➑️ Hugging Face datasets with DuckDB for retrieval
🧠 Text Embeddings ➑️ Sentence Transformers (all-MiniLM-L6-v2)
⚑ Dimensionality Reduction ➑️ RAPIDS cuML UMAP for GPU-accelerated performance
πŸ” Clustering ➑️ RAPIDS cuML HDBSCAN for fast clustering
βœ‚οΈ Tokenization ➑️ CountVectorizer
πŸ”§ Representation Tuning ➑️ KeyBERTInspired + Hugging Face Inference Client with Meta-Llama-3-8B-Instruct
🌍 Visualization ➑️ Datamapplot library
Check out the space and see how you can quickly generate topics from your dataset: datasets-topics/topics-generator

Powered by @MaartenGr - BERTopic