Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Convert quantize.cpp to Rust #40

Closed
philpax opened this issue Mar 18, 2023 · 5 comments · Fixed by #84
Closed

Convert quantize.cpp to Rust #40

philpax opened this issue Mar 18, 2023 · 5 comments · Fixed by #84
Assignees
Labels
issue:enhancement New feature or request
Milestone

Comments

@philpax
Copy link
Collaborator

philpax commented Mar 18, 2023

Split this off from #21 as it's a separate issue.

This should be relatively straightforward - it reads in the original ggml model, runs the quantization functions over the data, and writes it out to disk.

The exciting possibility is for parallelisation 👀 - all you should have to do is scan through the file to determine the tensor boundaries, then build an iterator from it and feed it to rayon. It would be a huge improvement over the C++ version, and it would be practically free!

@FloppyDisck
Copy link
Contributor

If theres nobody working on this I could tackle it in the week

@philpax philpax added the issue:enhancement New feature or request label Mar 24, 2023
@FloppyDisck
Copy link
Contributor

Is there currently a way to convert models to ggml format? Im close to getting quantize into a working demo and was wondering if this should also be ported for the PR

@philpax
Copy link
Collaborator Author

philpax commented Mar 25, 2023

Nope, that still requires the original Python code. If you want to tackle #21 as well, that would be awesome!

@FloppyDisck
Copy link
Contributor

I have no problem working on it after I finish this issue.

Another question, how should the feature be used? Should it be another argument in the cli app?

@philpax
Copy link
Collaborator Author

philpax commented Mar 25, 2023

Hm, just do the simplest possible thing for now and we'll figure out a new CLI. There's several changes landing to the CLI soon, so we should avoid doing anything complicated until it's entirely resolved.

@philpax philpax mentioned this issue Mar 26, 2023
3 tasks
@philpax philpax added this to the 0.1 milestone Apr 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue:enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants