Skip to content

Commit

Permalink
feat: add raw media type for model weights files
Browse files Browse the repository at this point in the history
Signed-off-by: Zhao Chen <[email protected]>
  • Loading branch information
aftersnow committed Feb 20, 2025
1 parent 8a62b9c commit 6f8ae28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 6f8ae28

Please sign in to comment.