fix: add mapping of deepseek_v32 model type
Author: mpashkovskii
Pull request: yes

# What does this PR do?

Adds the missing mapping for model type `deepseek_v32` to `deepseek_v3` model and `DeepseekV3Config`

Fixes #42590

## Before submitting
- [X] (almost) This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [X] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] 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.
- [ ] 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).
- [ ] Did you write any new necessary tests?


## Who can review?

@Cyrilvallez could you please review the changes?


Comments:
I think the tests are failing because of the irrelevant ResNet precision error.

I noticed that deepseek-ai/DeepSeek-V3.2 uses DeepSeek's native sparse attention. Does the current deepseek_v3 architecture support this? I don't see the Indexer or selector in the code here, so I wonder if this mapping is safe: https://github.com/huggingface/transformers/blob/8ebfd84fa7f4d6c59f5059a439fad10ada26b3ff/src/transformers/models/deepseek_v3/modeling_deepseek_v3.py#L430-L461

Yes, I don't think we can just map the new model to the old architecture!

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

run-slow: auto, deepseek_v32

Hi @huzama and @Rocketknight1, thanks for pointing that out. I’ve added the initial DeepSeek v3.2 implementation, but it still needs more testing and validation. I’d appreciate any feedback you have.

Do you know if anyone else is actively working on this? If so, does it make sense to complete the implementation in this PR?

View the CircleCI Test Summary for this PR:

https://huggingface.co/spaces/transformers-community/circle-ci-viz?pr=42767&sha=f17882

@mpashkovskii, I’m working on implementing an indexer and top k feature for a personal project. However, there are some minor changes needed to make it into a pull request.

You can try writing the code for the Indexer of DSA yourself. Alternatively, once I have a well-drafted version, I can also push the changes.

Hello @mpashkovskii  @huzama 
Does this temporary PR already support dpsk-v3.2?

@mpashkovskii hello
When I used your Pr, I noticed that the loaded model uses the DeepSeekv3 model structure instead of DeepSeekv32.
```
from transformers import AutoConfig, AutoTokenizer, AutoModelForCausalLM

model_name_or_path = "DeepSeek-v3.2"

config = AutoConfig.from_pretrained(model_name_or_path, trust_remote_code=True)

model = AutoModelForCausalLM.from_config(
    config=config, trust_remote_code=True, attn_implementation="flash_attention_2", torch_dtype=dtype
)

```

@freedom-cui the model is not implemented yet as of last commit. If you need only inference please check out VLLM library!

> @freedom-cui the model is not implemented yet as of last commit. If you need only inference please check out VLLM library!

Thank you very much for your reply. Is there a complete schedule available for supporting Deepseek v3.2 at this time?

Please see https://github.com/huggingface/transformers/pull/41251#issuecomment-3723078349 cc @ArthurZucker