model-config-and-api
Inspect and modify AlphaFold model presets, RunModel configuration, feature processing, parameter loading, and backend dependency issues.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- model-config-and-api
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Inspect and modify AlphaFold model presets, RunModel configuration, feature processing, parameter loading, and backend dependency issues.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md9.8 KB
- 参考文档references/model-overview.md7.1 KB
- 参考文档references/troubleshooting.md9.1 KB
- 脚本scripts/inspect_model_presets.py7.5 KB
03 SKILL.md 正文
AlphaFold Model Config and API
Use this sub-skill when a task is about AlphaFold's programmatic model layer: choosing model presets, inspecting or editing ml_collections configs, constructing RunModel objects, processing model features, loading Haiku parameters, diagnosing JAX/Haiku/TensorFlow imports, or using model-side geometry and lDDT helper APIs.
Start Here
- Run
scripts/inspect_model_presets.pyto list installed model presets and selected configuration fields without loading weights or running inference. - Read
references/model-overview.mdfor preset selection, config-editing patterns, RunModel lifecycle, dependency roles, and weight compatibility rules. - Read
references/api-reference.mdfor model config APIs,RunModel, parameter loading, feature processing, and numerical helper contracts. - Read
references/troubleshooting.mdfor import failures, JAX/JAXLIB mismatch, parameter path mismatches, TensorFlow/NumPy pin conflicts, GPU memory caveats, and preset/weight confusion.
Routing Boundaries
- Use this sub-skill for
alphafold.model.config,alphafold.model.model.RunModel,alphafold.model.data.get_model_haiku_params,alphafold.model.features, model geometry helpers, lDDT/FAPE helpers, and dependency/backend diagnostics. - Use
../prediction-cli/for buildingrun_alphafoldcommands, CLI flags, database path flags, MSA reuse, random seeds, and output-directory orchestration. - Use
../outputs-and-confidence/for interpretingranking_debug.json,confidence_*.json,pae_*.json, pLDDT, PAE, pTM, ipTM, PDB, mmCIF, AFDB, or AlphaFold Server JSON outputs. - Use
../relaxation/for Amber/OpenMM relaxation configuration, stereochemical cleanup, GPU relaxation, and relaxation failure modes. - Use
../input-data-and-formats/for FASTA/MSA/template parsing and data-pipeline input formats before model feature processing.
Safe Operating Rules
- Do not load model weights, instantiate expensive model runners, call
RunModel.predict, or run JAX compilation as a routine validation step. - Treat
model_config()inspection as safe; treatRunModelconstruction and feature processing as dependency-sensitive because JAX, Haiku, and TensorFlow may import or initialize runtime backends. - Keep model names and parameter files aligned:
model_1_ptmexpectsparams_model_1_ptm.npz, while multimer v3 preset names expectparams_model_1_multimer_v3.npzthroughparams_model_5_multimer_v3.npz. - Prefer explicit preset selection over manual ad hoc config edits, then make small config changes with
with cfg.unlocked()orwith dataclass_cfg.unfreeze()only when the task truly needs them.
Bundled Helper
python sub-skills/model-config-and-api/scripts/inspect_model_presets.py --json
The helper imports only alphafold.model.config, reads installed package metadata when available, prints preset/config summaries, and never opens parameter files or runs inference.
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).