Every source behind this page, graded. Two grading calls are stated in the
ledger: security advisories and yank notices are graded as postmortems, because each records a
false assumption, a mechanism and a fix, and neither records a blast radius.
Postmortem
GitHub Advisory Database2026-06
GHSA-fgcw-684q-jj6r, arbitrary code execution during model initialization
The clearest single artefact in this guide. An untrusted config.json supplied
the trust_remote_code value that was then propagated into downstream config
loading, so an explicit refusal by the caller was overridden by the file being loaded.
Carry forwardTrust must be resolved from the caller before the artefact is parsed, never re-read from it.
github.com/advisories/GHSA-fgcw-684q-jj6r
Postmortem
GitHub Advisory Database2026-05
GHSA-9xq9-36w5-q796, hardcoded trust_remote_code in a serving layer
A downstream inference server passed trust_remote_code=True unconditionally,
removing the user's ability to refuse. The advisory is careful to say this is not a supply
chain attack: the user picked the repository, and lost only the right to say no to it.
Carry forwardAudit who calls your dangerous parameter; a safe default protects nobody whose framework overrides it.
github.com/advisories/GHSA-9xq9-36w5-q796
Postmortem
GitHub Advisory Database2026-09
Advisory listing for model-loading code execution
One query returns 2026 advisories for transformers, diffusers, sentence-transformers,
xinference, lmdeploy and vLLM, all variations on executing code while loading a model. The
class outlived the format change that was supposed to end it.
Carry forwardSecuring the weights file relocates the attack to the config, the template and the init path.
github.com/advisories?query=transformers
Postmortem
Hugging Face on PyPI2025-11
hf-xet 1.2.1 withdrawn: default-on disk cache
The yank reason is one sentence: "This release contains a regression that enables the disk
cache by default." The component had become a default dependency for most architectures
seven months earlier, so the regression reached users who never chose it.
Carry forwardPromoting a component to default makes its release process part of your blast radius.
pypi.org/project/hf-xet
Postmortem
Hugging Face on PyPI2026-06
transformers yank notices, 2021 to 2026
Six withdrawals, each with a reason written by a maintainer. The most recent: "We pushed
from a week old main branch ... mostly it is missing a bunch of fixes!" Every reason is a
release-process failure rather than a defect in the library's logic.
Carry forwardA project's yank log is the cheapest available audit of its release discipline. Read it before you pin.
pypi.org/project/transformers
Decision record
Hugging Face2023-12
safetensors PR 197, Q4 quantization support, closed unmerged
The format's own author opened it, marked it a draft, wrote "I will only merge this after
being showcased in a real model example", and let it expire nine months later. The reason
given in the thread is that competing quantization schemes pack differently.
Carry forwardDo not standardise an encoding the ecosystem has not converged on; the format outlives the fashion.
github.com/huggingface/safetensors/pull/197
Decision record
Hugging Face2026-04
safetensors PR 676, GPUDirect Storage, closed unmerged
Five months of review ending in a one-paragraph refusal: the work belongs in "an optimised
loading backend for safetensors which will eventually support GDS directly". A reviewer
adds the principle: "GDS should be an implementation detail".
Carry forwardTransport optimisations belong behind the interface, not in the artefact everyone parses.
github.com/huggingface/safetensors/pull/676
Decision record
Hugging Face2026-09
Library philosophy and core tenets
A written, enforced review rule: "One Model, One File", "Code is the Product", "Standardize,
Don't Abstract", and the deliberately asterisked "DRY* (Repeat when it helps users)". The
first line now reads "Transformers is a PyTorch-first library".
Carry forwardIf duplication is your policy, write it down as one, with the condition attached, or it reads as decay.
github.com/huggingface/transformers philosophy.md
Decision record
Hugging Face2026-09
Modular transformers: a compiler for the single-file policy
Contributors write an inheriting shard; a converter generates the flat file. "Maintainers
review the shard; users hack the expanded file." The document is careful that this does not
replace hand-written model files.
Carry forwardWhen a policy's cost becomes unbearable, generating the output is often cheaper than repealing the policy.
github.com/huggingface/transformers modular_transformers.md
Decision record
Hugging Face2024-04
text-generation-inference LICENSE history
Three commits on one file: Apache in October 2022, "chore: update license to HFOIL" in July
2023, "Revert license to Apache 2.0" in April 2024. The nine-month experiment and its
reversal are legible without any announcement.
Carry forwardA licence file's git history is a decision record nobody thinks to redact.
github.com/huggingface/text-generation-inference LICENSE history
Decision record
PyTorch2025-01
PyTorch 2.6.0: weights_only defaults to True
The incumbent format repaired rather than replaced, with the trade-off stated: "the
increased security by default is a tradeoff that is worth it". The notes then recommend
"more constrained (and even safer) formats like safetensors for un-trusted checkpoints".
Carry forwardConstraining the reader is the cheap fix, and its own authors will tell you where it stops working.
github.com/pytorch/pytorch releases v2.6.0
Decision record
ggml2026-09
The GGUF specification
The opposite bet, stated as design goals: "Single-file deployment", "Extensible", "mmap
compatibility", "no need for external libraries". Quantization types live in the spec, and
the enum carries the receipt: "GGML_TYPE_Q4_2 = 4, support has been removed".
Carry forwardPutting capability in the format works, and the price is removals you cannot take back quietly.
github.com/ggml-org/ggml docs/gguf.md
Source
Hugging Face2026-09
safetensors format specification and rationale
Eleven lines of specification, a comparison table rejecting seven alternatives with a
reason each, and the prohibitions that matter: a 100 MB header cap, and a buffer that
"cannot contain holes", which "prevents the creation of polyglot files".
Carry forwardA format's security properties are mostly the things it refuses to be able to express.
github.com/huggingface/safetensors
Source
Hugging Face2026-09
The attacks directory
Working exploits for pickle, PaddlePaddle and Keras H5 shipped inside the repository, plus
a record of the team red-teaming its own format. One line is struck through in place:
"Proposal 4: The offsets could overlap. ~~This is actually OK.~~ This is NOT ok."
Carry forwardShip the attack alongside the format. It is the only way a reviewer can check the claim.
github.com/huggingface/safetensors attacks/README.md
Source
Hugging Face2026-09
xet-core chunking constants
The deduplication geometry, fixed in source: 64 KiB target chunk, a floor of one eighth and
a ceiling of twice that, blocks capped at 64 MiB and 8,192 chunks, with gear-hash
content-defined boundaries so an insertion does not reshuffle every chunk after it.
Carry forwardChunk size is the whole trade-off: smaller finds more duplicates and costs more index.
github.com/huggingface/xet-core constants.rs
Source
Hugging Face2025-03
huggingface_hub v0.30.0 release notes
Introduces the transfer layer with its design claim in one sentence: "Unlike LFS, which
deduplicates files, Xet operates at the chunk level." At this point it is an opt-in extra
behind a waitlist.
Carry forwardWatch the gap between a capability's announcement and its promotion to default; here it was forty days.
github.com/huggingface/huggingface_hub releases v0.30.0
Source
Keras2026-09
Keras load_model and its safe_mode gate
The third strategy, documented in the signature: "safe_mode: Boolean, whether to disallow
unsafe lambda deserialization ... Defaults to True". The same module loads from an
hf:// prefix by calling snapshot_download.
Carry forwardIf you cannot change the format, name the one dangerous construct and deny it by default.
github.com/keras-team/keras saving_api.py
Source
PyPI and npm2026-09
The name lineage: three packages, two renames, one squatted name
pytorch-pretrained-bert from November 2018, pytorch-transformers for two months in 2019,
then transformers from 26 September 2019. The PyPI name itself carries a 2016 release by an
unrelated author, summarised "Experimental module for AST transformations". The browser
runtime followed the same pattern, adopted from a community package in August 2024 with its
version numbering continued rather than reset.
Carry forwardRegistry metadata dates decisions that no announcement does, including the ones a company would rather not date.
pypi.org/project/transformers/0.1
Measurement
This guide2026-09-18
Thirteen wheels, measured
Model directories, per-framework file counts, generated modular files, copy markers and
total Python lines across nine release points from 2019 to 2026. Not published anywhere;
computed from the wheels themselves with the script in the next section.
Carry forwardYou can date any library's architectural decisions from its own published artefacts, in about twenty minutes.
files.pythonhosted.org, the 5.0.0 wheel measured
Measurement
crates.io2026-09-18
The Rust half of the stack, by adoption
tokenizers at 32,865,800 all-time downloads since August 2019, safetensors at 25,903,163
since December 2022, hf-xet at 1,197,063. Three separate occasions on which a performance
problem in Python was answered with a Rust component rather than with Python.
Carry forwardRegistry download counts are a weak proxy for usage but a strong one for how long a decision has been load-bearing.
crates.io/api/v1/crates/safetensors