Feature Extraction
Transformers
PyTorch
Safetensors
boltz2_automodel
protein-language-model
fastplms
custom_code
Instructions to use Synthyra/Boltz2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Synthyra/Boltz2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Synthyra/Boltz2", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Synthyra/Boltz2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download fastplms/digests.py from Synthyra/Boltz2: direct link, hf CLI and curl.
- Browser
- Download file 1.25 kB
-
https://huggingface.co/Synthyra/Boltz2/resolve/main/fastplms/digests.py
- Command line
-
hf download hf://Synthyra/Boltz2/fastplms/digests.py
-
curl -L -o digests.py https://huggingface.co/Synthyra/Boltz2/resolve/main/fastplms/digests.py
1.25 kB
| """SHA-256 digests of files and JSON values, the identities FastPLMs records and compares. | |
| This file exists twice, byte for byte: here and as ``features/digests.py``. ``features`` loads as a standalone | |
| package (``foundry.embedding.private_store``) and imports nothing outside itself, so it cannot reach this | |
| module. ``tests/tier1_unit/test_features_package_is_self_contained.py`` fails when the two differ. | |
| """ | |
| from __future__ import annotations | |
| import hashlib | |
| from pathlib import Path | |
| from typing import Any | |
| from .json_files import compact_json | |
| FILE_READ_BYTES = 1024 * 1024 | |
| def file_sha256(path: str | Path) -> str: | |
| """Return the SHA-256 of a file's bytes, read in blocks so a checkpoint never sits in memory.""" | |
| digest = hashlib.sha256() | |
| with Path(path).open("rb") as handle: | |
| while block := handle.read(FILE_READ_BYTES): | |
| digest.update(block) | |
| return digest.hexdigest() | |
| def json_sha256(value: Any, *, ensure_ascii: bool = True, allow_nan: bool = True) -> str: | |
| """Return the SHA-256 of ``value`` in its compact, key-sorted JSON form (``compact_json``).""" | |
| encoded = compact_json(value, ensure_ascii=ensure_ascii, allow_nan=allow_nan).encode("utf-8") | |
| return hashlib.sha256(encoded).hexdigest() | |