Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local models #518

Closed
anderbarrena opened this issue Feb 21, 2025 · 4 comments
Closed

local models #518

anderbarrena opened this issue Feb 21, 2025 · 4 comments

Comments

@anderbarrena
Copy link

I'm trying to merge models from disk instead of using Hugging Face links, but I can't get it to work. I'm encountering the following error: RuntimeError: Can't parse "modelpath"

for instance a config, base model has the path to the model:

models:
- model: meta-llama/Llama-3.1-8B-Instruct
parameters:
density: [1, 0.7, 0.1] # density gradient
weight: 1.0
merge_method: dare_ties
base_model: /xxxx/xxxxx/
parameters:
normalize: true
int8_mask: true
dtype: float16

Do you have any idea how to fix this?

Ander

@David-AU-github
Copy link

If the online repo has restrictions (IE must approve, fill in a form etc), you may get this error.
If memory serves, Llama 3.1-Instruct does have this - download a local copy, then access it via your local drive.

@anderbarrena
Copy link
Author

Sorry, I probably didn’t explain the issue clearly. I’m having trouble loading a model from a local directory. The error occurs when I try to load the base model specified in the YAML file, which points to a model stored in a local directory /xxx/xxxx/.

@cg123
Copy link
Collaborator

cg123 commented Feb 24, 2025

Are there + characters in the directory path you're specifying? If so you won't be able to use that path as a raw string, as it conflicts with the base_model_ref+lora_model_ref syntax. If you need to reference a model with a path like that you can do so like this:

base_model:
  model:
    path: /your/path/with+plus+signs/here
#   revision: optional revision
# lora: optional LoRA to apply
#   path: ...
#   revision: ...
parameters: # ... and so on

@anderbarrena
Copy link
Author

Yes! That was the cause of the error.
Thanks!!! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants