embeddings
Guides ESM, MSA Transformer, ProtTrans/ProtBERT, and precomputed sequence/MSA representations for Alphafold2, including projection, masks, caches, downloads, Apex, and OOM diagnosis.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- embeddings
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Guides ESM, MSA Transformer, ProtTrans/ProtBERT, and precomputed sequence/MSA representations for Alphafold2, including projection, masks, caches, downloads, Apex, and OOM diagnosis.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md8.3 KB
- 参考文档references/external-models.md6.6 KB
- 参考文档references/troubleshooting.md7.0 KB
- 脚本scripts/embedding_input_smoke.py5.0 KB
03 SKILL.md 正文
Embeddings
Use this sub-skill for ESMEmbedWrapper, MSAEmbedWrapper,
ProtTranEmbedWrapper, external sequence/MSA features, precomputed
representations, projection-width checks, or failures involving model assets,
torch.hub, Hugging Face, transformers, Apex, fused operations, caches, and
memory pressure.
Route the task
- For exact wrapper signatures, tensor contracts, masks, projection rules, and
disable_token_embed, read API reference. - Before constructing any pretrained wrapper, read External models. Construction can resolve code and large weights; never trigger that acquisition without approval.
- For missing assets, network/cache errors, source-shape defects, Apex/fused failures, width mismatch, or OOM, use Troubleshooting.
- For a safe CPU-default check, run
embedding_input_smoke.py. It creates a synthetic(B, M, N, 1280)tensor, checks the core projection, and consumes projected representations without constructing or downloading a pretrained model.
Operating sequence
- Decide between a live pretrained wrapper and already available representations. Prefer precomputed inputs when model source, weights, cache, network policy, fused kernels, or memory have not been approved and validated.
- Validate
seq: (B, N),msa: (B, M, N), boolean masks on the same residue axes, and the external feature width before allocating a model. - Match the external width to the correct projection: wrapper projections end
at
Alphafold2.dim; the coreembedd_projectacceptsnum_embeddschannels (1280 by default) and also ends atAlphafold2.dim. - Review the 0.4.32 source limitations before relying on a wrapper or on the
core argument spelled
embedds. The README describes the intended workflow, but several wrapper/helper paths and the directembeddsbranch drift from that description. - Run only a bounded, explicit device check. The pretrained wrapper paths are
not offline merely because
alphafold2_pytorchimports successfully.
Boundaries
- General
Alphafold2trunk construction, attention, and output contracts: core-model. - Coordinates, confidence, refinement, and recycling: structure-and-recycling.
- Metrics and unrelated utilities: utilities.
A wrapper computes seq_embed and msa_embed and forwards them to the trunk.
The lower-level embedds argument is a different interface; in 0.4.32 its
branch is shadowed by MSA initialization. Do not describe a successful wrapper
or functional direct-embedds inference unless that exact path was validated.
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).