litgpt
litgpt copied to clipboard
How to convert and use huggingface checkpoint in litgpt ?
How to convert and use huggingface checkpoint in litgpt ? For example, I want to use https://huggingface.co/LingoIITGN/ganga-1b checkpoint to fine tune for a specific task.
Hi there,
if it is a new model not already supported by LitGPT, the general procedure is outlined here (it's a bit involved): https://github.com/Lightning-AI/litgpt/blob/main/tutorials/developer-docs/adding-models.md
However, if it is a model that has the same architecture as an existing model, the following works:
litgpt download NousResearch/Hermes-2-Pro-Mistral-7B \
--model_name Mistral-7B-v0.1
This is just an example, but suppose the model is based on Llama 3.2, then the following would work:
litgpt download LingoIITGN/tanga-1b \
--model_name Llama-3.2-1B
where the existing models can be listed via
litgpt download list