OpenWeights

How OpenWeights works

The internals: services, protocol, API reference, and configuration.

This section is for people changing OpenWeights, integrating with it directly, or auditing what it does with their bytes. If you want to upload and download models, start with Using OpenWeights.

Concepts

Reference

Working on OpenWeights

Repository layout

The git root holds one directory per service plus the supporting harnesses.

PathContents
cas/openweights-cas, a six-crate Rust Cargo workspace, plus migrations/
gateway/openweights-gateway, a single flat Go package
console/openweights-console, a Vite and React application
hf-proxy/openweights-hf-proxy, a single-file Go reverse proxy
conformance/The Rust Xet-protocol conformance harness
bench/Go module holding the setup wizard and the measurement harnesses
ops/Compose files, overlays, the Caddyfiles, and operator scripts
tests/hf-roundtrip/The end-to-end byte-identical round-trip harness
docs-site/This documentation site

The Rust workspace splits into openweights-cas (the Axum binary), openweights-cas-core (every handler), openweights-cas-storage (the Sia write path and reconciler), openweights-cas-db (sqlx queries and types), openweights-cas-proto (the only place xet-core-structures is re-exported), and openweights-cas-register (the one-shot indexer registration CLI).

On this page