This PR adds a new feature to PEFT models that allows to better understand the status of adapter(s) on the model. Quoting from the doc entry that I added: Sometimes, the PEFT model can end up in a bad state, especially when handling multiple adapters. There can be some confusion around what adapters exist, which one is active, which one is merged, etc. To help investigate this issue, you can call the get_layer_status and the get_model_status methods. The first one gives you a detailed overview about the adapters for each targeted layer. The latter one gives you a high-level overview about the model status. --------- Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
1.6 KiB
Models
[PeftModel] is the base model class for specifying the base Transformer model and configuration to apply a PEFT method to. The base PeftModel contains methods for loading and saving models from the Hub.
PeftModel
autodoc PeftModel - all
PeftModelForSequenceClassification
A PeftModel for sequence classification tasks.
autodoc PeftModelForSequenceClassification - all
PeftModelForTokenClassification
A PeftModel for token classification tasks.
autodoc PeftModelForTokenClassification - all
PeftModelForCausalLM
A PeftModel for causal language modeling.
autodoc PeftModelForCausalLM - all
PeftModelForSeq2SeqLM
A PeftModel for sequence-to-sequence language modeling.
autodoc PeftModelForSeq2SeqLM - all
PeftModelForQuestionAnswering
A PeftModel for question answering.
autodoc PeftModelForQuestionAnswering - all
PeftModelForFeatureExtraction
A PeftModel for getting extracting features/embeddings from transformer models.
autodoc PeftModelForFeatureExtraction - all
PeftMixedModel
A PeftModel for mixing different adapter types (e.g. LoRA and LoHa).
autodoc PeftMixedModel - all
Utilities
autodoc utils.cast_mixed_precision_params
autodoc get_peft_model
autodoc inject_adapter_in_model
autodoc utils.get_peft_model_state_dict
autodoc utils.prepare_model_for_kbit_training
autodoc get_layer_status
autodoc get_model_status