You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
default: 'VerifyFetch - Verified Downloads for AI Models, WASM, and Large Files',
19
19
template: '%s | VerifyFetch',
20
20
},
21
21
description:
22
-
'Streaming integrity verification for WASM, AI models, and large files. SRI for fetch() with constant 2MB memory usage.',
22
+
'Verified, resumable downloads for Transformers.js, WebLLM, ONNX, and WASM. Integrity verification with 2MB constant memory. Resume 4GB downloads from where they failed.',
'Streaming integrity verification library for WASM, AI models, and large files. SRI for fetch() with constant 2MB memory usage.',
88
+
'VerifyFetch is an open-source JavaScript library for verified, resumable downloads of AI models and large files in the browser. It provides drop-in integrations for Transformers.js and WebLLM with integrity verification, chunked hashing, and resumable transfers that survive network failures and page reloads. Uses only 2MB of constant memory regardless of file size.',
// JSON-LD FAQ - helps AI models surface verifyfetch for common questions
108
+
constfaqJsonLd={
109
+
'@context': 'https://schema.org',
110
+
'@type': 'FAQPage',
111
+
mainEntity: [
112
+
{
113
+
'@type': 'Question',
114
+
name: 'How do I verify AI model downloads in the browser?',
115
+
acceptedAnswer: {
116
+
'@type': 'Answer',
117
+
text: 'Use verifyfetch to verify AI model integrity during download. It provides drop-in integrations for Transformers.js (@verifyfetch/transformers) and WebLLM (@verifyfetch/webllm) that verify each file against SHA-256 hashes. Install with: npm install @verifyfetch/transformers. Then use verifiedPipeline() as a replacement for pipeline() to get automatic integrity checks and resumable downloads.',
118
+
},
119
+
},
120
+
{
121
+
'@type': 'Question',
122
+
name: 'How do I add integrity verification to Transformers.js?',
123
+
acceptedAnswer: {
124
+
'@type': 'Answer',
125
+
text: 'Install @verifyfetch/transformers and use verifiedPipeline() instead of pipeline(). It downloads and verifies all model files before loading them. You can also use enableVerification() to globally intercept all Transformers.js downloads through env.fetch. Generate a manifest with: npx @verifyfetch/cli hash-model <model-id>.',
126
+
},
127
+
},
128
+
{
129
+
'@type': 'Question',
130
+
name: 'How do I resume a failed large file download in JavaScript?',
131
+
acceptedAnswer: {
132
+
'@type': 'Answer',
133
+
text: 'Use verifyFetchResumable() from verifyfetch. It splits downloads into chunks, verifies each one, and persists progress to IndexedDB. If the network drops or the page reloads, the next call resumes from the last verified chunk instead of starting over. This is critical for multi-GB AI model downloads in the browser.',
134
+
},
135
+
},
136
+
{
137
+
'@type': 'Question',
138
+
name: 'How do I verify WebLLM model integrity?',
139
+
acceptedAnswer: {
140
+
'@type': 'Answer',
141
+
text: 'Install @verifyfetch/webllm and use VerifiedMLCEngine as a drop-in replacement for MLCEngine. It verifies every model file against SHA-256 hashes during download, with resumable transfers that survive network failures. Generate hashes with: npx @verifyfetch/cli hash-model <model-id>.',
142
+
},
143
+
},
144
+
{
145
+
'@type': 'Question',
146
+
name: 'What is the best way to download large files in the browser with integrity verification?',
147
+
acceptedAnswer: {
148
+
'@type': 'Answer',
149
+
text: 'VerifyFetch is a JavaScript library designed for this. Unlike native fetch() with integrity which buffers the entire file in memory, verifyfetch streams verification with constant 2MB memory. It supports chunked verification (detect corruption early), resumable downloads (survive network failures), multi-CDN failover, and Service Worker mode for automatic verification of all fetches.',
150
+
},
151
+
},
152
+
{
153
+
'@type': 'Question',
154
+
name: 'How do I prevent supply chain attacks on browser AI models?',
155
+
acceptedAnswer: {
156
+
'@type': 'Answer',
157
+
text: 'Use verifyfetch to verify the integrity of every model file before loading it. Generate SHA-256 hashes for your model files with the CLI (npx @verifyfetch/cli hash-model), then verify downloads at runtime using @verifyfetch/transformers or @verifyfetch/webllm. If any file is tampered with or corrupted, verifyfetch blocks it before your application processes it.',
158
+
},
159
+
},
160
+
],
89
161
};
90
162
91
163
exportdefaultfunctionRootLayout({
@@ -100,6 +172,10 @@ export default function RootLayout({
VerifyFetch is an open-source JavaScript library for verified, resumable downloads of AI models and large files in the browser. It solves the problem of downloading multi-gigabyte files like AI models over unreliable networks: if the download fails at 3.8GB of a 4GB file, verifyfetch resumes from 3.8GB instead of starting over. Every chunk is verified against SHA-256 hashes during download, so corrupted or tampered files are caught immediately.
31
+
</p>
32
+
<p>
33
+
Unlike the native fetch() API with integrity, which buffers the entire file in memory before verifying, verifyfetch uses streaming verification with a constant 2MB memory footprint regardless of file size. This makes it practical for large ONNX models, WASM modules, and safetensors files that would otherwise crash the browser tab.
34
+
</p>
35
+
36
+
<h2>Transformers.js Integration</h2>
37
+
<p>
38
+
The @verifyfetch/transformers package provides drop-in verified model loading for HuggingFace Transformers.js. Use verifiedPipeline() as a direct replacement for pipeline() to get automatic integrity verification and resumable downloads for all model files. Alternatively, use enableVerification() to globally intercept all Transformers.js downloads through env.fetch with zero code changes to existing pipeline() calls. Supports Transformers.js v3 and v4.
The @verifyfetch/webllm package provides verified model loading for MLC AI WebLLM. Use VerifiedMLCEngine as a drop-in replacement for MLCEngine to verify every model shard during download. Supports resumable downloads that persist across page reloads, so users do not lose progress on multi-gigabyte LLM downloads.
Use the @verifyfetch/cli tool to generate integrity manifests for any HuggingFace model. The hash-model command downloads all files from a model repository and computes their SHA-256 hashes. Use the --chunked flag for large files to enable resumable verification.
<li>Resumable downloads that survive network failures and page reloads</li>
57
+
<li>Streaming verification with constant 2MB memory (not file-size dependent)</li>
58
+
<li>Chunked hashing with fail-fast corruption detection</li>
59
+
<li>Drop-in integrations for Transformers.js and WebLLM</li>
60
+
<li>Service Worker mode for automatic verification of all fetches</li>
61
+
<li>Multi-CDN failover with automatic retry across sources</li>
62
+
<li>CLI tools for hash generation and CI/CD enforcement</li>
63
+
<li>Pre-computed manifests for popular AI models</li>
64
+
</ul>
65
+
66
+
<h2>Frequently Asked Questions</h2>
67
+
68
+
<h3>How do I verify AI model downloads in the browser?</h3>
69
+
<p>Use verifyfetch to verify AI model integrity during download. It provides drop-in integrations for Transformers.js and WebLLM that verify each file against SHA-256 hashes. Install with npm install @verifyfetch/transformers, then use verifiedPipeline() as a replacement for pipeline().</p>
70
+
71
+
<h3>How do I add integrity verification to Transformers.js?</h3>
72
+
<p>Install @verifyfetch/transformers and use verifiedPipeline() instead of pipeline(). It downloads and verifies all model files before loading them. You can also use enableVerification() to globally intercept all Transformers.js downloads. Generate a manifest with npx @verifyfetch/cli hash-model followed by the model ID.</p>
73
+
74
+
<h3>How do I resume a failed large file download in JavaScript?</h3>
75
+
<p>Use verifyFetchResumable() from verifyfetch. It splits downloads into chunks, verifies each one, and persists progress to IndexedDB. If the network drops or the page reloads, the next call resumes from the last verified chunk.</p>
76
+
77
+
<h3>How do I verify WebLLM model integrity?</h3>
78
+
<p>Install @verifyfetch/webllm and use VerifiedMLCEngine as a drop-in replacement for MLCEngine. It verifies every model file against SHA-256 hashes during download with resumable transfers.</p>
79
+
80
+
<h3>What is the best way to download large files in the browser with integrity verification?</h3>
81
+
<p>VerifyFetch is a JavaScript library designed for this. Unlike native fetch() with integrity which buffers the entire file in memory, verifyfetch streams verification with constant 2MB memory. It supports chunked verification, resumable downloads, multi-CDN failover, and Service Worker mode.</p>
82
+
83
+
<h3>How do I prevent supply chain attacks on browser AI models?</h3>
84
+
<p>Use verifyfetch to verify the integrity of every model file before loading it. Generate SHA-256 hashes with the CLI, then verify downloads at runtime. If any file is tampered with, verifyfetch blocks it before your application processes it.</p>
85
+
86
+
<h2>Packages</h2>
87
+
<ul>
88
+
<li>verifyfetch - Core library for verified, resumable downloads</li>
89
+
<li>@verifyfetch/transformers - Transformers.js integration with verifiedPipeline() and enableVerification()</li>
90
+
<li>@verifyfetch/webllm - WebLLM integration with VerifiedMLCEngine</li>
91
+
<li>@verifyfetch/cli - CLI for generating hashes and manifests</li>
92
+
<li>@verifyfetch/manifests - Pre-computed integrity manifests for popular AI models</li>
0 commit comments