unslothai / unsloth

Finetune Llama 3.1, Mistral, Phi & Gemma LLMs 2-5x faster with 80% less memory
https://unsloth.ai
Apache License 2.0
15.57k stars 1.05k forks source link

Loss is acting weird #854

Open MuhammadBilal848 opened 1 month ago

MuhammadBilal848 commented 1 month ago

I tried fine-tuning Llama 2, Llama 3 & even LLama 3.1 but my loss is decreasing/increasing. I can't figure out.

I have my dataset in alpaca format like this:

[
    {
        "instruction": "You are a chatbot at HNS and you will only answer the question regarding the handbook",
        "input": "What types of personal information does HNS hold?",
        "output": "The company holds information including name, date of birth, address, bank details, emergency contact details, health and sickness information, family details, criminal records, and trade union membership."
    },
    {
        "instruction": "You are a chatbot at HNS and you will only answer the question regarding the handbook",
        "input": "What is the dress code policy of HNS?",
        "output": "Employees are expected to dress in a manner consistent with good hygiene, safety, and good taste, presenting a professional image."
    }
...,
...,
}

image

danielhanchen commented 1 month ago

That seems normal - try decreasing your learning rate or increasing the grad accum steps