Instructions to use microsoft/Magma-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/Magma-8B with Transformers:
# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("microsoft/Magma-8B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
fix _no_split_modules
Browse files- modeling_magma.py +1 -1
modeling_magma.py
CHANGED
|
@@ -141,7 +141,7 @@ class MagmaPreTrainedModel(PreTrainedModel):
|
|
| 141 |
config_class = MagmaConfig
|
| 142 |
base_model_prefix = "model"
|
| 143 |
supports_gradient_checkpointing = True
|
| 144 |
-
_no_split_modules = ["
|
| 145 |
_skip_keys_device_placement = "past_key_values"
|
| 146 |
_supports_flash_attn_2 = True
|
| 147 |
|
|
|
|
| 141 |
config_class = MagmaConfig
|
| 142 |
base_model_prefix = "model"
|
| 143 |
supports_gradient_checkpointing = True
|
| 144 |
+
_no_split_modules = ["MagmaImageTower"]
|
| 145 |
_skip_keys_device_placement = "past_key_values"
|
| 146 |
_supports_flash_attn_2 = True
|
| 147 |
|