text: 
  
  TITLE
  Unified freezing interface
  
  COMMENTS
  12
  
  REACTIONS
  +1: 0
  -1: 0
  laugh: 0
  hooray: 0
  heart: 0
  rocket: 0
  eyes: 0
  
  BODY
  # 🚀 Feature request
  
  We can freeze the backbone of individual models by finding the field name of the backbone (e.g., `bert` in `BertForSequenceClassification`) and setting `.requires_grad`. However, because the name of this field differs for different models, I don't think there's currently an easy way to do this that works for all models. This contradicts the philosophy that `AutoModel(ForXXX)` should hide all the implementation details.
  
  Ideally, we can pass a `trainable_backbone` flag in the config or to the `__init__` function directly that controls this behavior.