contextualized-topic-models VS transformers

Compare contextualized-topic-models vs transformers and see what are their differences.

contextualized-topic-models

A python package to run contextualized topic modeling. CTMs combine contextualized embeddings (e.g., BERT) with topic models to get coherent topics. Published at EACL and ACL 2021. (by MilaNLProc)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
contextualized-topic-models transformers
7 171
1,151 122,577
1.0% 2.7%
5.0 10.0
2 months ago 7 days ago
Python Python
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

contextualized-topic-models

Posts with mentions or reviews of contextualized-topic-models. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-04-14.
  • [Project]Topic modelling of tweets from the same user
    2 projects | /r/MachineLearning | 14 Apr 2023
    In our experiments, CTM works well with tweets: https://github.com/MilaNLProc/contextualized-topic-models (I'm one of the authors)
  • Using Transformer for Topic Modeling - what are the options?
    2 projects | /r/LanguageTechnology | 15 Feb 2022
    This library from MILA seems quite neat! I havenโ€™t had the change to play with it though : https://github.com/MilaNLProc/contextualized-topic-models
  • (NLP) Best practices for topic modeling and generating interesting topics?
    3 projects | /r/MLQuestions | 31 May 2021
    If you use CTM, you can provide the topic model two inputs: the preprocessed texts (that will be used by the topic model to generate the topical words) and the unpreprocessed texts (to generate the contextualized representations that will be later concatenated to the document bag-of-word representation). We saw that this slightly improves the performance instead of providing BERT the already-preprocessed text. This feature is supported in the original implementation of CTM, not in OCTIS. See here: https://github.com/MilaNLProc/contextualized-topic-models#combined-topic-model
    3 projects | /r/MLQuestions | 31 May 2021
    My team and I have recently released a python library called OCTIS (https://github.com/mind-Lab/octis) that allows you to automatically optimize the hyperparameters of a topic model according to a given evaluation metric (not log-likelihood). I guess, in your case, you might be interested in topic coherence. So you will get good quality topics with a low effort on the choice of the hyperparameters. Also, we included some state-of-the-art topic models, e.g. contextualized topic models (https://github.com/MilaNLProc/contextualized-topic-models).
  • Latest trends in topic modelling?
    3 projects | /r/LanguageTechnology | 24 Apr 2021
    Cross-lingual Contextualized Topic Models with Zero-shot Learning from a team at MilaNLP which uses bag of words representations in combination with multi lingual embeddings from SBERT and works like a VAE (encode the input, use the encoded representation to decode back to a bag of words as close to the input as possible). Using SBERT embeddings makes their model generalise for other languages which may be useful. One major shortfall of this model as I understand is that it can't deal with long documents very elegantly - only up to BERT'S word limit (the workaround is to truncate and use the first words)

transformers

Posts with mentions or reviews of transformers. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-11.

What are some alternatives?

When comparing contextualized-topic-models and transformers you can also consider the following projects:

fairseq - Facebook AI Research Sequence-to-Sequence Toolkit written in Python.

sentence-transformers - Multilingual Sentence & Image Embeddings with BERT

llama - Inference code for Llama models

transformer-pytorch - Transformer: PyTorch Implementation of "Attention Is All You Need"

text-generation-webui - A Gradio web UI for Large Language Models. Supports transformers, GPTQ, AWQ, EXL2, llama.cpp (GGUF), Llama models.

huggingface_hub - The official Python client for the Huggingface Hub.

BERTopic - Leveraging BERT and c-TF-IDF to create easily interpretable topics.

OpenNMT-py - Open Source Neural Machine Translation and (Large) Language Models in PyTorch

sentencepiece - Unsupervised text tokenizer for Neural Network-based text generation.

Swin-Transformer-Tensorflow - Unofficial implementation of "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows" (https://arxiv.org/abs/2103.14030)

faiss - A library for efficient similarity search and clustering of dense vectors.

KoboldAI-Client