Skip to content

inference finetuned model using LoRa in Huggingface format #442

@LamOne1

Description

@LamOne1

Hello,
I used this script to merge Lora weights to the base model. Then, I used this script to convert my model to huggingface format.
But when I inference the model in Huggingface it never output end token, it looks like a pretrained model rather than a finetuned one.
here is my inference pipeline:

response = generation_pipeline(prompt,
        pad_token_id=tokenizer.eos_token_id,
        do_sample=False,
        num_beams=4,
        max_length=500,
        top_p=0.1,
        top_k=20,
        repetition_penalty = 3.0,
        no_repeat_ngram_size=3)[0]['generated_text']

I'm not sure if the inference pipeline matches the one in this repository.
The reason why I want to inference my model there because I'm facing an issue in the generate script & I want to use beam search.

I appreciate your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions