populate "text_config"

#34
by ngxson HF staff - opened

While working on this refactoring on llama.cpp, I came across a problem that the convert_hf_to_gguf.py escript can never handle missing params by using "_name_or_path". This PR proposes the solution is to add all missing params to "text_config"

Llava Hugging Face org

Hey! Thanks for working on GGUF for llava models, I've been trying to get that working for new llava architectures until I realized that it might take too much time.

I see what is the issue and I may not see the whole picture (cmiiw), but is it possible to load the config first with HF AutoConfig.from_pretrained(model_id) so that all default values are filled up? Then you can simply turn the config into dict and iterate over its params as usual. That seems way more easier and reliable since we cannot go over all llava and non-llava VLM repositories asking people to add default config values. Also if anyone tried to update the model and calls psuH-to_hub. the defaults will be removed automatically. So one would need to add them back manually which looks like too much extra work we can try to avoid. WDYT?

OK thanks for the clue, AutoConfig.from_pretrained(model_id) works for me. I will close this PR now.

ngxson changed pull request status to closed

Sign up or log in to comment