Downloads · 30 days
6
9% of all-time downloads
redup-ai/topicmodel-multilingual
topicmodel-multilingual is a feature extraction model from redup-ai. Use it when you need embeddings to search or compare text. It is set up for redup-topicmodel. The card lists the license as mit.
Multilingual topic model that maps a document to a 125-dimensional topic distribution. The repository contains inference weights and per-language BPE tokenizers for 100 languages.
Downloads · 30 days
6
9% of all-time downloads
All-time downloads
64
Public
Repo size
263 MB
Likes
0
Public
Click a slice to open those files.
.bin169 MB · 64%
From the Hugging Face model README
Multilingual topic model that maps a document to a 125-dimensional topic distribution. The repository contains inference weights and per-language BPE tokenizers for 100 languages.
The dump is built for BigARTM 0.9.2. It is not a Transformers /
Diffusers checkpoint: AutoModel and AutoTokenizer are not supported.
| Framework | BigARTM 0.9.2 |
| Topics | 125 (topic_0 … topic_124) |
| Languages | 100 |
| Output | topic distribution (sums ≈ 1) |
| License | MIT |
| Role | Repository |
|---|---|
| Training / research pipeline | machine-intelligence-laboratory/text_categorization |
| Inference service (recommended) | redup-ai/redup.python.topicmodel |
Use text_categorization as the historical training reference. For serving embeddings and explanations in production, prefer redup.python.topicmodel.
| Path | Description |
|---|---|
artm/parameters.bin | BigARTM model metadata and regularizers |
artm/p_wt.bin | Topic–word matrix Φ used at inference |
tokenizers.json.gz | BPE packs keyed by language: {lang: {vocab, merges}} |
config.json | Machine-readable metadata |
LICENSE | MIT |
Total size is about 251 MB.
Each document must provide modality lang with an ISO-like code from the table
below. Tokens are scored under BigARTM class id @{lang}.
af | am | ar | av | az |
ba | be | bg | bn | bs |
ca | ce | cs | cv | cy |
da | de | el | en | eo |
es | et | eu | fa | fi |
fr | gd | gl | gu | he |
hi | hr | hu | hy | ia |
id | inh | is | it | ja |
jv | ka | kaa | kbd | kk |
kl | km | ko | krc | ky |
la | lez | lo | lt | lv |
mg | mhr | mi | mk | ml |
mn | mo | ms | my | myv |
ne | nl | no | oc | os |
pl | pt | rm | rn | ro |
ru | sah | sh | si | sk |
sl | sm | so | sq | sr |
sv | sw | ta | tg | th |
tk | tr | tt | udm | uk |
ur | uz | vi | yi | zh |
pip install huggingface_hub
from huggingface_hub import snapshot_download
root = snapshot_download(repo_id="redup-ai/topicmodel-multilingual")
Recommended path: the inference helpers from redup.python.topicmodel.
pip install huggingface_hub bigartm==0.9.2
# install redup-topicmodel from the service repository / package index you use
import asyncio
from types import SimpleNamespace
from redup_topicmodel.topicmodel.worker import TopicModel
def document(document_id: str, tokens: list[str], lang: str):
return SimpleNamespace(
document_id=document_id,
tokens=tokens,
modalities={"lang": lang},
)
async def main(root: str):
model = TopicModel({
"artifact_root": root,
})
pack = SimpleNamespace(documents=[
document("doc-en", ["hello", "world"], "en"),
document("doc-ru", ["привет", "мир"], "ru"),
])
result = await model.get_documents_embedding("example", pack)
for embedding in result["embeddings"]:
# length-125 topic distribution
print(len(embedding["values"]), sum(embedding["values"]))
asyncio.run(main(root))
Point the service config at the downloaded directory:
TopicModel:
artifact_root: /path/from/snapshot_download
from redup_topicmodel.topicmodel.bpe import Tokenizers
tokenizers = Tokenizers.load(f"{root}/tokenizers.json.gz")
print(tokenizers["en"].encode("hello world"))
transformers.AutoModel / AutoTokenizer.parameters.bin is a BigARTM pickle — load only trusted artifacts.tokenizers.json.gz stores independent BPE packs per language; it is not a
Hugging Face tokenizer.json export.topic_0).MIT. See LICENSE.