| 1 | # SPDX-License-Identifier: Apache-2.0 |
| 2 | # SPDX-FileCopyrightText: Copyright contributors to the vLLM project |
| 3 | |
| 4 | from transformers import DeepseekV3Config |
| 5 | |
| 6 | |
| 7 | class Dots3NoteConfig(DeepseekV3Config): |
| 8 | """Configuration for the Dots3Note hybrid DSA/SWA model.""" |
| 9 | |
| 10 | model_type = "dots3_note" |
| 11 | |
| 12 | def __init__(self, **kwargs): |
| 13 | # These fields are absent from existing Note config.json files. Do |
| 14 | # not inherit DeepSeek-V3's 8-group/4-group router defaults: Note was |
| 15 | # trained with an ungrouped (1/1) noaux_tc router, as defined by the |
| 16 | # reference Dots3Config in SGLang haimain. A different grouping |
| 17 | # changes the selected experts at every MoE layer. |
| 18 | kwargs.setdefault("n_group", 1) |
| 19 | kwargs.setdefault("topk_group", 1) |
| 20 | # Dots3 projects the indexer RoPE coordinates in adjacent (GPT-J) |
| 21 | # pairs. DeepSeek-V3.2 defaults to the split-half NeoX layout when |
| 22 | # this flag is absent, which rotates different learned coordinates. |
| 23 | kwargs.setdefault("indexer_rope_interleave", True) |
| 24 | kwargs.setdefault("num_nextn_predict_layers", 1) |
| 25 | super().__init__(**kwargs) |