Skip to content

Comments

Move ONNX and Stockfish NNUE weights to GitHub Releases#225

Merged
kevinjosethomas merged 4 commits intomainfrom
claude/optimize-onnx-download-sR01t
Feb 21, 2026
Merged

Move ONNX and Stockfish NNUE weights to GitHub Releases#225
kevinjosethomas merged 4 commits intomainfrom
claude/optimize-onnx-download-sR01t

Conversation

@kevinjosethomas
Copy link
Collaborator

@kevinjosethomas kevinjosethomas commented Feb 21, 2026

  • Move maia_rapid.onnx (93 MB), nn-1111cefa1111.nnue (72 MB), and nn-37f18f62d772.nnue (3.4 MB) from public/ to GitHub Release assets to eliminate Vercel Fast Data Transfer bandwidth costs
  • Add NEXT_PUBLIC_MAIA_MODEL_URL and NEXT_PUBLIC_STOCKFISH_NNUE_BASE_URL env var overrides for self-hosted deployments
  • Untrack large binary files via .gitignore
  • Keep sf17-79.wasm (461K) and sf17-79.js (14K) in public/stockfish/ unchanged

The 93MB maia_rapid.onnx file was served from public/ causing ~$150/month
in Vercel Fast Data Transfer charges. Move it to a GitHub Release asset
(free, served with CORS headers) and remove from git tracking.

- Update model URL to GitHub Releases download URL (with NEXT_PUBLIC_MAIA_MODEL_URL env var override)
- Remove public/maia2/*.onnx from git via .gitignore

To complete: create a GitHub Release tagged `models-v1` and upload
maia_rapid.onnx as a release asset.

https://claude.ai/code/session_01T73Yphu4y2U3c3ctCcHVPf
@vercel
Copy link

vercel bot commented Feb 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
maia-platform-frontend Ready Ready Preview, Comment Feb 21, 2026 10:59pm
maia-v1 Error Error Feb 21, 2026 10:59pm

Request Review

nn-1111cefa1111.nnue (72MB) was generating 26+ GB/month in Vercel Fast
Data Transfer charges. Move both NNUE files to GitHub Release assets
(free, CORS-enabled) and remove from git tracking.

- Fetch NNUE files from GitHub Releases download URL in setupStockfish()
- Add NEXT_PUBLIC_STOCKFISH_NNUE_BASE_URL env var for self-hosted overrides
- Untrack public/stockfish/*.nnue via .gitignore
- sf17-79.wasm (461K) and sf17-79.js (14K) remain in public/ unchanged

To complete: upload nn-1111cefa1111.nnue and nn-37f18f62d772.nnue to the
`models-v1` GitHub Release (same release as the ONNX model).

https://claude.ai/code/session_01T73Yphu4y2U3c3ctCcHVPf
@kevinjosethomas kevinjosethomas changed the title Move ONNX model to GitHub Releases to eliminate Vercel bandwidth costs Move ONNX and Stockfish NNUE weights to GitHub Releases Feb 21, 2026
GitHub Releases don't serve CORS headers, so browser fetch() fails
under COEP. raw.githubusercontent.com serves both:
- Access-Control-Allow-Origin: *
- Cross-Origin-Resource-Policy: cross-origin

Model files are hosted on the orphan `models` branch and served via:
https://raw.githubusercontent.com/CSSLab/maia-platform-frontend/models/

https://claude.ai/code/session_01T73Yphu4y2U3c3ctCcHVPf
Point to commit e23a50e where the files still exist on main.
No new branch or repo needed — git history serves as permanent storage.

raw.githubusercontent.com serves:
- Access-Control-Allow-Origin: *
- Cross-Origin-Resource-Policy: cross-origin

https://claude.ai/code/session_01T73Yphu4y2U3c3ctCcHVPf
@kevinjosethomas kevinjosethomas merged commit e668b74 into main Feb 21, 2026
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants