We need more information about Model tree
Light1Smile opened this issue · 5 comments
Doc request
I am very pleased that Hugging Face recently added the Model Tree, a really cool feature, and I believe it's a great tool for studying Model Reuse. However, I haven’t found much information in Hugging Face's documentation to better understand and use it. For example, information on all types of finetuning and the criteria for distinguishing them; how to retrieve all relevant finetuned models based on the model name via the API. I want to iterate on this to build a complete reuse network. As far as I know, adding a basemodel to the metadata will generate a Model Tree, and models with GGUF files are considered Quantizations, etc.
I hope there is relevant documentation available. If so, please provide the corresponding documentation links. If there is an API to call the Model Tree, please provide the related documentation. If not, I hope it can be developed and made available soon. Thank you very much.
Edit
Using ?expand=baseModels
is the best way as it supports redirects. See this as an example
https://huggingface.co/api/models/MaziyarPanahi/calme-2.1-qwen2-72b?expand=baseModels
Hi there 👋
We have some documentation on how to specify a base_model
and how the relationship can be overridden https://huggingface.co/docs/hub/en/model-cards#specifying-a-base-model . You can programmatically get the base model by doing
model = model_info(model_id)
model.card_data.get("base_model")
Or alternatively get the whole tree using https://huggingface.co/api/models/MaziyarPanahi/calme-2.1-qwen2-72b?expand=baseModels
I agree we can document better (1) how the relationships are determined and (2) document the way to expand the whole tree
+1, in favor of having a tiny "learn more" button at each model tree which links to the docs.
model = model_info(model_id) model.card_data.get("base_model")
not the best way because you don't get support for redirects of rename, etc
Better to get the baseModel
in the model API directly
model = model_info(model_id) model.card_data.get("base_model")
not the best way because you don't get support for redirects of rename, etc
Better to get the
baseModel
in the model API directly
I’m very glad to have received team's reply and got a lot of useful information 😊. However, if we are only retrieving the base model, at most, we can only obtain a chain from the current model to the original model. If it's possible to retrieve all the finetuned sub-models of a model via API, we could then follow the mentioned chain step by step to obtain the entire model reuse tree network, which contains hundreds of models. I think this is a really cool thing. May I ask, with the current API, is it possible to achieve this?