unsloth/csm-1b
Original1.6Bparameters
Fixture39.7Mparameters
Layer stacks6compared
Findings0to review
✓ Same architecture, smaller
Every module class, layer kind and checked property of the original is in the fixture.
Layer stacks
One square per layer, colored by kind: the layer's module classes and type attributes. Hover a square for its index and kind.
backbone_model.layers
Original · 16
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| DecoderLayer | 16 | 2 | ✓ kept |
depth_decoder.model.layers
Original · 4
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| DecoderLayer | 4 | 2 | ✓ kept |
codec_model.encoder.encoder_transformer.layers
Original · 8
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| MimiTransformerLayer | 8 | 2 | ✓ kept |
codec_model.decoder.decoder_transformer.layers
Original · 8
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| MimiTransformerLayer | 8 | 2 | ✓ kept |
codec_model.quantizer.semantic_residual_vector_quantizer.layers
Original · 1
Fixture · 1
| Kind | Original | Fixture | |
|---|---|---|---|
| MimiEuclideanCodebook | 1 | 1 | ✓ kept |
codec_model.quantizer.acoustic_residual_vector_quantizer.layers
Original · 31
Fixture · 31
| Kind | Original | Fixture | |
|---|---|---|---|
| MimiEuclideanCodebook | 31 | 31 | ✓ kept |
Where the parameters are
Share of each model's parameters per component. Vocabulary and patch sizes are kept, so embeddings usually take a larger share of the fixture.
Original
Fixture
| Component | Original | Share | Fixture | Share |
|---|---|---|---|---|
| backbone_model.layers | 973.1M | 59.6% | 74.0K | 0.2% |
| embed_text_tokens | 262.7M | 16.1% | 8.2M | 20.7% |
| backbone_model.embed_tokens | 134.4M | 8.2% | 4.2M | 10.6% |
| depth_decoder.model.layers | 111.2M | 6.8% | 74.0K | 0.2% |
| depth_decoder.codebooks_head | 65.1M | 4.0% | 4.1M | 10.2% |
| codec_model.decoder.decoder_transformer.layers | 25.2M | 1.5% | 66.3K | 0.2% |
| codec_model.encoder.encoder_transformer.layers | 25.2M | 1.5% | 66.3K | 0.2% |
| 6 others | 35.2M | 2.2% | 23.0M | 57.8% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | attention style | GQA (32 heads, 8 KV) | GQA (4 heads, 2 KV) | ✓ kept |
| model | RoPE type | llama3 | llama3 | ✓ kept |
| model | model_type | csm | csm | ✓ kept |
| model | vocab_size | 2051 | 2051 | ✓ kept |
| model | tie_word_embeddings | True | True | ✓ kept |
| model | hidden_act | silu | silu | ✓ kept |
| model | max_position_embeddings | 2048 | 2048 | ✓ kept |
| depth_decoder_config | attention style | GQA (8 heads, 2 KV) | GQA (4 heads, 2 KV) | ✓ kept |
| depth_decoder_config | RoPE type | llama3 | llama3 | ✓ kept |
| depth_decoder_config | model_type | csm_depth_decoder_model | csm_depth_decoder_model | ✓ kept |
| depth_decoder_config | vocab_size | 2051 | 2051 | ✓ kept |
| depth_decoder_config | hidden_act | silu | silu | ✓ kept |
| depth_decoder_config | max_position_embeddings | 33 | 33 | ✓ kept |
| codec_config | attention style | MHA (8 heads, 8 KV) | MHA (4 heads, 4 KV) | ✓ kept |
| codec_config | RoPE type | default | default | ✓ kept |
| codec_config | model_type | mimi | mimi | ✓ kept |
| codec_config | tie_word_embeddings | True | True | ✓ kept |
| codec_config | hidden_act | gelu | gelu | ✓ kept |
| codec_config | max_position_embeddings | 8000 | 8000 | ✓ kept |
| codec_config | sampling_rate | 24000 | 24000 | ✓ kept |
Module classes
Instances of each class in the built model (prefix Csm omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 238 | 54 |
| RMSNorm | 42 | 10 |
| LayerNorm | 32 | 8 |
| MimiEuclideanCodebook | 32 | 32 |
| MimiLayerScale | 32 | 8 |
| MimiVectorQuantization | 32 | 32 |
| Conv1d | 29 | 29 |
| ELU | 26 | 26 |
| MimiConv1d | 25 | 25 |
| Attention | 20 | 4 |
| DecoderLayer | 20 | 4 |
| MLP | 20 | 4 |
| SiLUActivation | 20 | 4 |
| GELUActivation | 16 | 4 |
| MimiAttention | 16 | 4 |
| MimiMLP | 16 | 4 |
| MimiTransformerLayer | 16 | 4 |
| ModuleList | 16 | 16 |
| Identity | 8 | 8 |
| MimiResnetBlock | 8 | 8 |
| ConvTranspose1d | 5 | 5 |
| MimiConvTranspose1d | 5 | 5 |
| Embedding | 3 | 3 |
| RotaryEmbedding | 2 | 2 |
| MimiResidualVectorQuantizer | 2 | 2 |
| MimiRotaryEmbedding | 2 | 2 |
| MimiTransformerModel | 2 | 2 |
| BackboneModel | 1 | 1 |
| BackboneModelEmbeddings | 1 | 1 |
| CodebooksHead | 1 | 1 |
| DepthDecoderForCausalLM | 1 | 1 |
| DepthDecoderModel | 1 | 1 |
| ForConditionalGeneration | 1 | 1 |
| MimiDecoder | 1 | 1 |
| MimiDecoderModel | 1 | 1 |
| MimiEncoder | 1 | 1 |
| MimiEncoderModel | 1 | 1 |
| MimiModel | 1 | 1 |
| MimiSplitResidualVectorQuantizer | 1 | 1 |
Config changes
19 fields changed, 96 unchanged.
| Field | Original | Fixture |
|---|---|---|
| codec_config.head_dim | 64 | 16 |
| codec_config.hidden_size | 512 | 64 |
| codec_config.intermediate_size | 2048 | 128 |
| codec_config.num_attention_heads | 8 | 4 |
| codec_config.num_hidden_layers | 8 | 2 |
| codec_config.num_key_value_heads | 8 | 4 |
| codec_config.upsample_groups | 512 | 64 |
| depth_decoder_config.backbone_hidden_size | 2048 | 64 |
| depth_decoder_config.head_dim | 128 | 16 |
| depth_decoder_config.hidden_size | 1024 | 64 |
| depth_decoder_config.intermediate_size | 8192 | 128 |
| depth_decoder_config.num_attention_heads | 8 | 4 |
| depth_decoder_config.num_hidden_layers | 4 | 2 |
| head_dim | 64 | 16 |
| hidden_size | 2048 | 64 |
| intermediate_size | 8192 | 128 |
| num_attention_heads | 32 | 4 |
| num_hidden_layers | 16 | 2 |
| num_key_value_heads | 8 | 2 |