Skip to content

Commit

Permalink
update peft code snippet (#1048)
Browse files Browse the repository at this point in the history
this pr fixes #1047
  • Loading branch information
not-lain authored Nov 27, 2024
1 parent fa66cb3 commit 7a78221
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/tasks/src/model-libraries-snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -933,10 +933,9 @@ export const peft = (model: ModelData): string[] => {
}

return [
`from peft import PeftModel, PeftConfig
`from peft import PeftModel
from transformers import AutoModelFor${pefttask}
config = PeftConfig.from_pretrained("${model.id}")
base_model = AutoModelFor${pefttask}.from_pretrained("${peftBaseModel}")
model = PeftModel.from_pretrained(base_model, "${model.id}")`,
];
Expand Down

0 comments on commit 7a78221

Please sign in to comment.