Open CurtiusSimplus opened 4 weeks ago
I put in new start code: %%capture !Pip install --upgrade --no-cache-dir transformers !pip install --upgrade --no-cache-dir unsloth
and reset the run time ... seems to be fixed.
@CurtiusSimplus Apologies Mamba Falcon is not yet supported sorry!
https://colab.research.google.com/drive/1Ys44kVvmeZtnICzWz0xgpRnrIOjZAuxp?usp=sharing#scrollTo=2eSvM9zX_2d3
%%capture !pip install unsloth
Also get the latest nightly Unsloth!
!pip uninstall unsloth -y && pip install --upgrade --no-cache-dir "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
result when trying to load model ...
==((====))== Unsloth 2024.9.post3: Fast Mistral patching. Transformers = 4.47.0.dev0. \ /| GPU: NVIDIA L4. Max memory: 22.168 GB. Platform = Linux. O^O/ _/ \ Pytorch: 2.5.0+cu124. CUDA = 8.9. CUDA Toolkit = 12.4. \ / Bfloat16 = TRUE. FA [Xformers = 0.0.28.post2. FA2 = False] "-____-" Free Apache license: http://github.com/unslothai/unsloth Unsloth: Fast downloading is enabled - ignore downloading bars which are red colored!
ModuleNotFoundError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py in _get_module(self, module_name)
14 frames /usr/lib/python3.10/importlib/init.py in import_module(name, package) 125 level += 1 --> 126 return _bootstrap._gcd_import(name[level:], package, level) 127
/usr/lib/python3.10/importlib/_bootstrap.py in _gcd_import(name, package, level)
/usr/lib/python3.10/importlib/_bootstrap.py in _find_andload(name, import)
/usr/lib/python3.10/importlib/_bootstrap.py in _find_and_loadunlocked(name, import)
ModuleNotFoundError: No module named 'transformers.models.falcon_mamba.configuration_falcon_mamba'
The above exception was the direct cause of the following exception:
RuntimeError Traceback (most recent call last) in <cell line: 24>()
22 ] # More models at https://huggingface.co/unsloth
23
---> 24 model, tokenizer = FastLanguageModel.from_pretrained(
25 model_name = "unsloth/Mistral-Nemo-Instruct-2407-bnb-4bit",
26 max_seq_length = max_seq_length,
/usr/local/lib/python3.10/dist-packages/unsloth/models/loader.py in from_pretrained(model_name, max_seq_length, dtype, load_in_4bit, token, device_map, rope_scaling, fix_tokenizer, trust_remote_code, use_gradient_checkpointing, resize_model_vocab, revision, *args, **kwargs) 330 pass 331 --> 332 model, tokenizer = dispatch_model.from_pretrained( 333 model_name = model_name, 334 max_seq_length = max_seq_length,
/usr/local/lib/python3.10/dist-packages/unsloth/models/mistral.py in from_pretrained(model_name, max_seq_length, dtype, load_in_4bit, token, device_map, rope_scaling, fix_tokenizer, model_patcher, tokenizer_name, trust_remote_code, kwargs) 345 kwargs, 346 ): --> 347 return FastLlamaModel.from_pretrained( 348 model_name = model_name, 349 max_seq_length = max_seq_length,
/usr/local/lib/python3.10/dist-packages/unsloth/models/llama.py in from_pretrained(model_name, max_seq_length, dtype, load_in_4bit, token, device_map, rope_scaling, fix_tokenizer, model_patcher, tokenizer_name, trust_remote_code, **kwargs) 1590 if load_in_4bit: kwargs["quantization_config"] = bnb_config 1591 -> 1592 model = AutoModelForCausalLM.from_pretrained( 1593 model_name, 1594 device_map = device_map,
/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py in from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs) 541 has_local_code = type(config) in cls._model_mapping.keys() 542 trust_remote_code = resolve_trust_remote_code( --> 543 trust_remote_code, pretrained_model_name_or_path, has_local_code, has_remote_code 544 ) 545
/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py in keys(self) 778 ( 779 self._load_attr_from_module(key, self._config_mapping[key]), --> 780 self._load_attr_from_module(key, self._model_mapping[key]), 781 ) 782 for key in self._model_mapping.keys()
/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py in(.0)
779 self._load_attr_from_module(key, self._config_mapping[key]),
780 self._load_attr_from_module(key, self._model_mapping[key]),
--> 781 )
782 for key in self._model_mapping.keys()
783 if key in self._config_mapping.keys()
/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py in _load_attr_from_module(self, model_type, attr) 775 776 def items(self): --> 777 mapping_items = [ 778 ( 779 self._load_attr_from_module(key, self._config_mapping[key]),
/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py in getattribute_from_module(module, attr) 691 if isinstance(attr, tuple): 692 return tuple(getattribute_from_module(module, a) for a in attr) --> 693 if hasattr(module, attr): 694 return getattr(module, attr) 695 # Some of the mappings have entries model_type -> object of another model type. In that case we try to grab the
/usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py in getattr(self, name)
/usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py in _get_module(self, module_name)
RuntimeError: Failed to import transformers.models.falcon_mamba.configuration_falcon_mamba because of the following error (look up to see its traceback): No module named 'transformers.models.falcon_mamba.configuration_falconmamba'==((====))== Unsloth 2024.9.post3: Fast Mistral patching. Transformers = 4.47.0.dev0. \ /| GPU: NVIDIA L4. Max memory: 22.168 GB. Platform = Linux. O^O/ \/ \ Pytorch: 2.5.0+cu124. CUDA = 8.9. CUDA Toolkit = 12.4. \ / Bfloat16 = TRUE. FA [Xformers = 0.0.28.post2. FA2 = False] "-____-" Free Apache license: http://github.com/unslothai/unsloth Unsloth: Fast downloading is enabled - ignore downloading bars which are red colored!
ModuleNotFoundError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py in _get_module(self, module_name)
14 frames /usr/lib/python3.10/importlib/init.py in import_module(name, package) 125 level += 1 --> 126 return _bootstrap._gcd_import(name[level:], package, level) 127
/usr/lib/python3.10/importlib/_bootstrap.py in _gcd_import(name, package, level)
/usr/lib/python3.10/importlib/_bootstrap.py in _find_andload(name, import)
/usr/lib/python3.10/importlib/_bootstrap.py in _find_and_loadunlocked(name, import)
ModuleNotFoundError: No module named 'transformers.models.falcon_mamba.configuration_falcon_mamba'
The above exception was the direct cause of the following exception:
RuntimeError Traceback (most recent call last) in <cell line: 24>()
22 ] # More models at https://huggingface.co/unsloth
23
---> 24 model, tokenizer = FastLanguageModel.from_pretrained(
25 model_name = "unsloth/Mistral-Nemo-Instruct-2407-bnb-4bit",
26 max_seq_length = max_seq_length,
/usr/local/lib/python3.10/dist-packages/unsloth/models/loader.py in from_pretrained(model_name, max_seq_length, dtype, load_in_4bit, token, device_map, rope_scaling, fix_tokenizer, trust_remote_code, use_gradient_checkpointing, resize_model_vocab, revision, *args, **kwargs) 330 pass 331 --> 332 model, tokenizer = dispatch_model.from_pretrained( 333 model_name = model_name, 334 max_seq_length = max_seq_length,
/usr/local/lib/python3.10/dist-packages/unsloth/models/mistral.py in from_pretrained(model_name, max_seq_length, dtype, load_in_4bit, token, device_map, rope_scaling, fix_tokenizer, model_patcher, tokenizer_name, trust_remote_code, kwargs) 345 kwargs, 346 ): --> 347 return FastLlamaModel.from_pretrained( 348 model_name = model_name, 349 max_seq_length = max_seq_length,
/usr/local/lib/python3.10/dist-packages/unsloth/models/llama.py in from_pretrained(model_name, max_seq_length, dtype, load_in_4bit, token, device_map, rope_scaling, fix_tokenizer, model_patcher, tokenizer_name, trust_remote_code, **kwargs) 1590 if load_in_4bit: kwargs["quantization_config"] = bnb_config 1591 -> 1592 model = AutoModelForCausalLM.from_pretrained( 1593 model_name, 1594 device_map = device_map,
/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py in from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs) 541 has_local_code = type(config) in cls._model_mapping.keys() 542 trust_remote_code = resolve_trust_remote_code( --> 543 trust_remote_code, pretrained_model_name_or_path, has_local_code, has_remote_code 544 ) 545
/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py in keys(self) 778 ( 779 self._load_attr_from_module(key, self._config_mapping[key]), --> 780 self._load_attr_from_module(key, self._model_mapping[key]), 781 ) 782 for key in self._model_mapping.keys()
/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py in(.0)
779 self._load_attr_from_module(key, self._config_mapping[key]),
780 self._load_attr_from_module(key, self._model_mapping[key]),
--> 781 )
782 for key in self._model_mapping.keys()
783 if key in self._config_mapping.keys()
/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py in _load_attr_from_module(self, model_type, attr) 775 776 def items(self): --> 777 mapping_items = [ 778 ( 779 self._load_attr_from_module(key, self._config_mapping[key]),
/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py in getattribute_from_module(module, attr) 691 if isinstance(attr, tuple): 692 return tuple(getattribute_from_module(module, a) for a in attr) --> 693 if hasattr(module, attr): 694 return getattr(module, attr) 695 # Some of the mappings have entries model_type -> object of another model type. In that case we try to grab the
/usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py in getattr(self, name)
/usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py in _get_module(self, module_name)
RuntimeError: Failed to import transformers.models.falcon_mamba.configuration_falcon_mamba because of the following error (look up to see its traceback): No module named 'transformers.models.falcon_mamba.configuration_falcon_mamba'