fix for #2 -- CodeLlama crashes

- add replacement tokenizer class for unknown tokenizers
- fix quantization for models that don't have lm_head quantized

Requires https://github.com/ml-explore/mlx-swift/pull/28
This commit is contained in:
David Koski
2024-02-26 10:38:05 -08:00
parent 8870b0d386
commit bb7bacc077
5 changed files with 80 additions and 54 deletions

View File

@@ -202,9 +202,11 @@ public class GemmaModelInner: Module {
public class GemmaModel: Module, LLMModel {
public let vocabularySize: Int
let model: GemmaModelInner
public init(_ args: GemmaConfiguration) {
self.vocabularySize = args.vocabularySize
self.model = GemmaModelInner(args)
}