Skip to content

Add converter for Hugging Face peft (LoRA) #204

@jlamypoirier

Description

@jlamypoirier

🎯 Goal (What & Why)

Follow-up to #149, #180. We want to allow converting to/from Hugging Face PEFT adapter format, i.e. so exported LoRA weights can be used with PeftModel.from_pretrained (https://huggingface.co/docs/peft/en/tutorial/peft_model_config#peft-models). Example: https://huggingface.co/ybelkada/opt-350m-lora/tree/main.

🚀 Execution Plan

Step 1: What is the smallest working version?

  • Add a PEFT external converter type that can import/export adapter config and weights. The format is different enough from Huggingface that it can't use the same base class, but we may still be able to reuse the ExternalStateDictCheckpointHandler machinery.
  • Add a specialized converter for GPT LoRA.

Step 2: What additional optimizations are possible (but optional)?

Allow converting both the pretrained model and the adapter.

📌 Acceptance Criteria (Must-Haves for Completion)

  • Things work as described above

🛠️ Project Management

  • Assign the project to the Fast-LLM project.
  • Set the Estimate field (in days) in the GitHub project.
  • Use the Size field to categorize the PR size (Small/Medium/Large).
  • Assign an owner when opening the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions