| { |
| "$schema": "https://json-schema.org/draft/2020-12/schema", |
| "$id": "https://huggingface.co/ryan-0608/MoS-DFlash-Routers/raw/main/schema/router_config.schema.json", |
| "title": "MoS DFlash request-level router config", |
| "type": "object", |
| "required": [ |
| "schema_version", |
| "artifact_id", |
| "router_kind", |
| "status", |
| "target_model", |
| "domain_outputs", |
| "feature_contract", |
| "head", |
| "weights" |
| ], |
| "properties": { |
| "schema_version": {"const": "1.0"}, |
| "artifact_id": {"type": "string", "minLength": 1}, |
| "router_kind": {"const": "request-level"}, |
| "status": {"const": "experimental"}, |
| "target_model": { |
| "type": "object", |
| "required": ["repo_id", "revision"], |
| "properties": { |
| "repo_id": {"type": "string", "minLength": 1}, |
| "revision": {"type": "string", "pattern": "^[0-9a-f]{40}$"} |
| }, |
| "additionalProperties": false |
| }, |
| "domain_outputs": { |
| "type": "array", |
| "minItems": 5, |
| "maxItems": 5, |
| "items": { |
| "type": "object", |
| "required": ["domain_id", "label", "expert_id"], |
| "properties": { |
| "domain_id": {"type": "integer", "minimum": 0, "maximum": 4}, |
| "label": {"type": "string"}, |
| "expert_id": {"type": "string"} |
| }, |
| "additionalProperties": false |
| } |
| }, |
| "feature_contract": {"type": "object"}, |
| "head": { |
| "type": "object", |
| "required": ["input_dim", "hidden_dim", "output_dim", "dropout"], |
| "properties": { |
| "input_dim": {"type": "integer", "minimum": 1}, |
| "hidden_dim": {"type": "integer", "minimum": 1}, |
| "output_dim": {"const": 5}, |
| "dropout": {"type": "number", "minimum": 0, "maximum": 1} |
| }, |
| "additionalProperties": true |
| }, |
| "weights": { |
| "type": "object", |
| "required": ["filename", "format", "sha256", "size_bytes"], |
| "properties": { |
| "filename": {"const": "router_head.safetensors"}, |
| "format": {"const": "safetensors"}, |
| "sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, |
| "size_bytes": {"type": "integer", "minimum": 1} |
| }, |
| "additionalProperties": true |
| } |
| }, |
| "additionalProperties": true |
| } |
|
|
|
|