Skip to content

FIne tuned Llama 3.1 (8B) on Custom data but generating Empty responses #2515

Closed

Description

@techieworld2

I have fine tuned Llama3.1_(8B)-Alpaca on my custom data which is a .json file with QA data.

Encountering the problem like if not setting the padding token as i saw somewhere that unsloth adds token by itself so i dont need to add it. Here are two problems i am encountering:

  1. If not adding the paddig token explicitly before passing the model to SFT trainer the model is generating continous junk response like : #Response #Response.... and so on

  2. If i add the token explicitly then the response is something like this :

<|begin_of_text|>Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

Instruction:

Who is the CEO of abc company?

Input:

Response:

<|end_of_text|>

My data is something like this:
[{instruction:some instruction,
input: some input,
output:some output
}]

i saw the yahma/alpaca-cleaned data where all of the input was in instruction key and the context was in input key so i handled my data that way too leaving the input empty and overriding my instruction values wtih the input ones
But still i am encountering the same issue

PS: If i just run the colab unsloth file without changing anything just changing the load dataset with my custom data
It is hallucinating and not giving the correct answer

Activity

  1. Erland366 commented on May 16, 2025

    @Erland366
    Collaborator

    Can you tell me how many steps, dataset that you use to train your data?

  2. self-assigned this
    on May 16, 2025
  3. added
    Discussion
    on May 16, 2025
  4. techieworld2 commented on May 30, 2025

    @techieworld2
    Author

    Can you tell me how many steps, dataset that you use to train your data?

    Your question helped me , searched it up a bit and saw i was using less data for training not less ,too less. Solved its working now. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions