YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

ProtPardelle-1c browser port

Dependency-free ES modules for the released ProtPardelle-1c checkpoint families, with a JavaScript reference and WGSL inference on WebGPU. Upstream is ProteinDesignLab/protpardelle-1c, pinned to ee378400f25b801fa481028000f9060183d7fb4c. Original Python sources, training configs, and examples remain unchanged. Code is MIT; published weights are CC BY 4.0. Residue tables retain their Apache-2.0 notice in shared/.

The scope is the 16 checkpoints in the verified published archive: 15 structural denoisers and MiniMPNN. All 16 running presets have original-sampler replay fixtures, including their enabled second stages, with external full ProteinMPNN redesign explicitly disabled. That separately downloaded designer and downstream ESMFold/BindCraft/AlphaFold integrations are not ported. Secondary-structure and adjacency-conditioned weights are unreleased. No released denoiser layer is pruned. See the architecture audit, the complete sampler argument mapping, and machine-readable inventory.

Reproduce locally

Node 22+, Python 3.12, uv, and a Chromium build with real hardware WebGPU are required. Everything generated by these commands stays in this checkout.

mkdir -p .cache/tmp .cache/uv .cache/npm
export UV_CACHE_DIR="$PWD/.cache/uv"
export TMPDIR="$PWD/.cache/tmp"
uv venv --python python3.12 .venv
uv pip install --python .venv/bin/python -r tools/requirements-export.txt
npm ci --cache .cache/npm
.venv/bin/python tools/download_weights.py
.venv/bin/python tools/audit.py
.venv/bin/python tools/export_protpardelle.py
.venv/bin/python tools/export_constants.py
.venv/bin/python tools/dump_oracle.py
.venv/bin/python tools/dump_minimpnn.py
.venv/bin/python tools/dump_parser.py
.venv/bin/python tools/dump_inputs.py
.venv/bin/python tools/dump_sampler.py
npm test
npm run test:cpu
npm run test:gpu
node tools/summarize.mjs

The downloader verifies the publisher's MD5 and the committed SHA-256 lock before extracting regular files. Archive SHA-256: a2a0f391816bea98fe61596f9b3f722162646ea3e392d81d210b5d3fa5c22014. The initial download is 4,294,232,741 bytes. Weights, environments, browser state, and caches are ignored by Git. Missing weights, fixtures, or hardware fail tests. PORT_VARIANT and PORT_PRESET are diagnostic filters; unset both for full gates.

On the ARM64 NVIDIA GB10 machine, the harness uses /home/ruh/.cache/ms-playwright/chromium-1243/chrome-linux-arm64/chrome. Set CHROME_PATH to override it. Its working flags are:

--headless=new --no-sandbox --disable-gpu-sandbox --ozone-platform=headless
--enable-unsafe-webgpu --ignore-gpu-blocklist --enable-features=Vulkan
--use-angle=vulkan --use-vulkan=native --disable-vulkan-surface
--enable-dawn-features=vulkan_enable_f16_on_nvidia
--disable-renderer-accessibility

The adapter must have a hardware vendor and must not be a fallback, SwiftShader, or llvmpipe adapter. An initial null adapter is retried briefly because this occurs on the tested Chromium/GB10 combination. Test and demo servers bind loopback port 0. Browser profiles, XDG directories, and temporary files stay in the checkout. Each browser test uses a fresh profile: reusing the profile exposed a Chromium download crash on this build. The harness also isolates the headless process from the host desktop D-Bus/AT-SPI session. Compute remains NVIDIA Vulkan WebGPU.

Runtime API

import { createProtpardelleEngine } from './webgpu/index.js';
import { chainLayout } from './shared/inputs.js';
import { toPDB } from './shared/structure.js';

const layout = chainLayout([64], 200);
const engine = await createProtpardelleEngine({
  baseUrl: '/weights', variant: 'cc58_epoch416', precision: 'int8',
  cache: 'cache', // 'none', 'cache', or 'opfs'
  onProgress: console.log,
});
try {
  const result = await engine.sample({ ...layout, numSteps: 200 });
  const pdb = toPDB({ ...layout, ...result });
  console.log(result.timingMs, engine.memoryUsage(), pdb);
} finally {
  engine.destroy();
}

denoise(input) accepts flat Float32Array atom37 coordinates [L,37,3], noiseLevel[L], seqMask[L], residueIndex[L], and chainIndex[L], with optional cropCond, selfCond, and hotspotMask. sequence(input) evaluates MiniMPNN; its checkpoint is cc58_epoch97_minimpnn. Sequence inputs can include seqSelfCond[L,21], seqCropCond[L,21], and replayed neighborIndices[L,K]. K=min(32,L). The sampler lazily loads MiniMPNN when needed.

sample returns coords, aatype, atomMask, timingMs, and optional intermediates. Coordinates are in Å. Backbone sampling returns glycine token indices and backbone atom masks, as upstream does. Calls handle one protein or multichain complex; sample a collection sequentially with the same engine.

Sampling option Meaning
numSteps, stepScale, schedule EDM steps, Euler scale, {sMin,sMax,rho} schedule
sChurn, sTMin, sTMax, noiseScale Churn strength, interval, noise multiplier
sidechainMode, jumpSteps, uniformSteps MiniMPNN and atom73 superposition or uniform atom37 steps
aatype Known sequence token indices
temperature, topP, disallowAAs Sequence sampling controls; defaults omit Cys and unknown
skipMPNNProportion, annealSequence MiniMPNN start fraction; linear/cosine/no resampling anneal
motif Parsed structure, sourceIndices, targetIndices, crop strategy, translation, optional source hotspots
conditioning Crop, recurrence, reconstruction/replacement enable flags, windows, guidance schedule, scale, loss weight
tipAtomConditioning Restrict reconstruction/replacement to tip atoms
partial {structure,rewindSteps,repack} for partial diffusion/refinement
initialCoordinates, dummyFillMode Supplied initial state; zero or CA dummy atoms
stage2 Second-stage overrides with rewindSteps, preserving the PDB rounding boundary
replay Ordered typed random draws, checked for kind, shape, and complete consumption

parseStructure(text,{format:'pdb'|'cif',chainResidueGap}), tokenize, selectPositions, contigToPlacement, and chainLayout implement the input utilities. Contig integer draws can be supplied explicitly. Chain-gap zero uses local chain indices; use each checkpoint's recorded config.data.chain_residx_gap.

The CPU factory is createProtpardelleCPU({baseUrl,read}) from cpu/index.js; its URL points directly at weights/<variant>/<precision>. read(url) returns an ArrayBuffer. Both implementations use the same graph and sampler drivers. shared/, cpu/, and webgpu/ have no npm dependencies or Node imports. Every learned GPU operation and reconstruction derivative is WGSL; browser CPU work handles parsing, random draw preparation, schedules, command encoding, and I/O.

An optional supplied device remains alive after destroy(). Self-created devices are destroyed. Destruction is idempotent; temporaries are freed in finally after success, failure, or cancellation. memoryUsage() distinguishes resident and transient buffers. Buffer sizes are checked against both WebGPU limits before allocation. Scratch storage is reused across denoiser blocks. useF16 may request shader-f16; F16 storage still has a core unpack2x16float path and F32 accumulation. I8 uses packed four-byte words and per-output-row scales. Neural activations remain F32.

webgpu/worker.js is a real module-worker RPC entry point with load, sample, denoise, sequence, cancel, and destroy. Output array buffers are transferred. Avoid concurrent calls on an engine. Cancellation reaches sampling step boundaries.

Verification boundaries

The reference runner executes the original model classes and sampler, with all attached modules explicitly in evaluation mode. It stores actual Gaussian arrays, categorical inverse-CDF uniforms, annealing decisions, contig integers, each denoiser's inputs and block traces, MiniMPNN inputs/graph/block traces, coordinate gradients used by guidance, and all trajectory states. It does not assume equal random-number streams from equal seeds across languages.

Arithmetic checks use <1e-4 relative RMS against the same exported storage precision reloaded into PyTorch. Sequence and atom-mask checks are exact. Quantization error against original FP32 is reported separately. Complete sampler runs use their own intermediate coordinates. MiniMPNN's internal traces are additionally checked at its recorded original input boundary because its degenerate quaternion feature is discontinuous; see the audit for the reproduced PyTorch behavior. This is not a claim that every freely running MiniMPNN hidden state stays within the same tolerance after a discontinuous feature decision.

The direct coordinate-gradient diagnostic in tools/dump_gradient.py is stricter than the sampler cases: arbitrary dense random atom37 clouds can amplify FP32 rounding in the Jacobian above 1e-4. Running node tools/check-gradient.mjs records this separately in fixtures/gradient_diagnostic_metrics.json and exits nonzero if the threshold is exceeded (3/9 CPU cases, maximum 4.37e-4); the public sampling validation includes the gradients actually used in every reconstruction-guided fixture. Numerical parity alone is not a validation of foldability, designability, or experimental function. Replay trajectories are short correctness fixtures, not biological-quality benchmarks.

Measured on NVIDIA GB10 (driver 580.159.03), ARM64 Linux, Chrome 153.0.8010.12 (Playwright build 1243) / Vulkan. All 16 checkpoints × three precisions are covered. The sampler suite contains 111 replay cases across 16 presets, 15 structural checkpoints, and six additional control combinations.

Checkpoint Parameters / tensors FP32 bytes / shards FP16 bytes / shards INT8 bytes / shards
bb81_epoch450 35,521,311 / 173 142,128,700 / 7 71,178,868 / 3 35,917,688 / 2
bbmd_epoch500 35,637,023 / 177 142,596,100 / 7 71,418,948 / 3 36,048,328 / 2
cc58_epoch416 25,169,439 / 177 100,725,788 / 5 50,463,292 / 3 25,509,144 / 2
cc58_epoch521 25,169,439 / 177 100,725,788 / 5 50,463,292 / 3 25,509,144 / 2
cc58_epoch595 25,169,439 / 177 100,725,788 / 5 50,463,292 / 3 25,509,144 / 2
cc58_epoch649 25,169,439 / 177 100,725,788 / 5 50,463,292 / 3 25,509,144 / 2
cc58_epoch777 25,169,439 / 177 100,725,788 / 5 50,463,292 / 3 25,509,144 / 2
cc58_epoch838 25,169,439 / 177 100,725,788 / 5 50,463,292 / 3 25,509,144 / 2
cc58_epoch97_minimpnn 28,394,361 / 327 113,643,404 / 5 57,012,740 / 3 28,925,624 / 2
cc78_epoch1431 25,179,791 / 170 100,766,404 / 5 50,485,004 / 3 25,521,368 / 2
cc83_epoch2616 25,179,263 / 168 100,764,052 / 5 50,482,660 / 3 25,519,024 / 2
cc89_epoch415 25,169,439 / 177 100,725,788 / 5 50,463,292 / 3 25,509,144 / 2
cc91_epoch383 25,169,791 / 168 100,726,164 / 5 50,463,716 / 3 25,509,552 / 2
cc91_tip_epoch480 25,169,791 / 168 100,726,164 / 5 50,463,716 / 3 25,509,552 / 2
cc94_epoch3100 25,169,791 / 168 100,726,164 / 5 50,463,716 / 3 25,509,552 / 2
cc95_epoch3490 25,179,263 / 168 100,764,052 / 5 50,482,660 / 3 25,519,024 / 2

Parameter counts exclude buffers and duplicate state aliases; state_values and non-trainable frequency parameters are separately recorded in each manifest. The MiniMPNN archive checkpoint includes a frozen structural network, retained in exports.

Precision Max weight relRMS Max neural-output quantization relRMS Max free-sampler coordinate quantization relRMS Minimum sequence identity
fp32 0.00e+0 0.00e+0 0.00e+0 1.000
fp16 2.03e-4 5.84e-3 2.96e-1 0.875
int8 1.02e-2 3.44e-1 1.06e+0 0.625

The last two columns compare independently running quantized samplers with the same recorded random draws. Changed categorical decisions can substantially change a generated structure. Coordinates are unaligned; see the JSON for Cα RMS and per-case values.

