ml-explore / ml-explore/mlx-examples

Impossible to fuse Mistral-7b-Instruct-v0.2 after finetuning

Open
#559 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
9k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Hi everyone,

I'm unable to fuse the model after finetuning, I got this error. Can someone please help? All paths are correct and the adapter works just fine.

antoine@Mac-Studio lora % python fuse.py --model "/Users/antoine/Documents/GitHub/EVD.COVID_ANALYSIS/EVD.COVID_ANALYSIS/Models.nosync/Mistral/Mistral-7B-Instruct-v0.2/" --save-path "/Users/antoine/Documents/GitHub/EVD.COVID_ANALYSIS/EVD.COVID_ANALYSIS/Models.nosync/Mistral/fine-tuned/" --adapter-file "/Users/antoine/Documents/GitHub/EVD.COVID_ANALYSIS/EVD.COVID_ANALYSIS/Models.nosync/Mistral/adapters/adapters.npz" --de-quantize
Loading pretrained model
Traceback (most recent call last):
File "/Users/antoine/Documents/GitHub/EVD.COVID_ANALYSIS/EVD.COVID_ANALYSIS/mlx-examples-main-2/lora/fuse.py", line 55, in
model, tokenizer, config = utils.load(args.model)
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/antoine/Documents/GitHub/EVD.COVID_ANALYSIS/EVD.COVID_ANALYSIS/mlx-examples-main-2/lora/utils.py", line 154, in load
raise FileNotFoundError("No safetensors found in {}".format(model_path))
FileNotFoundError: No safetensors found in /Users/antoine/Documents/GitHub/EVD.COVID_ANALYSIS/EVD.COVID_ANALYSIS/Models.nosync/Mistral/Mistral-7B-Instruct-v0.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lora/fuse.py and lora/utils.py, especially the load call and the FileNotFoundError for missing safetensors. Reproduce the reported command with the referenced model and adapter paths, then determine whether the expected model files are present and document a confirmed resolution or clearer failure guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.