Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
class AprielSSMHybridConfig(MistralConfig):
model_type = "apriel_ssm_thinker_hybrid"

def __init__(self, hybrid_block_layout=["m2d"], ssm_cfg=None, **kwargs):
Copy link
Contributor Author

@nitsanluke nitsanluke Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we clean up this configs? @oleksost

ssm_config_default = {	ssm_config_default = {
    # discrete mamba2	    # discrete mamba2
    "d_state": 64,	    "d_state": 64,
    "n_v_heads": 32,	    "n_v_heads": 32,
    "n_qk_heads": 32,	    "n_qk_heads": 32,
    "expand": 1,	    "expand": 1,
    "chunk_size": 128,	    "chunk_size": 128,
    "activation": "identity",	    "activation": "identity",
    "bias": False,	    "bias": False,
    "d_conv": 4,	    "d_conv": 4,
    "d_inner": 32 * 128,	    "d_inner": 32 * 128,
    # mamba2	    # mamba2
    "d_xb": None,  # will be set to model dim	    "d_xb": None,  # will be set to model dim
    "dt_rank": "auto",	    "dt_rank": "auto",
    "dt_min": 0.001,	    "dt_min": 0.001,
    "dt_max": 0.1,	    "dt_max": 0.1,
    "dt_init": "random",	    "dt_init": "random",
    "dt_scale": 1.0,	    "dt_scale": 1.0,
    "dt_init_floor": 1e-4,	    "dt_init_floor": 1e-4,
    "conv_bias": True,
    ```

def __init__(self, hybrid_block_layout=["m2"], ssm_cfg=None, **kwargs):
super().__init__(**kwargs)
self.hybrid_block_layout = hybrid_block_layout
self.head_dim = self.head_dim or self.hidden_size // self.num_attention_heads # as in transformers 4.51.3
Expand Down
Loading