feat(mlx-lm): add lora hypeparameters in lora layer (#366)

* feat(mlx-lm): add lora hypeparameters in lora layer

* chore: address comments
This commit is contained in:
Anchen
2024-01-25 03:11:25 +11:00
committed by GitHub
parent 5fc8668a53
commit b1dec281b3
3 changed files with 25 additions and 8 deletions

View File

@@ -278,6 +278,7 @@ def load(
model = load_model(model_path)
if adapter_file is not None:
model = apply_lora_layers(model, adapter_file)
model.eval()
tokenizer = AutoTokenizer.from_pretrained(model_path, **tokenizer_config)
return model, tokenizer