Skip to content

Conversation

@ngxson
Copy link
Collaborator

@ngxson ngxson commented Oct 31, 2024

When using convert_lora_to_gguf.py, the --base is solely to specify the path to base model config.json. The base weight is never used, so it's kinda waste.

This PR make --base optional by using "base_model_name_or_path" inside adapter_config.json

Tested with https://huggingface.co/grimjim/Llama-3-Instruct-abliteration-LoRA-8B/tree/main

python3 ~/work/llama.cpp-ngxson/convert_lora_to_gguf.py Llama-3-Instruct-abliteration-LoRA-8B --outfile adapter.gguf

@ngxson ngxson requested a review from compilade October 31, 2024 13:52
@github-actions github-actions bot added the python python script changes label Oct 31, 2024
@ngxson ngxson merged commit 7554aa4 into ggml-org:master Nov 2, 2024
9 checks passed
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Nov 15, 2024
* convert-lora : make `--base` optional

* lint

* handle case where base_model_name_or_path is invalid

* do not include metadata from base model

* clarify unspecified --base

* add small comment [no ci]

* trigger ci
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Nov 18, 2024
* convert-lora : make `--base` optional

* lint

* handle case where base_model_name_or_path is invalid

* do not include metadata from base model

* clarify unspecified --base

* add small comment [no ci]

* trigger ci
@VolcanoJ25
Copy link

--base is still listed when you call -h for help

@ngxson
Copy link
Collaborator Author

ngxson commented Dec 26, 2024

it's optional, not removed

@VolcanoJ25
Copy link

VolcanoJ25 commented Dec 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python python script changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants