🚨 Delete duplicate code in backbone utils
Author: zucchini-nlp
Pull request: yes

# What does this PR do?

This PR cleans up backbone utilities. Specifically, we have currently 5 different config attr to decide which backbone to load, most of which can be merged into one and seem redundant
After this PR, we'll have only one `config.backbone_config` as a single source of truth. The models will load the backbone `from_config` and load pretrained weights only if the checkpoint has any weights saved. The overall idea is same as in other composite models

I removed these config attr:
- `backbone` - the backbone model id is now used to create a `backbone_config` by loading it from the hub or from timm
- `backbone_kwargs` - it is used to update `backbone_config` with user-provided kwargs (i.e. `backbone_config = CONFIG_MAPPING[model_type](**backbone_kwargs)`)
- `use_pretrained_backbone` - we don't load a pretrained backbone anymore unless the user is calling `from_pretrained`. The default is to initialize a model with random weights and let the users either tune it from scratch or load pretrained weights themselves
- `use_timm_backbone` - we can infer model type from config and the requested backbone type, so this arg was redundant


Along the way, I also updated the tests and docs. Recommended review path: `modeling_backbone_utils.py` -> `auto_factory.py` -> `timm backbone model files` -> couple other models of your choice

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_43323). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

View the CircleCI Test Summary for this PR:

https://huggingface.co/spaces/transformers-community/circle-ci-viz?pr=43323&sha=754b61

run-slow: auto, beit, bit, conditional_detr, convnext, convnextv2, d_fine, dab_detr, deformable_detr, depth_anything, detr, timm_backbone

This comment contains `run-slow`, running the specified jobs: 

models: ["models/auto", "models/beit", "models/bit", "models/conditional_detr", "models/convnext", "models/convnextv2", "models/d_fine", "models/dab_detr", "models/deformable_detr", "models/depth_anything", "models/detr", "models/timm_backbone"]
quantizations: []

## CI Results
[Workflow Run ⚙️](https://github.com/huggingface/transformers/actions/runs/21590811089)

### Commit Info
| Context | Commit | Description |
|---------|--------|-------------|
| RUN | [176e9614](https://github.com/huggingface/transformers/commit/176e9614be2164ba999c7a50510b0b864407fbfd) | merge commit |
| PR | [eb88a4c1](https://github.com/zucchini-nlp/transformers/commit/eb88a4c15f3a4e04b71ed4ecb51d14902b934ca2) | branch commit |
| main | [e5c8b0d1](https://github.com/huggingface/transformers/commit/e5c8b0d14a8d9822d684b92072b93c4c3422b0cb) | base commit |

✅ No failing test specific to this PR 🎉 👏 !


Hey! Very nice initiative, indeed backbones have been quite annoying and have no reason to exist at all in general (we can simply do usual composite models)! Especially the `timm_backbone` and its pretrained weights loading which does not work correctly with our `from_pretrained`.
In general, we could completely remove `timm_backbone` in favor of `timm_wrapper` I believe if we remove the `use_pretrained_weights` anyway 🤗
And about
> use_pretrained_backbone - we don't load a pretrained backbone anymore unless the user is calling from_pretrained

I believe we need to remove it completely - otherwise the loading is being done in the `__init__`, and when `from_pretrained` is called, if those weights are not in the main hf repo because they are assumed to only be on timm repo, then the weights will be considered missing and will be reinitialized.... So we can fully remove it IMO and assume weights need to live in hf repo, which will solve a long due issue! 

In general we want to move away from the backbone API as much as possible in favor of standard composite models so this will help 🤗

> In general, we could completely remove timm_backbone in favor of timm_wrapper I believe if we remove the use_pretrained_weights anyway 🤗

100% , that is my goal for the subsequent PR. This is already hard to manage with gh conflicts and models, so we need to first clean-up extra kwargs and keep it as `timm_backbone`

> I believe we need to remove it completely. So we can fully remove it IMO and assume weights need to live in hf repo, which will solve a long due issue!

It is removed already completely. We pop the kwarg and never use it, it's hardcoded as `False` in timm backbone modeling file. Atm the slow tests are passing which I believe means that the weights are already in hf repo for official releases



run-slow: auto, beit, bit, conditional_detr, convnext, convnextv2, d_fine, dab_detr, deformable_detr, depth_anything

This comment contains `run-slow`, running the specified jobs: 

models: ["models/auto", "models/beit", "models/bit", "models/conditional_detr", "models/convnext", "models/convnextv2", "models/d_fine", "models/dab_detr", "models/deformable_detr", "models/depth_anything"]
quantizations: []

**[For maintainers]** Suggested jobs to run (before merge)

run-slow: auto, beit, bit, conditional_detr, convnext, convnextv2, d_fine, dab_detr, deformable_detr

run-slow: beit, bit, conditional_detr, convnext, convnextv2, d_fine, dab_detr, deformable_detr, depth_anything, timm_backbone, detr, pp_doclayout_v3, resnet, vitpose

## CI Results
[Workflow Run ⚙️](https://github.com/huggingface/transformers/actions/runs/21666524332)

### Commit Info
| Context | Commit | Description |
|---------|--------|-------------|
| RUN | [18774550](https://github.com/huggingface/transformers/commit/1877455048a6d5766a3fea7138122801a7679f6c) | merge commit |
| PR | [ea9ac12d](https://github.com/zucchini-nlp/transformers/commit/ea9ac12d487492b328b83076221c8c617de1ce73) | branch commit |
| main | [480ed54e](https://github.com/huggingface/transformers/commit/480ed54e80ea09530ed8820028afc8d0b0b17b18) | base commit |

⚠️ No test being reported (jobs are skipped or cancelled)!


This comment contains `run-slow`, running the specified jobs: 

models: ["models/beit", "models/bit", "models/conditional_detr", "models/convnext", "models/convnextv2", "models/d_fine", "models/dab_detr", "models/deformable_detr", "models/depth_anything", "models/detr", "models/pp_doclayout_v3", "models/resnet", "models/timm_backbone", "models/vitpose"]
quantizations: []

## CI Results
[Workflow Run ⚙️](https://github.com/huggingface/transformers/actions/runs/21666783736)

### Commit Info
| Context | Commit | Description |
|---------|--------|-------------|
| RUN | [674802ce](https://github.com/huggingface/transformers/commit/674802ce1da31e085d06dcedd1488b05d79b8b3b) | merge commit |
| PR | [509ffc48](https://github.com/zucchini-nlp/transformers/commit/509ffc48ef659b27f6aa3489a57fd461bfce3ced) | branch commit |
| main | [480ed54e](https://github.com/huggingface/transformers/commit/480ed54e80ea09530ed8820028afc8d0b0b17b18) | base commit |

✅ No failing test specific to this PR 🎉 👏 !


Nice, slow CI passes and failing ones are just flaky