Open Gincioks opened 1 year ago
That should be possible in principle, but some of the code might be model specific now. Could you point me to the
I could look into that.
I'm relatively new to AI development, but I've interested in a fine-tuned version of Mistral Orca. It's available here: Mistral 7B OpenOrca on Hugging Face. However, it seems like this model is in a Hugging Face format, which may not be directly compatible with the code, yes?
You can find the original weights for the Mistral 7B model here: Original Weights for Mistral 7B.
I tried to find a method for converting hf weights to pytorch, but nothing came up.
Looking at https://huggingface.co/mistralai/Mistral-7B-v0.1/blob/main/pytorch_model.bin.index.json it should be possible to modify the loading to make it work. Need some updates to the loader code though.
Do you have any suggestions for getting started? I want to put this into action, despite the fact that there will be a lot to learn :D
@Gincioks - I'm not entirely sure about the best way, but probably here's how I'd do it:
Currently I facing with this error:
File "slowllama/models_manager.py", line 76, in prepare_model prepare_mistal_model( File "slowllama/mistral/mistral_loader.py", line 114, in prepare_mistal_model apply_subset(submodule, weight_subset, ci, title) File "slowllama/mistral/mistral_loader.py", line 53, in apply_subset module.weight[idx_subset] = weight_subset ~~~~~~~~~~~~~^^^^^^^^^^^^
RuntimeError: The expanded size of the tensor (11008) must match the existing size (14336) at non-singleton dimension 0. Target sizes: [11008, 4096]. Tensor sizes: [14336, 4096]
when trying to prepare model. Any Thoughts?
Update: I was able prepare model and launch inference thought your code. I needed change FeedForward class. But now I have problem that model gives random tokens. It can still be a probkem with orward pass
could you share your code somewhere? Maybe a branch in your forked repo?
Yes, yes, I will share the code, I made too many changes so I will start new repo. Also I was able get generation working perfectly. Now will do the same with finetuning.
yeah, i think doing that in the forked version might be good option. thank you for looking into this!
Hey, this is a new repository: https://github.com/Gincioks/PicoTuner. I intend to utilize this as a package in another project, so I created a small cli for easier use.
Hello,
Can we apply this method to fine-tune models other than llamas and codellama, such as mistral 7b?
Many thanks in advance!