{"record":{"id":"92629f255ec93475","repo":"exo-explore/exo","slug":"cfgshardmetadata-is-not-supported-for-text-model-l","errorCode":null,"errorMessage":"CfgShardMetadata is not supported for text model loading - this metadata type is only for image generation models","messagePattern":"CfgShardMetadata is not supported for text model loading - this metadata type is only for image generation models","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/exo/worker/engines/mlx/utils_mlx.py","lineNumber":272,"sourceCode":"        #        model, config, group_size=KV_GROUP_SIZE, bits=ATTENTION_KV_BITS, quant_predicate=quant_predicate, mode=QUANTIZE_MODEL_MODE\n        #    )\n\n    assert isinstance(model, nn.Module)\n\n    tokenizer = get_tokenizer(model_path, shard_metadata)\n\n    logger.info(f\"Group size: {group.size()}, group rank: {group.rank()}\")\n\n    match shard_metadata:\n        case TensorShardMetadata():\n            logger.info(f\"loading model from {model_path} with tensor parallelism\")\n            model = yield from tensor_auto_parallel(model, group)\n        case PipelineShardMetadata():\n            logger.info(f\"loading model from {model_path} with pipeline parallelism\")\n            model = yield from pipeline_auto_parallel(model, group, shard_metadata)\n            mx.eval(model.parameters())\n        case CfgShardMetadata():\n            raise ValueError(\n                \"CfgShardMetadata is not supported for text model loading - \"\n                \"this metadata type is only for image generation models\"\n            )\n\n    # TODO: Do we need this?\n    mx.eval(model)\n\n    logger.debug(\"SHARDED\")\n    logger.debug(model)\n\n    # Synchronize processes before generation to avoid timeout\n    mx_barrier(group)\n\n    return model, tokenizer\n\n\ndef get_tokenizer(model_path: Path, shard_metadata: ShardMetadata) -> TokenizerWrapper:\n    \"\"\"Load tokenizer for a model shard. Delegates to load_tokenizer_for_model_id.\"\"\"","sourceCodeStart":254,"sourceCodeEnd":290,"githubUrl":"https://github.com/exo-explore/exo/blob/21a54c5ea0230a3bec1e1a786d200126c7e34ec6/src/exo/worker/engines/mlx/utils_mlx.py#L254-L290","documentation":"Error \"CfgShardMetadata is not supported for text model loading - this metadata type is only for image generation models\" thrown in exo-explore/exo.","triggerScenarios":"Thrown at src/exo/worker/engines/mlx/utils_mlx.py:272 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"21a54c5ea0230a3bec1e1a786d200126c7e34ec6","analyzedAt":"2026-08-26T00:02:16.033Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}