-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Proposing To Add Naming Convention For GGUF files in documents #820
Comments
On a side note... does it make sense to also standardize between internal KV form and JSON conversion and back? Doesn't seem to be an issue for huggingface, but it's something to consider. |
I am not sure, if Things need to change. Edit: I also created a discussion at https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard/discussions/761 |
@ThiloteE yeah currently doing some extra refactoring in ggerganov/llama.cpp#7499 and got some extra thoughts so maybe have a look at my last comment there and see if you got your 5c (At the moment, for that refactoring, was trying to figure out how to do auto estimation of model size) If we need to, we can adjust the naming convention as needed to encourage best practice, but will need some guidance from the wider huggingface community what they expect. E.g. do we need a variant field (e.g. -instruct) and should version code actually go to the back of the filename? (Also do let us know if the internal KV store is missing any fields that would be handy to have in terms of keeping track of model specs and naming) |
@ThiloteE okay I've now thought this a bit further and think TheBloke had the right idea for a naming scheme
So I've now updated my PR proposal in ggerganov/llama.cpp#7499 and will update the gguf naming convention doc if the PR passes. |
So, no version number of the base model, but only versioning the finetune? |
@ThiloteE and I, were looking into how to derive an approximate model parameter count based on information available. I wrote a script in powershell to pull the metadata with gguf-dump.py and followed this post https://kipp.ly/transformer-param-count/ to achieve a formula that is close. The formula was based on this paper https://arxiv.org/pdf/2112.00861 While the calculations match what is produced by kipply, I am not sure what may be missing from the formula, we believe it is off by about 7%. This may be due to the way the factor should be found. I believe it should be different for each model, probably calculated but I don't know how they found the factor they used. $p = ($factor * ($block_count) * ([math]::Pow($embedding_length, 2))) + (($vocab_size * $embedding_length)*2)
|
@ThiloteE (fair enought, let's keep the convo here)
I'm thinking of adding basename and finetune, but is there anything missing here that you think should be here for easier search engine reading of the KV store perhaps? |
In theory I am of the opinion: "add as much as possible, but only add as much as necessary", but I am not sure, if that holds in practice. In practice "add as much as possible" might be easier to work with :D
I read you take information from the readme.md into account, right? Some model authors do put useful information in there. For example
|
Just a heads up if anyone is interested that the ggerganov/llama.cpp#7499 PR is ready for review. I've now taken @ThiloteE suggestion into account, adding tags, datasets and model-index.name into account when writing to the gguf KV store in the interest of making it accessible for purposes like a leaderboard. I've decided that I shall keep to this |
Thank you @mofosyne for your work! 👍 |
@ThiloteE no probs. It's a teamwork everyone contributed a bit! ggerganov/llama.cpp#7499 now merged in, we may need to update the gguf documentation to reflect the new agreed upon form. |
#896 PR documentation change for ggml gguf standard waiting to be merged in |
Merged in ggerganov/llama.cpp#7165 in llama.cpp which also includes changes to how default filenames are generated.
However I wasn't too sure where to place the proposed "GGUF Naming Convention". I think I should place it in https://github.com/ggerganov/ggml/blob/master/docs/gguf.md but happy to hear otherwise.
In short the naming convention I want to document is
<Model>-<Version>-<ExpertsCount>x<Parameters>-<Quantization>.gguf
(details of the proposal in ggerganov/llama.cpp#4858)The text was updated successfully, but these errors were encountered: