gensim
Python framework for fast Vector Space Modelling
Decision gist · record as of 2026-08-14
Yes, with conditions. Gensim is production-stable and widely used for topic modeling and document similarity tasks, with no known vulnerabilities and broad Python version support. However, the aging maintenance status (300 days since last release) suggests the project is in steady-state rather than actively developed; evaluate whether its algorithms and API meet your needs before committing. Install friction is moderate due to compiled dependencies, but prebuilt wheels ease setup. The LGPL-2.1 copyleft license requires careful review if you plan proprietary distribution.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires numpy and scipy to be installed first; a fast BLAS library (MKL, ATLAS, or OpenBLAS) is recommended for performance but optional.
- Medium install friction due to compiled dependencies (numpy, scipy); prebuilt wheels available for Python 3.9–3.13 on macOS, Linux, and Windows.
- Maintenance status is aging (300 days since last release), but the repository remains active with 16480 stars and continuous testing.
License · maintenance · safety
LGPL-2.1-only (copyleft) — Gensim is released under LGPL-2.1-only (copyleft). You may use it freely in open-source projects, but any modifications must be shared under the same license; closed-source or proprietary use requires careful review of your distribution model.
last release 2025-10-18 (300 days) · last repo commit 2025-11-01 · 16,480 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 8,879,365 downloads/mo, #1,582 on PyPI
Alternatives
Verify before relying
pip install gensim
import gensim.models
from gensim.corpora import Dictionary
# Create a dictionary and corpus from your documents
dictionary = Dictionary(texts)
corpus = [dictionary.doc2bow(text) for text in texts]
# Train an LDA model
model = gensim.models.LdaModel(corpus, num_topics=10, id2word=dictionary)- Whether the aging maintenance status (300 days since release) signals reduced active development or is typical for a stable, mature library.
- Current performance characteristics compared to newer topic modeling alternatives in the ecosystem.
What it is and what it does
Gensim is a mature Python framework for unsupervised learning on large text corpora, specializing in topic modeling and document similarity. It implements memory-efficient, out-of-core algorithms including Latent Dirichlet Allocation (LDA), Latent Semantic Analysis (LSA), word2vec, and Hierarchical Dirichlet Process (HDP), designed to handle corpora larger than available RAM through streaming and generator-based processing. The library taps into optimized BLAS libraries via numpy and scipy for fast matrix operations while keeping the top-level API in pure Python.
Gensim is intended for the natural language processing and information retrieval community. It offers a simple streaming API for plugging in custom corpora, a transformation API for extending with new algorithms, and supports distributed computing for LSA and LDA across clusters. The package has been in production use since 2010 and is actively tested across Python 3.9–3.13.
Use it for
- Train topic models (LDA, LSA) on large document collections to discover latent themes and organize unstructured text.
- Build word embeddings using word2vec to capture semantic relationships for downstream NLP tasks.
- Index and retrieve similar documents in a corpus using vector space models and similarity metrics.
- Process text corpora that exceed available RAM by streaming documents through memory-efficient generators.
- Implement custom NLP pipelines by chaining gensim transformations (e.g., TF-IDF, LSI) on document streams.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Gensim is production-stable and widely used for topic modeling and document similarity tasks, with no known vulnerabilities and broad Python version support. However, the aging maintenance status (300 days since last release) suggests the project is in steady-state rather than actively developed; evaluate whether its algorithms and API meet your needs before committing. Install friction is moderate due to compiled dependencies, but prebuilt wheels ease setup. The LGPL-2.1 copyleft license requires careful review if you plan proprietary distribution.
Install
gensim on PyPI
Before you install
Medium install friction due to compiled dependencies (numpy, scipy); prebuilt wheels available for Python 3.9–3.13 on macOS, Linux, and Windows. Maintenance status is aging (300 days since last release), but the repository remains active with 16480 stars and continuous testing.
Requires numpy and scipy to be installed first; a fast BLAS library (MKL, ATLAS, or OpenBLAS) is recommended for performance but optional.
License in practice
Gensim is released under LGPL-2.1-only (copyleft). You may use it freely in open-source projects, but any modifications must be shared under the same license; closed-source or proprietary use requires careful review of your distribution model.
Quickstart
pip install gensim
import gensim.models
from gensim.corpora import Dictionary
# Create a dictionary and corpus from your documents
dictionary = Dictionary(texts)
corpus = [dictionary.doc2bow(text) for text in texts]
# Train an LDA model
model = gensim.models.LdaModel(corpus, num_topics=10, id2word=dictionary)
Verify before relying
- Whether the aging maintenance status (300 days since release) signals reduced active development or is typical for a stable, mature library.
- Current performance characteristics compared to newer topic modeling alternatives in the ecosystem.
Package facts
| License | LGPL-2.1-only copyleft |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 3 packagesnumpyscipysmart_open |
| Maintenance | Aging 300 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 8,879,365 / month, #1,582 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: Information AnalysisTopic :: Text Processing :: Linguistic |
Evidence: gensim-4.4.0-cp310-cp310-macosx_10_9_x86_64.whl; gensim-4.4.0-cp310-cp310-macosx_11_0_arm64.whl; gensim-4.4.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; gensim-4.4.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; gensim-4.4.0-cp310-cp310-win_amd64.whl; gensim-4.4.0-cp311-cp311-macosx_10_9_x86_64.whl; gensim-4.4.0-cp311-cp311-macosx_11_0_arm64.whl; gensim-4.4.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; gensim-4.4.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; gensim-4.4.0-cp311-cp311-win_amd64.whl; gensim-4.4.0-cp312-cp312-macosx_10_13_x86_64.whl; gensim-4.4.0-cp312-cp312-macosx_11_0_arm64.whl; gensim-4.4.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; gensim-4.4.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; gensim-4.4.0-cp312-cp312-win_amd64.whl; gensim-4.4.0-cp313-cp313-macosx_10_13_x86_64.whl; gensim-4.4.0-cp313-cp313-macosx_11_0_arm64.whl; gensim-4.4.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; gensim-4.4.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; gensim-4.4.0-cp313-cp313-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “latent dirichlet allocation”
- gensimGensim is a Python library for topic modeling, document indexing, and…
- pyLDAvispyLDAvis creates interactive web-based visualizations for…
- torchsdeSolves stochastic differential equations (SDEs) with GPU support and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also pyLDAvis · PyStemmer · ja-ginza · faiss-gpu · textacy · llama-index-vector-stores-faiss · graph-retriever · librosa · simsimd · sumy