File size: 708 Bytes
dfb775d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""Mistral Large 3 base-model preset. Auto-registers."""

from __future__ import annotations

from pydantic import BaseModel, ConfigDict


class Mistral3Preset(BaseModel):
    model_config = ConfigDict(extra="forbid")

    hf_id: str = "mistralai/Mistral-Large-3"
    chat_template: str = "hermes"
    max_seq_len: int = 32768
    fsdp_layer_class: str = "MistralDecoderLayer"
    moe: bool = False


_PRESET = Mistral3Preset()


def preset() -> Mistral3Preset:
    return _PRESET


def _register() -> None:
    from mindxtrain.models.registry import register_preset

    register_preset(_PRESET.hf_id, _PRESET)
    register_preset("mistral3", _PRESET)


_register()


__all__ = ["Mistral3Preset", "preset"]