Untangle config inheritance
Author: zucchini-nlp
Pull request: yes

# What does this PR do?

As per title, deletes base config attributes that are not actually universal for all models (e.g. token ids used only for text models and tying can be done only if model has embedding layers)

After this PR, we need to clean up generation-related params from config classes (https://github.com/huggingface/transformers/pull/41695), and then we can easily turn config classes to a `dataclass`. Using `dataclass` is one of the requirements for hf hub type validation which I am working on currently

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

Oh no, I caused 100+ merge conflicts with another PR 🙃 

@bot /style

Style fix is beginning .... [View the workflow run here](https://github.com/huggingface/transformers/actions/runs/19366312023).

What happened while rebasing, why 3k test failures 😭 

Oke, 400 failures after fixing tying embeddings in non-LLM models, better. I will wait for the weight tying to be fixed on main, otherwise there will be even more merge conflicts to fix

I will come back to this one, it will require some time to fix all the issues

run-slow: afmoe, aimv2, albert, align, altclip, apertus, arcee, aria, audioflamingo3, auto, bamba, bark, bart, bert, bert_generation, big_bird, llama, gemma, gemma3, gemma2, paligemma, llava, llava_next, mistral, qwen2_vl, t5gemma, florence

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

models: ["models/afmoe", "models/aimv2", "models/albert", "models/align", "models/altclip", "models/apertus", "models/arcee", "models/aria", "models/audioflamingo3", "models/auto", "models/bamba", "models/bark", "models/bart", "models/bert", "models/bert_generation", "models/big_bird", "models/gemma", "models/gemma2", "models/gemma3", "models/llama", "models/llava", "models/llava_next", "models/mistral", "models/paligemma", "models/qwen2_vl", "models/t5gemma"]
quantizations: []

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

✅ No failing test specific to this PR 🎉 !


Wow, slow tests passing! 😮  In any case, I want to do full CI and I will ask Yih-Dar after the vacations

run-slow: afmoe, aimv2, albert, align, altclip, apertus, arcee, aria, audioflamingo3, auto, bamba, bark, bart, bert, bert_generation, big_bird, llama, gemma, gemma3, gemma2, paligemma, llava, llava_next, llava_next_video, mistral, qwen2_vl, t5gemma, florence



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

models: ["models/afmoe", "models/aimv2", "models/albert", "models/align", "models/altclip", "models/apertus", "models/arcee", "models/aria", "models/audioflamingo3", "models/auto", "models/bamba", "models/bark", "models/bart", "models/bert", "models/bert_generation", "models/big_bird", "models/gemma", "models/gemma2", "models/gemma3", "models/llama", "models/llava", "models/llava_next", "models/llava_next_video", "models/mistral", "models/paligemma", "models/qwen2_vl", "models/t5gemma"]
quantizations: []

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

### Model CI Report

#### ❌ Failed tests

- [gemma3](https://github.com/huggingface/transformers/actions/runs/20926567527/job/60126219174):
    tests/models/gemma3/test_modeling_gemma3.py::Gemma3TextModelTest::test_generation_beyond_sliding_window_tiny_model
    tests/models/gemma3/test_modeling_gemma3.py::Gemma3IntegrationTest::test_export_text_only
    tests/models/gemma3/test_modeling_gemma3.py::Gemma3IntegrationTest::test_generation_beyond_sliding_window_1_sdpa
    tests/models/gemma3/test_modeling_gemma3.py::Gemma3IntegrationTest::test_generation_beyond_sliding_window_2_eager
    tests/models/gemma3/test_modeling_gemma3.py::Gemma3IntegrationTest::test_model_1b_text_only

- [llava](https://github.com/huggingface/transformers/actions/runs/20926567527/job/60126219205):
    tests/models/llava/test_modeling_llava.py::LlavaForConditionalGenerationIntegrationTest::test_generation_siglip_backbone



Full CI didn't show any test errors, so I will be wrapping this up today-tmrw

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

run-slow: afmoe, aimv2, albert, align, altclip, apertus, arcee, aria, audioflamingo3, auto, bamba, bark, bart, bert, bert_generation, big_bird

View the CircleCI Test Summary for this PR:

https://huggingface.co/spaces/transformers-community/circle-ci-viz?pr=41541&sha=0e9d3d

Thanks, now I will go back to the hub validation and making configs a `dataclass` 🎉