litgpt icon indicating copy to clipboard operation
litgpt copied to clipboard

How to convert and use huggingface checkpoint in litgpt ?

Open manshmaurya opened this issue 1 year ago • 1 comments

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.

manshmaurya avatar Dec 03 '24 17:12 manshmaurya

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

rasbt avatar Jan 07 '25 23:01 rasbt