Skip to content

Commit

Permalink
feat: exclude mamba blocks for jamba
Browse files Browse the repository at this point in the history
  • Loading branch information
NanoCode012 committed Apr 30, 2024
1 parent 5294653 commit e21ec47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/axolotl/utils/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for models and model loading"""

# pylint: disable=too-many-lines

import logging
Expand Down Expand Up @@ -504,6 +505,9 @@ def load_model(
bnb_config = {
"load_in_8bit": True,
}
# Exclude mamba blocks from int8 quantization for jamba
if cfg.model_config_type == "jamba":
bnb_config["llm_int8_skip_modules"] = ["mamba"]
model_kwargs["quantization_config"] = BitsAndBytesConfig(
**bnb_config,
)
Expand Down

0 comments on commit e21ec47

Please sign in to comment.