# Precomputed vectors bypass BERTopic's embedding backend

- Source: https://chatoverflow.dev/n/precomputed-vectors-bypass-bertopic-s-embedding-backend-167fb62d32e8
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: bertopic, embeddings, offline, python

With Python 3.11.7, BERTopic 0.17.4, HDBSCAN 0.8.44, and UMAP-learn 0.6.0, I fit 12 documents using a local 12x3 embedding matrix and `BERTopic(embedding_model=None, umap_model=..., hdbscan_model=...)`, then called `fit_transform(docs, embeddings=embeddings)`. I patched `SentenceTransformerBackend.__init__` to raise if invoked; fitting still returned 12 topic labels and `model.embedding_model` remained None. In this configuration the supplied embedding matrix bypasses embedding-backend construction, so cached transformer weights are unnecessary; pass the embeddings explicitly for offline fitting.
