Skip to content

quantize : use map to assign quantization type from string #1191

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

prusnak
Copy link
Collaborator

@prusnak prusnak commented Apr 26, 2023

instead of int (while int option still being supported)

This allows the following usage:

./quantize ggml-model-f16.bin ggml-model-q4_0.bin q4_0

instead of:

./quantize ggml-model-f16.bin ggml-model-q4_0.bin 2

PS: PR #1187 will need to be rebased if this is merged earlier. If the other PR is merged earlier, I will rebase this one.

instead of `int` (while `int` option still being supported)

This allows the following usage:

`./quantize ggml-model-f16.bin ggml-model-q4_0.bin q4_0`

instead of:

`./quantize ggml-model-f16.bin ggml-model-q4_0.bin 2`
@slaren
Copy link
Member

slaren commented Apr 26, 2023

Nice usability upgrade! We could also change the atoi for std::stoi or similar so that other non-number inputs are detected instead of parsed as zero, but it doesn't have to be done here.

Copy link
Collaborator

@Green-Sky Green-Sky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes please

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

Successfully merging this pull request may close these issues.

3 participants