Skip to content

convert : fix F32 ftype not being saved #3048

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

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

cebtenzzre
Copy link
Collaborator

params.ftype is falsy if it is GGMLFileType.AllF32. Use is not None instead of implicit boolean conversion.

before:

$ ./convert.py openlm-research_open_llama_3b --outfile openllama-3b.f32.gguf --outtype f32
$ ./main -m openllama-3b.f32.gguf
<snip>
llm_load_print_meta: model ftype    = all F32 (guessed)

after:

$ ./convert.py openlm-research_open_llama_3b --outfile openllama-3b.f32.gguf --outtype f32
$ ./main -m openllama-3b.f32.gguf
<snip>
llm_load_print_meta: model ftype    = all F32

@KerfuffleV2
Copy link
Collaborator

KerfuffleV2 commented Sep 7, 2023

Possibly apply the same treatment for the other params nearby? Unless you specifically don't want to allow a rope scale of 0, etc — but in that case I think doing something other than just not saving it would probably be better.

edit: Looks good! I hate that truthy stuff.

@cebtenzzre cebtenzzre merged commit 6336d83 into ggml-org:master Sep 7, 2023
@cebtenzzre cebtenzzre deleted the fix-convert-ftype branch September 7, 2023 18:27
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

Successfully merging this pull request may close these issues.

2 participants