topic-modeling
Build, fit, query, and mutate BERTopic topic models.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- topic-modeling
- license
- MIT
- metadata
- { "package": "BERTopic", "disco-role": "operating", "parent-skill": "bertopic", "package-version": "0.17.4" }
- description
- Build, fit, query, and mutate BERTopic topic models.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md7.1 KB
- 参考文档references/troubleshooting.md4.6 KB
- 参考文档references/workflows.md6.0 KB
- 脚本scripts/smoke_topic_model.py7.8 KB
03 SKILL.md 正文
Topic Modeling
Use this sub-skill for BERTopic lifecycle work when the task is about building or changing a topic model rather than choosing embeddings, tuning c-TF-IDF/vectorizers, labeling topics, plotting, or saving models.
Covered workflows
- Construct BERTopic with default or custom reducer/cluster components.
- Fit,
fit_transform,transform, andpartial_fiton documents, precomputed embeddings, or image-aligned inputs. - Run guided, supervised, semi-supervised, manual, zero-shot, online, and multimodal fitting variants.
- Query topics, frequencies, documents, representative docs, and topic search results.
- Reduce, merge, delete, and outlier-correct topics.
- Merge multiple fitted models.
- Inspect parameter state with
get_params.
Not covered here
- Embedding backend selection or download troubleshooting.
- c-TF-IDF/vectorizer tuning, seed-word weighting, or online vocabulary tuning details.
- Topic representation and labeling models.
- Visualizations, comparison plots, or downstream analysis.
- Save/load, hub publishing, or other serialization paths.
Working notes
fit/fit_transformacceptdocuments, optionalembeddings, optionalimages, and optionaly.partial_fitis the streaming path; use a reducer and clusterer that supportpartial_fit.transformonly works on fitted models with an inference-capable cluster path.find_topicsneeds a liveembedding_model; if you only have precomputed embeddings, provide a local offline embedder or route the request elsewhere.reduce_outliersreturns a new topic list; if you need refreshed representations afterward, hand that job to the vectorizer/representation sub-skill.merge_topics,delete_topics, andreduce_topicsmutate the fitted model in place and updatetopic_mapper_.partial_fittracks the current batch intopics_; keep your own history if you need a cumulative stream view.imagesare supported for fit-time and transform-time multimodal workflows;partial_fitdoes not take images.
References
references/api-reference.mdreferences/workflows.mdreferences/troubleshooting.mdscripts/smoke_topic_model.py
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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).