DB-GPT icon indicating copy to clipboard operation
DB-GPT copied to clipboard

How could I convert my model to hf

Open Galaxy-Ding opened this issue 1 year ago • 1 comments

Hi, I'm new to this huggingface transformation. I now have:

  • vicuuna13b.pth(which i finetune with my data)

I want to convert it into a huggingface model like yours repo [https://huggingface.co/Tribbiani/vicuna-7b/tree/main]

  • config.json
  • generation_config.json
  • pytorch_model-00001-of-00002.bin
  • pytorch_model-00002-of-00002.bin
  • pytorch_model.bin.index.json
  • special_tokens_map.json
  • tokenizer.json
  • tokenizer_config.json

What should I do to have these files under a repo like yours? Can you be more specific?

Galaxy-Ding avatar May 17 '23 07:05 Galaxy-Ding

Maybe you can try this:

wget https://raw.githubusercontent.com/huggingface/transformers/main/src/transformers/models/llama/convert_llama_weights_to_hf.py

python convert_llama_weights_to_hf.py --input_dir /path/to/downloaded/llama/weights --model_size 13B --output_dir /output/path

csunny avatar May 17 '23 08:05 csunny

If you do not have any other questions, this issue will be closed at a later time.

csunny avatar Oct 26 '23 01:10 csunny