Commit ·
402e59e
1
Parent(s): eba13da
Stop storing quantized and default on a variant
Browse filesquantized restated precisions.json, which already declares itself the
authoritative partition; across 287 published variants the two never
disagreed, so the field could only ever drift. int4 and 8da8w were in use
without being listed there, and are now added.
default expressed a per-repository recommendation that nothing consumed. The
library resolves its own per-platform default and the two already disagreed
(yolo26 marked 640 while the registry hands you 384), so a reader got two
answers to one question.
precisions.json pointed its $schema at #/$defs/precisions, which did not
exist; it does now.
- config.schema.json +24 -7
- precisions.json +9 -7
config.schema.json
CHANGED
|
@@ -82,7 +82,7 @@
|
|
| 82 |
"$defs": {
|
| 83 |
"variant": {
|
| 84 |
"type": "object",
|
| 85 |
-
"required": ["precision"
|
| 86 |
"additionalProperties": false,
|
| 87 |
"properties": {
|
| 88 |
"file": {
|
|
@@ -98,12 +98,7 @@
|
|
| 98 |
"precision": {
|
| 99 |
"type": "string",
|
| 100 |
"pattern": "^[a-z0-9_]+$",
|
| 101 |
-
"description": "Precision token
|
| 102 |
-
},
|
| 103 |
-
"quantized": { "type": "boolean" },
|
| 104 |
-
"default": {
|
| 105 |
-
"type": "boolean",
|
| 106 |
-
"description": "Exactly one variant per (quantized: true) group and one per (quantized: false) group must be default: true."
|
| 107 |
},
|
| 108 |
"size_bytes": {
|
| 109 |
"type": "integer",
|
|
@@ -150,6 +145,28 @@
|
|
| 150 |
"additionalProperties": { "$ref": "#/$defs/methodSignature" },
|
| 151 |
"description": "One component's methods, keyed by method name. Used under `methods` when a variant sets `components`, so that components sharing a method name (several `forward`s in one pipeline) stay distinct."
|
| 152 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
"tensorSpec": {
|
| 154 |
"type": "object",
|
| 155 |
"required": ["shape", "dtype"],
|
|
|
|
| 82 |
"$defs": {
|
| 83 |
"variant": {
|
| 84 |
"type": "object",
|
| 85 |
+
"required": ["precision"],
|
| 86 |
"additionalProperties": false,
|
| 87 |
"properties": {
|
| 88 |
"file": {
|
|
|
|
| 98 |
"precision": {
|
| 99 |
"type": "string",
|
| 100 |
"pattern": "^[a-z0-9_]+$",
|
| 101 |
+
"description": "Precision token. precisions.json is the authoritative quantized/non-quantized partition; a variant is quantized iff its token is listed there under `quantized`."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
},
|
| 103 |
"size_bytes": {
|
| 104 |
"type": "integer",
|
|
|
|
| 145 |
"additionalProperties": { "$ref": "#/$defs/methodSignature" },
|
| 146 |
"description": "One component's methods, keyed by method name. Used under `methods` when a variant sets `components`, so that components sharing a method name (several `forward`s in one pipeline) stay distinct."
|
| 147 |
},
|
| 148 |
+
"precisions": {
|
| 149 |
+
"type": "object",
|
| 150 |
+
"required": ["quantized", "non_quantized"],
|
| 151 |
+
"additionalProperties": false,
|
| 152 |
+
"properties": {
|
| 153 |
+
"$schema": { "type": "string" },
|
| 154 |
+
"description": { "type": "string" },
|
| 155 |
+
"quantized": {
|
| 156 |
+
"type": "array",
|
| 157 |
+
"minItems": 1,
|
| 158 |
+
"uniqueItems": true,
|
| 159 |
+
"items": { "type": "string", "pattern": "^[a-z0-9_]+$" }
|
| 160 |
+
},
|
| 161 |
+
"non_quantized": {
|
| 162 |
+
"type": "array",
|
| 163 |
+
"minItems": 1,
|
| 164 |
+
"uniqueItems": true,
|
| 165 |
+
"items": { "type": "string", "pattern": "^[a-z0-9_]+$" }
|
| 166 |
+
}
|
| 167 |
+
},
|
| 168 |
+
"description": "Shape of precisions.json, which every precision token must appear in exactly once."
|
| 169 |
+
},
|
| 170 |
"tensorSpec": {
|
| 171 |
"type": "object",
|
| 172 |
"required": ["shape", "dtype"],
|
precisions.json
CHANGED
|
@@ -1,17 +1,19 @@
|
|
| 1 |
{
|
| 2 |
"$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json#/$defs/precisions",
|
| 3 |
-
"description": "Authoritative partition of precision tokens used in react-native-executorch model file names. A variant is quantized iff its precision token is
|
| 4 |
"quantized": [
|
| 5 |
-
"int8",
|
| 6 |
"4w",
|
| 7 |
-
"a8w8",
|
| 8 |
"8da4w",
|
| 9 |
-
"
|
| 10 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
],
|
| 12 |
"non_quantized": [
|
| 13 |
-
"
|
| 14 |
"fp16",
|
| 15 |
-
"
|
| 16 |
]
|
| 17 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json#/$defs/precisions",
|
| 3 |
+
"description": "Authoritative partition of precision tokens used in react-native-executorch model file names. A variant is quantized iff its precision token is listed under `quantized`. Configs do not repeat this; derive it from here.",
|
| 4 |
"quantized": [
|
|
|
|
| 5 |
"4w",
|
|
|
|
| 6 |
"8da4w",
|
| 7 |
+
"8da8w",
|
| 8 |
+
"a8w8",
|
| 9 |
+
"int4",
|
| 10 |
+
"int8",
|
| 11 |
+
"qat_lora",
|
| 12 |
+
"spinquant"
|
| 13 |
],
|
| 14 |
"non_quantized": [
|
| 15 |
+
"bf16",
|
| 16 |
"fp16",
|
| 17 |
+
"fp32"
|
| 18 |
]
|
| 19 |
}
|