SimpleFold

Model Introduction

SimpleFold is a generative protein folding model released by Apple. It supports protein structure prediction and provides training and fine-tuning entry points.

Model Description

SimpleFold uses standard Transformer layers and a flow-matching objective to predict three-dimensional protein structures from FASTA sequences.

This Hugging Face package includes a default FASTA example, SimpleFold weights, pLDDT weights, CCD auxiliary files, Boltz auxiliary weights, and local ESM-2 3B weights. The package is ready to use once the full download is complete.

Use Cases

Scenario Description
Protein structure prediction Takes a FASTA file as input and outputs structures in mmCIF or PDB format.
Local offline inference Stores example inputs and weights in examples/ and weight/, allowing the scripts to run entirely from files in this repository.
Training / fine-tuning pipeline validation Supports training workflow validation after tokenized data have been prepared according to config/data/*.yaml.
Hugging Face package layout Uses the standard config/, models/, scripts/, and weight/ directory structure.

Usage Guide

1. OneCode Usage

Try one-click AI4S development in the OneCode online environment:

Try one-click AI4S development

2. Manual Installation and Usage

Hardware Requirements

  • GPU or DCU is recommended.
  • A CPU can be used for basic connectivity checks, but execution will be slow.
  • DCU users must install DTK in advance. DTK 25.04.2 or later is recommended, or a OneScience-recommended version matching the current cluster.

Software Requirements

For additional information about the adaptation, please contact liubiao@sugon.com.

Environment Check

  • NVIDIA GPU:
nvidia-smi
  • Hygon DCU:
hy-smi

Quick Start

1. Install the Runtime Environment

conda create -n onescience311 python=3.11 -y
conda activate onescience311
pip install onescience[bio] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai

If required libraries cannot be found, activate the CUDA compatibility environment as follows:

source ${ROCM_PATH}/cuda/env.sh
export LD_LIBRARY_PATH="$CONDA_PREFIX/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="$CONDA_PREFIX/lib/python3.11/site-packages/fastpt/torch/lib:$LD_LIBRARY_PATH"

2. Download the Model Package

hf download --model OneScience-Sugon/SimpleFold --local-dir ./SimpleFold
cd SimpleFold

Model Weights

The trained model weights are included in the weights/ directory, including SimpleFold-1B and SimpleFold-100M checkpoints, ESM weights, and other supporting weights.

3. Run Inference

python scripts/run_inference.py \
  --simplefold_model simplefold_100M \
  --fasta_path examples/minimal.fasta \
  --output_dir outputs/minimal_inference \
  --num_steps 10 \
  --tau 0.01 \
  --nsample_per_protein 1 \
  --backend torch

Output directory:

outputs/minimal_inference/predictions_simplefold_100M/

4. Training โ€” No Dataset Currently Provided

Before training, prepare the following paths:

datasets/
datasets/tokenized/
datasets/manifest.json

Data processing:

python scripts/process_data.py --data_dir /path/to/mmcif --out_dir datasets --num-processes 8
python scripts/tokenize_data.py --target_dir datasets --token_dir datasets/tokenized

process_data.py uses the in-package weight/ccd.pkl by default; no additional CCD download or Redis setup is required. To use the legacy Redis CCD workflow, pass --use-redis explicitly.

Training:

python scripts/train.py

FSDP training:

python scripts/train_fsdp.py experiment=train_fsdp

Fine-tuning / training-resumption example:

python scripts/train.py load_ckpt_path=weight/simplefold_100M.ckpt

OneScience Official Information

Citation & License

The original SimpleFold implementation is released under the MIT License. This repository retains attribution to the original source and is organized to support automated execution through OneScience on Hugging Face. For scientific use, please cite the original SimpleFold paper and the relevant OneScience project materials.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support