Model config min json compact format
Skill kjuhwa/skills-hub/skills/data/model-config-min-json-compact-format
Distribute model config as compact JSON (config.min.json) alongside the .onnx file so package size stays small and parsing is universal.From its SKILL.md
npx -y skills add kjuhwa/skills-hub --skill model-config-min-json-compact-formatAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.7 KB, 283 tokens by cl100k_base, as published. Nobody here has run it
Model Config Min Json Compact Format
Trigger: Distributing an ML model with metadata that must be parsable from every language without a custom binary format.
Steps
- Author the canonical config in pretty JSON (full whitespace) for readability.
- Generate config.min.json via jq -c or json.dump(separators=(',', ':')).
- Ship .min.json next to model.onnx; keep the pretty version in source control for review.
- Add a config_version field so you can evolve the schema without breaking old loaders.
- Validate strictly at load time: required fields present, value ranges correct, fail fast on unknown fields if you want strict mode.
- Test the config parser in every binding to catch JSON quirk drift early.
Counter / Caveats
- Minified JSON is unreadable for debugging; always keep a pretty source-of-truth.
- Schema changes need version bumps and migration notes.
- Threshold arrays of 300+ floats inflate the file; consider a sparse representation.
- Binary formats (protobuf, msgpack) win on size but lose universal portability.
Source
Extracted from magika (https://github.com/google/magika.git @ main).
Files of interest:
assets/models/standard_v3_3/config.min.jsonrust/lib/src/config.rsgo/magika/config.go:10-31
What ships with it: 1 file
891 B alongside SKILL.md
- content.md891 B