NielsRogge / Transformers-Tutorials

This repository contains demos I made with the Transformers library by HuggingFace.
MIT License
9.56k stars 1.46k forks source link

Supervised fine tuning (SFT) of an LLM using HuggingFace, no availabel files for LoRA #457

Open vietvo89 opened 4 months ago

vietvo89 commented 4 months ago

Hi @NielsRogge

I tried to follow your notebook. But after trainer.train() and trainer.save_state() steps, I can't find where the LoRA is saved. I expect it should be in 'data/zephyr-7b-sft-lora' but I just found these files and I think they are not LoRA. Screenshot from 2024-07-30 16-25-38

At inference step, I tried to load the trained model with LoRA, I got an error:

OSError: data[/zephyr-7b-sft-lora](http://localhost:8888/zephyr-7b-sft-lora) does not appear to have a file named config.json. Checkout 'https://huggingface.co/data/zephyr-7b-sft-lora/tree/None' for available files.

I do not know what's wrong. Can you help to resolve this problem?

Thanks