Skip to content

Add converter for Hugging Face peft (LoRA) #204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 4 tasks
jlamypoirier opened this issue Mar 25, 2025 · 0 comments
Open
1 of 4 tasks

Add converter for Hugging Face peft (LoRA) #204

jlamypoirier opened this issue Mar 25, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@jlamypoirier
Copy link
Collaborator

🎯 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.
@jlamypoirier jlamypoirier added the enhancement New feature or request label Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant