Skip to content

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
Contributor

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