Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add raw media type for model weights files #35

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ The image manifest of model artifacts follows the [OCI Image Manifest Specificat

- `application/vnd.cnai.model.weight.v1.tar`: The layer is a [tar archive][tar-archive] that contains the model weight file. If the model has multiple weight files, they SHOULD be packaged into separate layers.

Also, implementations SHOULD support the following media types:
Also, implementations SHOULD support the following media types:

- `application/vnd.cnai.model.weight.v1.raw`: The layer is an unarchived, uncompressed model weights file. If the model weight files are large, implementations are RECOMMENDED to use this media type.

- `application/vnd.cnai.model.weight.config.v1.tar`: The layer is a [tar archive][tar-archive] that includes config of the model weights like `tokenizer.json`, `config.json`, etc.

Expand Down
3 changes: 3 additions & 0 deletions specs-go/v1/mediatype.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ const (
// MediaTypeModelWeightZstd is the media type used for zstd compressed model weights.
MediaTypeModelWeightZstd = "application/vnd.cnai.model.weight.v1.tar+zstd"

// MediaTypeModelWeightRaw is the media type used for an unarchived, uncompressed model weights file.
MediaTypeModelWeightRaw = "application/vnd.cnai.model.weight.v1.raw"

// MediaTypeModelConfig specifies the media type for configuration of the model weights, including files like `tokenizer.json`, `config.json`, etc.
MediaTypeModelWeightConfig = "application/vnd.cnai.model.weight.config.v1.tar"

Expand Down