Add QuasarV4 model 
Author: troy12x
Pull request: yes


## What does this PR do?

This PR adds the QuasarV4 model to the transformers library, introducing a new architecture with token temperature mechanism and multi-scale token processing for efficient long context handling.

QuasarV4 extends transformer architecture with two key innovations:
1. **Token Temperature Mechanism**: Dynamically adjusts token importance based on contextual relevance
2. **Multi-Scale Token Processing**: Handles long contexts efficiently by processing tokens at multiple temporal resolutions

These innovations allow QuasarV4 to:
- Maintain computational efficiency by focusing attention on important tokens
- Preserve high-resolution information for recent context while compressing older context
- Achieve better performance on long-context tasks compared to standard transformer models

## Technical Implementation

- Added `modeling_quasarv4.py` with the core model implementation
- Added `configuration_quasarv4.py` with model configuration options
- Implemented token temperature calculation layers
- Added hierarchical compression memory for multi-scale token processing

## Model Architecture

QuasarV4 builds on transformer architecture with several key innovations (Qwen-3 Based): 


### Token Temperature Mechanism

The signature feature of QuasarV4 is its token temperature mechanism, which dynamically adjusts the importance of each token based on context:

1. **Multi-dimensional Temperature Calculation**
   - 4-layer temperature projection network
   - Position-dependent temperature scaling
   - Token importance calculation
   - Context-aware scaling

2. **Temperature-Guided Attention**
   - Attention weights modulated by token temperature
   - Efficient focus on contextually important tokens
   - Reduced computational waste on irrelevant tokens

### Multi-Scale Token Processing

To efficiently handle long contexts, QuasarV4 implements:

1. **Hierarchical Compression Memory**
   - Process tokens at multiple temporal resolutions simultaneously
   - Recent tokens at high resolution, older context at progressively lower resolutions

2. **Cross-Resolution Attention**
   - Tokens can attend across different resolution levels
   - Maintains global context while focusing computational resources
   - Enables efficient processing of extremely long sequences



## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [yes] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section?
- [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.
- [yes] Did you make sure to update the documentation with your changes?
- [yes] Did you write any new necessary tests?



Comments:
@gante 
@ArthurZucker 

Hi @troy12x, is there an existing pre-trained model with this architecture?

> Hi @troy12x, is there an existing pre-trained model with this architecture?

hi @Rocketknight1 here : [silx-ai/QuasarV4-600M-Transformer ](https://huggingface.co/silx-ai/QuasarV4-600M-Transformer/)

Hi @troy12x, unfortunately we usually don't merge PRs into the main library until there's a checkpoint with a lot of usage! The reason is that once they're in `transformers` then the team at Hugging Face takes responsibility for maintaining them, and so we can only do it for models with a lot of users (and even then, lots of models stay custom code for a long time; Phi-3.5 was at the top of the trending page for weeks as a custom code model). 

I think it's fine to leave this as custom code for now, and if it gets a lot of traction with the community we can reopen the PR then!

> Hi @troy12x, unfortunately we usually don't merge PRs into the main library until there's a checkpoint with a lot of usage! The reason is that once they're in `transformers` then the team at Hugging Face takes responsibility for maintaining them, and so we can only do it for models with a lot of users (and even then, lots of models stay custom code for a long time; Phi-3.5 was at the top of the trending page for weeks as a custom code model).
> 
> I think it's fine to leave this as custom code for now, and if it gets a lot of traction with the community we can reopen the PR then!

SURE THANKS