Open
Description
This the function that gives error: MLXLMCommon.ModelFactoryError error 0.
I call this function with type: 'qwen3'
func loadModelContext(modelConfiguration: ModelConfiguration, type: String) async throws -> ModelContext {
let configurationURL = modelConfiguration.modelDirectory().appendingPathComponent("config.json")
let baseConfig = try JSONDecoder().decode(BaseConfiguration.self, from: Data(contentsOf: configurationURL))
let model = try LLMModelFactory.shared.typeRegistry.createModel(configuration: configurationURL, modelType: type)
try loadWeights(modelDirectory: modelConfiguration.modelDirectory(), model: model, quantization: baseConfig.quantization)
let tokenizer = try await loadTokenizer(configuration: modelConfiguration, hub: HubApi(downloadBase: modelConfiguration.modelDirectory()))
let processor = LLMUserInputProcessor(tokenizer: tokenizer, configuration: modelConfiguration)
return ModelContext(configuration: modelConfiguration, model: model, processor: processor, tokenizer: tokenizer)
}
When I use Qwen2 model and change type to "qwen2", everything works well, so I can't figure out what's going on, and I am sure I use the latest version of mlx-examples (main branch).
Metadata
Metadata
Assignees
Labels
No labels