manim-ml
Use ManimML to build Manim Community animations and visual explanations for machine-learning concepts, especially neural-network diagrams, decision trees, MCMC, probability, and plotting workflows.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- manim-ml
- license
- MIT
- metadata
- { "package": "manim_ml", "disco-role": "operating" }
- description
- Use ManimML to build Manim Community animations and visual explanations for machine-learning concepts, especially neural-network diagrams, decision trees, MCMC, probability, and plotting workflows.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/repo-provenance.md2.9 KB
- 参考文档references/repo-routing-metadata.json523 B
- 参考文档references/troubleshooting.md4.8 KB
- 脚本scripts/check_manimml_environment.py4.3 KB
03 SKILL.md 正文
ManimML Repo Skill
When to use this skill
Use this skill when the task asks for Python code, Manim scenes, debugging help, or workflow guidance involving ManimML / manim_ml:
- Neural-network architecture diagrams, CNNs, max pooling, image inputs, embeddings, triplet/paired-query visuals, vector/math nodes, forward-pass animations, dropout, residual/skip connections, or VAE-style diagrams.
- Statistical/probability animations such as scikit-learn decision-tree diagrams, decision surfaces, Metropolis-Hastings / MCMC chains, Gaussian mobjects, and matplotlib figures converted to Manim images.
- Package-specific install/import checks, Manim Community compatibility checks, or troubleshooting for ManimML scene construction.
Do not use this skill for unrelated Manim projects that do not use ManimML APIs, for training real ML models, or for maintaining this source repository unless the user specifically asks for repo development rather than package use.
Environment expectations
ManimML is a Manim Community extension. A usable environment should have:
pip install manim_ml
python - <<'PY'
import manim
import manim_ml
from manim_ml.neural_network import NeuralNetwork, FeedForwardLayer
print(getattr(manim, "__version__", "unknown"))
print(NeuralNetwork, FeedForwardLayer)
PY
For decision-tree and MCMC workflows, the active environment also needs common scientific packages such as NumPy, Pillow, SciPy, matplotlib/seaborn, scikit-learn, and tqdm. Full rendering may require the usual Manim Community render stack (for example Cairo/Pango/ffmpeg and, for some text workflows, LaTeX).
Run the bundled shared smoke helper before deeper debugging:
python scripts/check_manimml_environment.py --json
Route map
| User task | Read next |
|---|---|
| Build a feed-forward, CNN, image-CNN, embedding, triplet, paired-query, vector/math, dropout, residual, VAE-style, or forward-pass ManimML scene | neural-network-visualization |
| Generate a small standalone Manim scene without repo assets | neural-network helper script through the neural-network sub-skill |
| Build or debug scikit-learn decision-tree, decision-surface, MCMC, Gaussian/probability, or matplotlib-to-image workflows | statistical-visualizations |
| Verify package imports, Manim Community compatibility, or cross-cutting render issues | root troubleshooting and check script |
| Decide whether this generated skill is stale for a checkout | repo provenance |
Cross-cutting references and scripts
- Repo provenance: source commit, package version, dirty state, and evidence paths used to build this skill.
- Root troubleshooting: install/import, Manim Community, render-stack, optional dependency, headless plotting, and performance guidance shared by all workflows.
- Router metadata: structured scenario placement for managed repo-skill import.
- Environment check script: safe import/object-construction/sampler checks with optional JSON output.
Operating principles
- Prefer ManimML public APIs and bundled examples from this skill over copying source-repository example paths.
- Keep first renders small: use
manim -ql -sfor a still frame before long video renders. - Generate tiny local fixtures for image/triplet/decision-tree examples unless the user explicitly supplies image paths.
- Treat rendering as a separate step from object construction. First prove imports and object construction, then render.
- Keep headless statistical workflows on matplotlib's Agg backend before creating figures.
- Mention current source limitations honestly: some animation helpers are incomplete or noisy, and full graphical tests are heavier than API smoke checks.
Quick examples
Generate an asset-free neural-network scene file:
python sub-skills/neural-network-visualization/scripts/render_neural_network_example.py \
--mode image-cnn \
--scene-file image_cnn_scene.py
Run compact statistical construction checks without rendering:
python sub-skills/statistical-visualizations/scripts/build_statistical_visualizations.py \
--example all \
--iterations 8 \
--json
Then render only after the generated code or construction check succeeds.
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).