$ show bytedance/Protenix
Protenix is a production-oriented PyTorch implementation of AlphaFold 3 for biomolecular structure prediction, maintained by ByteDance. It is best classified as an application rather than a pure research codebase: it ships a `protenix` CLI with commands for prediction, input conversion, MSA/template/RNA-MSA search, and data preparation, plus training/fine-tuning entry points, batch inference runners, Docker deployment, web-service helpers, and PyPI packaging. The code ingests PDB/CIF, FASTA, SMILES/SDF, and JSON descriptors covering proteins, DNA, RNA, ligands, ions, modified residues, covalent bonds, and contact/pocket constraints, then outputs predicted 3D CIF structures with confidence metrics such as pLDDT, PAE, pTM, and ipTM.
The LLM identified 6 files worth highlighting for reuse:
Custom triangle-attention Triton kernels with forward/backward implementations, hardware autotuning with disk caching, and a PyTorch fallback path. The component can be extracted as a reusable fused-attention primitive for other transformer-heavy models and demonstrates non-trivial GPU kernel craftsmanship.
Fused CUDA layer normalization with JIT compilation, supporting FP32/FP16/BF16, Welford online mean/variance, warp-shuffle reductions, and vector-width selection. It is a self-contained performance primitive reusable independently of Protenix.
Reimplements torch_scatter's sum/mean/min/max primitives in pure PyTorch, removing a native extension dependency. It is isolated, clean, and can be dropped into any PyTorch project needing scatter reductions without custom CUDA builds.
MMCIFParser constructs biological assemblies from mmCIF files, adds missing atoms/residues, assigns molecule types, and handles altloc and arginine fixes. The extension hierarchy for PoseBuster, RecentPDB, and Distillation datasets makes the parsing logic adaptable across structure-prediction benchmarks.
Implements a hierarchical ConfigManager with RequiredValue and GlobalConfigValue markers, allowing model, data, and inference settings to compose cleanly and be overridden from CLI flags. It is a reusable configuration pattern for large ML codebases with many feature toggles and model variants.
Aggregates AlphaFold-3-style losses with configurable weights and chunked forward passes for memory efficiency. The chunking and checkpointing pattern is generally applicable to large-tensor loss computations in other structure-prediction training loops.