Thank you for your response.
In tokenizer_config.json I have the line
"tokenizer_class": "TokenizersBackend",
In my Swift code I have
let modelFactory = LLMModelFactory.shared
let modelConfiguration = LLMRegistry.shared.configuration(id: "pharmpk/pk-mistral-7b-v0.3-4bit")
// Load the model off the main actor, then assign on the main actor
let loaded = try await modelFactory.loadContainer(configuration: modelConfiguration)
{ progress in
print("Downloading progress: \(progress.fractionCompleted * 100)%")
}
await MainActor.run {
self.model = loaded
}
It appears the difference between code that works and what doesn't is the format of the train/valid.json I'm providing to mlx_;m.lora
Text type input seems to work
{"text": "This is an example for the model."}
I thought I might get a better model using the chat format
{"messages":[{"role":"user","content":"What is pharmacokinetics?"},{"role":"assistant","content":"Pharmacokinetics is the study of the time course of drug absorption, distribution, metabolism, and excretion (ADME). It involves the mathematical analysis of these processes to describe and predict drug concentrations in the body over time. The term comes from the Greek words 'pharmakon' (drug) and 'kinesis' (movement), literally meaning the movement of drugs through the body."}]}
This is when I get the error after loading the 'new-fused' model
I don't know where to add the Manual setting of tokenizer type, in my Swift code?
Thanks
Topic:
Machine Learning & AI
SubTopic:
General