Network/input mode Max CPU trace relRMS Max GPU trace relRMS Result (all storage precisions)
unconditional 6.78e-6 1.32e-5 pass
masked_partial 2.64e-5 4.56e-5 pass
backbone_motif 7.34e-5 6.63e-5 pass
allatom_motif 6.96e-5 9.65e-5 pass
sidechain_motif 5.87e-6 1.08e-5 pass
tip_motif 8.02e-6 1.13e-5 pass
multichain_hotspot 3.28e-5 4.33e-5 pass
structure_sequence 6.93e-7 1.17e-6 pass
sequence_conditioned 1.15e-6 2.01e-6 pass
graph_top32 1.07e-6 2.75e-6 pass
Original sampler preset / extra control Max CPU final relRMS Max GPU final relRMS Max checked trace relRMS Tokens / masks
sampling_allatom_recon_rep_s1 1.41e-6 1.36e-6 2.92e-5 exact
sampling_fastrelax 2.29e-6 3.21e-6 1.40e-5 exact
sampling_partial_diffusion 1.20e-6 1.10e-6 1.47e-5 exact
sampling_partial_diffusion_allatom 1.06e-6 1.27e-6 7.81e-6 exact
sampling_recon_rep 1.36e-6 3.43e-6 1.75e-5 exact
sampling_sidechain_conditional 1.90e-6 9.73e-7 1.32e-5 exact
sampling_sidechain_conditional_allatom 2.19e-6 2.30e-6 2.01e-5 exact
sampling_sidechain_conditional_allatom_recon_rep 2.73e-6 2.84e-6 1.45e-5 exact
sampling_sidechain_conditional_allatom_recon_rep_s1 2.74e-6 2.21e-6 2.44e-5 exact
sampling_sidechain_conditional_allatom_recon_rep_s1_tip 6.77e-7 7.00e-7 1.28e-5 exact
sampling_sidechain_conditional_allatom_s1 1.07e-6 1.36e-6 9.27e-6 exact
sampling_sidechain_conditional_allatom_s1_tip 2.10e-6 2.02e-6 1.76e-5 exact
sampling_sidechain_conditional_recon_rep 4.64e-7 9.36e-7 3.40e-5 exact
sampling_unconditional 4.88e-6 5.95e-6 1.34e-5 exact
sampling_unconditional_allatom 2.39e-6 3.48e-6 2.13e-5 exact
sampling_unconditional_allatom_s1 1.63e-6 1.24e-6 1.10e-5 exact
control_recurrence 2.62e-6 2.52e-6 1.13e-5 exact
control_quadratic 6.33e-6 6.10e-6 1.79e-5 exact
control_cubic 2.02e-5 2.19e-5 2.81e-5 exact
control_sequence 3.01e-6 3.03e-6 3.16e-5 exact
control_initial 1.53e-6 2.44e-6 7.49e-6 exact
control_stage2_translation 5.58e-6 2.58e-6 3.98e-5 exact

All structural-checkpoint sampler rows, including multichain hotspots, are in fixtures/sampler_inventory.json. Parser/contig fixtures cover insertion codes, negative numbering, gaps, altLoc selection, MSE/UNK, multiple models, hetero context, multi-character mmCIF chain IDs, chain layouts, and discontiguous selection.

Storage Cold load ms Warm 64-residue median ms Warm 128-residue median ms
fp32 1405.5 9.2 11.4
fp16 1229.4 9.3 11.9
int8 1028.3 8.7 11.1

Timings include encoding, submission, and readback for one denoiser evaluation, after warmup. Cold loads use local HTTP without model cache. They are not full 200–500-step sampling times. Module-worker inference, Cache API/OPFS offline loading, denied storage, cancellation, caller device ownership, buffer admission, and the demo have real-browser tests.

All exports obey the 25,000,000-byte shard cap including safetensors headers. Oversized matrices split by rows; I8 scale companions stay in the same shard as their row part. Biases, norms, positional embeddings, token embeddings, and geometry tables stay F32. Shard byte lengths and SHA-256 digests are verified before inference. The test suite exercises actual multipart exports as well as every released bundle. Cache API and OPFS are tested offline; denied storage falls back to ordinary downloads.

Demo and vendor contract

npm run demo prints an ephemeral loopback URL. Open it in a hardware-WebGPU browser. The demo includes precision and mode controls, input files, progress, cancellation, a rotatable Cα trace, PDB/FASTA downloads, and Release GPU. It runs the model in a module worker. No hosted inference service is used.

node sync-upstream.mjs .cache/vendor-smoke
node sync-upstream.mjs .cache/vendor-smoke --write

The vendor tool copies only shared/, cpu/, webgpu/, LICENSE, and this guide. It rejects symlink inputs and source-directory overwrites. Weights, fixtures, Python, dependencies, and caches are excluded.

Proposed denovo.run mapping:

Artifact Port mapping
StructureArtifact input PDB/mmCIF parsing; motif or partial-diffusion structure and residue mapping
SequenceSet input Known aatype arrays, one sequence per generated complex
ResidueTrack input Fixed positions, hotspots, chain indices, motif-placement masks
StructureArtifact output Coordinates, canonical atom names, atom mask, sequence, chain/residue metadata, PDB
SequenceSet output Sampled FASTA and optional MiniMPNN log probabilities
ResidueTrack output Motif indices, masks, per-residue logits from requested intermediates
Collection Repeated independent calls with separate replay tapes and shared resident weights

Preserve variant, storage precision, upstream commit, schedule, motif mapping, sequence constraints, and replay identity in artifact provenance. Downstream folding/design evaluation belongs to its own integration.

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