Fix MXFP4 quantizer to support variable num_local_experts and hidden_size
Author: marksverdhei
Pull request: yes

# What does this PR do?

This PR replaces hardcoded values `num_local_experts` and `hidden_size` in `MXFP4Config` for `GPT-OSS` type models.

I discovered this when experimenting with non-standard configs of GPT-OSS architecture but i'm pretty sure it'll break for openai/gpt-oss-120b as well since it's number of experts is different from the hardcoded value. 

The quantizer hardcoded 32 experts and 2880 hidden_size in the reshape operations. This caused failures when quantizing models with different numbers of experts.

Changes:
- Read num_local_experts and hidden_size from model.config
- Use dynamic values in reshape operations instead of hardcoded constants
- Defaults to 32 and 2880 for backward compatibility

This enables quantizing averaged/merged MoE models with fewer experts.
Passed all tests that I was able to run locally on 24gb of vram.

## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - no
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section? - yes
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case. - I looked and didn't find an issue
- [x] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - likely not necessary
- [x] Did you write any new necessary tests? - no, unsure if needed


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- text models: @ArthurZucker @Cyrilvallez
- vision models: @yonigozlan @molbap
- audio models: @eustlb @ebezzam @vasqu
- multimodal models: @zucchini-nlp
- graph models: @clefourrier

Library:

- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- continuous batching: @remi-or @ArthurZucker @McPatate
- pipelines: @Rocketknight1
- tokenizers: @ArthurZucker and @itazap
- trainer: @SunMarc
- attention: @vasqu @ArthurZucker @CyrilVallez
- model loading (from pretrained, etc): @CyrilVallez
- distributed: @3outeille @ArthurZucker
- CIs: @ydshieh

Integrations:

- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization: @SunMarc @MekkCyber
- kernels: @MekkCyber @drbh
- peft: @BenjaminBossan @githubnemo

Devices/Backends:

- AMD ROCm: @ivarflakstad
- Intel XPU: @IlyasMoutawwakil
- Ascend NPU: @ivarflakstad 

Documentation: @stevhliu

Research projects are not maintained and should be taken as is.

 -->


Comments:
cc @mekkcyber for quantization

run-slow: mxfp4

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

models: []
quantizations: ['quantization/mxfp4'] ...

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

run-slow: mxfp4

run-slow: mxfp4

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

models: []
quantizations: ['quantization/mxfp4'] ...

> run-slow: mxfp4

Regarding the tests: `Executing the custom container implementation failed. Please contact your self hosted runner administrator.` 
To me it looks like it failed because of issues with the CI infra. I wasn't able to see any logs in the gh actions logs.
Otherwise, I'm curious where I'm supposed to find the result of the actual pytest run

run-slow: mxfp4

hey @marksverdhei, yes it seems it was a docker issue, I relaunched the tests let's see if it works

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

models: []
quantizations: ['quantization/mxfp4'] ...

seems to be working 🥳 

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