AGENT SKILL

bertopic

Route BERTopic topic modeling, embedding, vectorizer, labeling, visualization, and serialization workflows.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
bertopic
license
MIT
metadata
{ "disco-role": "operating" }
description
Route BERTopic topic modeling, embedding, vectorizer, labeling, visualization, and serialization workflows.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

BERTopic

BERTopic turns documents, precomputed embeddings, or multimodal inputs into topic models you can fit, inspect, label, visualize, and save.

Install

python -m pip install bertopic

Use only the optional packages that the chosen workflow needs. For example, multimodal image workflows use bertopic[vision], while label and backend workflows may require openai, litellm, langchain, llama-cpp-python, spacy, fastembed, model2vec, gensim, flair, safetensors, or datamapplot.

If you are working from a local checkout to inspect the package, editable install is also fine:

python -m pip install -e .

Quick check

Run the bundled environment check first:

python scripts/check_env.py

Add --smoke for a tiny no-download fit/load-style smoke that uses synthetic documents and precomputed embeddings.

Route map

  • sub-skills/topic-modeling/ — build BERTopic models, fit and transform data, run partial_fit, mutate topics, and combine or reduce fitted models.
  • sub-skills/embeddings-backends/ — choose embedding backends, build custom embedders, inventory optional backend imports, and handle precomputed or multimodal embeddings.
  • sub-skills/vectorizers-ctfidf/ — tune ClassTfidfTransformer, CountVectorizer, and OnlineCountVectorizer for better topic words.
  • sub-skills/representations-labeling/ — rerank keywords, generate labels, chain representation models, and manage multi-aspect topic outputs.
  • sub-skills/analysis-visualization/ — inspect fitted models with topic tables, hierarchies, distributions, and plots.
  • sub-skills/serialization/ — save, reload, and share fitted models locally or through the Hugging Face Hub.

When a task spans more than one route, start with the earliest route in the pipeline and move forward: embeddings → model building → topic-word tuning → labels → analysis → serialization.

Read next

  • references/workflows.md for the fastest route through common BERTopic tasks.
  • references/troubleshooting.md when imports, optional dependencies, plotting, or save/load fail.
  • references/repo-provenance.md before deciding whether this skill matches the current checkout.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351