-
Notifications
You must be signed in to change notification settings - Fork 5
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
[RFC] Model annotation and config guidelines #19
Comments
Hi, thank you for starting this!
Can you provide an example for this? I'm not sure for instance why I could not use . Also, I assume this config is not meant to be used as Manifest.config as that would conflict with using OCI image compliancy, but please confirm/correct my understanding? |
You can. As a guideline, let's try not to put too many annotations to a layer to avoid complexity. I put two as a recommended limit but we can surely discuss how many is "too many" :)
There are two options, and we should discuss them:
|
I am afraid the option described in the example would not be accepted either in OCI registry, as it's not a valid OCI Image afaik? While I like the idea, I think we need to test against OCI registry and Container Runtimes, my2c |
@tarilabs You are right! I've updated the example to use the media type One more thing I'm not 100% sure is that while |
The media type For e.g. {
"schemaVersion": 2,
"config": {
"mediaType": "application/vnd.cncf.helm.config.v1+json",
"digest": "sha256:34bf03806938a59ee7dc3e2c33e314d0eaef573313ff9dcc677113502d568523",
"size": 145
},
"layers": [
{
"mediaType": "application/vnd.cncf.helm.chart.content.v1.tar+gzip",
"digest": "sha256:87a12bc6175d031e6b0077f73d6db045967a2fc0cb29d98cb384f937953e3843",
"size": 4172
}
],
"annotations": {
"org.opencontainers.image.created": "2024-12-17T20:10:50Z",
"org.opencontainers.image.description": "A Helm chart for Kubernetes",
"org.opencontainers.image.title": "hello-world",
"org.opencontainers.image.version": "0.1.0"
}
} And the associated config
|
@sajayantony Yeah, in the end we should use something like |
As discussed on the call. We can remove |
Another thought should we define the Config as a JSON schema? Right now, it looks too much like key/value pairs. |
If use |
update: |
Right now we define a lot of model general information as annotations. They should be defined as a field of model config. We use the guidelines below to decide if a model artifact description should be an annotation or in a structured config file: * If a description belongs to a specific layer, it SHOULD be an annotation * If a description describes a general property of the model, it SHOULD be in a config Also a `ModelFS` structure is introduced to describe the ordering of multiple layers. Fixes: CloudNativeAI#19 Fixes: CloudNativeAI#22 Signed-off-by: Peng Tao <[email protected]>
Right now we define a lot of model general information as annotations. They should be defined as a field of model config. We use the guidelines below to decide if a model artifact description should be an annotation or in a structured config file: * If a description belongs to a specific layer, it SHOULD be an annotation * If a description describes a general property of the model, it SHOULD be in a config Also a `ModelFS` structure is introduced to describe the ordering of multiple layers. Fixes: CloudNativeAI#19 Fixes: CloudNativeAI#22 Signed-off-by: Peng Tao <[email protected]>
There are two ways to describe a certain part of a model, annotations and structured config files. Right now, we use annotations to tell the purpose of a certain layer of a model artifact, as well as the creation time, author, name, title, etc. of the model. While it surely works, it also creates difficulties for model spec adopters to parse the spec. One possible improvement is to move some of them into a structured config file.
We use the guidelines below to decide if a model artifact description should be an annotation or in a structured config file:
Following the above guidelines, we created a list of existing annotations and whether each should be converted to a config file field.
org.cnai.model.architecture
transformer
,cnn
,rnn
, etc.org.cnai.model.family
llama3
,gpt2
,qwen2
, etc.org.cnai.model.name
llama3-8b-instruct
,gpt2-xl
,qwen2-vl-72b-instruct
, etc.org.cnai.model.format
onnx
,tensorflow
,pytorch
, etc.org.cnai.model.param.size
org.cnai.model.precision
bf16
,fp16
,int8
, etc.org.cnai.model.quantization
awq
,gptq
, etcorg.cnai.model.created
org.cnai.model.authors
org.cnai.model.url
org.cnai.model.documentation
org.cnai.model.source
org.cnai.model.version
org.cnai.model.revision
org.cnai.model.vendor
org.cnai.model.licenses
org.cnai.model.ref.name
the name of the reference for a target, valid only for descriptors onindex.json
within the model layout.Configorg.cnai.model.title
org.cnai.model.description
org.cnai.model.readme
org.cnai.model.license
org.cnai.model.config
org.cnai.model.model
org.cnai.model.filepath
The text was updated successfully, but these errors were encountered: