Views
No views yet
chai-torch without any
conversion step at load time.1from chai_torch import ChaiTorch, featurize_fasta
2
3model = ChaiTorch.from_pretrained("josephjojoe/chai-torch", device="cuda").eval()
4ctx = featurize_fasta("input.fasta", output_dir="./out")
5result = model.run_inference(ctx, recycles=3, num_samples=5, num_steps=200)
6# result.coords: torch.Tensor on CUDA, shape (B, S, A, 3)
7# result.confidence: pae_logits, pde_logits, plddt_logits
8# result.ranking: aggregate_score, ptm, iptm, per-chain breakdowns, clashesChaiTorch.from_pretrained accepts either a HuggingFace repo id (as
above, via huggingface_hub) or a local directory containing
config.json plus model.safetensors (or sharded safetensors with an
index file). The default compute_dtype="reference" matches the
TorchScript reference's mixed-precision policy: bf16 trunk / confidence
with fp32 diffusion and other preserved-fp32 parameters. Pass
compute_dtype="float32" to keep the port in fp32 throughout.| File | Size | Purpose |
|---|---|---|
config.json | 2.5 KB | ChaiConfig dataclass tree (hyperparameters, precision policy) |
model.safetensors.index.json | 205 KB | Sharded weight map |
model-feature_embedding.safetensors | 4.8 MB | Input feature projections (token / pair / atom / MSA / template) |
model-bond_loss_input_proj.safetensors | 2.1 KB | Bond adjacency projection |
model-token_embedder.safetensors | 6.6 MB | Token input atom encoder + pair / single projections |
model-trunk.safetensors | 680 MB | 48-block pairformer + MSA module + template embedder |
model-diffusion_module.safetensors | 512 MB | Conditioning + 16-block diffusion transformer + atom enc/dec |
model-confidence_head.safetensors | 59 MB | 4 pairformer blocks + pLDDT / PAE / PDE projections |
1@article{Chai-1,
2 author = {{Chai Discovery}},
3 title = {Chai-1 Technical Report},
4 year = {2024},
5 url = {https://chaiassets.com/chai-1/paper/technical_report_v1.pdf}
6}