ariG23498 HF Staff commited on
Commit
5167bb0
·
verified ·
1 Parent(s): de6ebc4

Upload zai-org_GLM-ASR-Nano-2512_1.txt with huggingface_hub

Browse files
Files changed (1) hide show
  1. zai-org_GLM-ASR-Nano-2512_1.txt +32 -19
zai-org_GLM-ASR-Nano-2512_1.txt CHANGED
@@ -1,26 +1,39 @@
1
  ```CODE:
2
  # Load model directly
3
- from transformers import AutoModelForCausalLM
4
- model = AutoModelForCausalLM.from_pretrained("zai-org/GLM-ASR-Nano-2512", trust_remote_code=True, dtype="auto")
 
 
5
  ```
6
 
7
  ERROR:
8
  Traceback (most recent call last):
9
- File "/tmp/zai-org_GLM-ASR-Nano-2512_1zlGi0x.py", line 25, in <module>
10
- model = AutoModelForCausalLM.from_pretrained("zai-org/GLM-ASR-Nano-2512", trust_remote_code=True, dtype="auto")
11
- File "/tmp/.cache/uv/environments-v2/1f148c168d860d2b/lib/python3.13/site-packages/transformers/models/auto/auto_factory.py", line 586, in from_pretrained
12
- model_class = get_class_from_dynamic_module(
13
- class_ref, pretrained_model_name_or_path, code_revision=code_revision, **hub_kwargs, **kwargs
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  )
15
- File "/tmp/.cache/uv/environments-v2/1f148c168d860d2b/lib/python3.13/site-packages/transformers/dynamic_module_utils.py", line 616, in get_class_from_dynamic_module
16
- return get_class_in_module(class_name, final_module, force_reload=force_download)
17
- File "/tmp/.cache/uv/environments-v2/1f148c168d860d2b/lib/python3.13/site-packages/transformers/dynamic_module_utils.py", line 311, in get_class_in_module
18
- module_spec.loader.exec_module(module)
19
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
20
- File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
21
- File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
22
- File "/tmp/.cache/huggingface/modules/transformers_modules/zai_hyphen_org/GLM_hyphen_ASR_hyphen_Nano_hyphen_2512/91967eab799804ab256a3819a085b92378906eb2/modeling_glmasr.py", line 9, in <module>
23
- from .modeling_audio import WhisperSpecialEncoder
24
- File "/tmp/.cache/huggingface/modules/transformers_modules/zai_hyphen_org/GLM_hyphen_ASR_hyphen_Nano_hyphen_2512/91967eab799804ab256a3819a085b92378906eb2/modeling_audio.py", line 7, in <module>
25
- from transformers.models.whisper.modeling_whisper import WhisperEncoder, WhisperEncoderLayer, WhisperFlashAttention2
26
- ImportError: cannot import name 'WhisperFlashAttention2' from 'transformers.models.whisper.modeling_whisper' (/tmp/.cache/uv/environments-v2/1f148c168d860d2b/lib/python3.13/site-packages/transformers/models/whisper/modeling_whisper.py)
 
1
  ```CODE:
2
  # Load model directly
3
+ from transformers import AutoProcessor, AutoModelForSeq2SeqLM
4
+
5
+ processor = AutoProcessor.from_pretrained("zai-org/GLM-ASR-Nano-2512")
6
+ model = AutoModelForSeq2SeqLM.from_pretrained("zai-org/GLM-ASR-Nano-2512")
7
  ```
8
 
9
  ERROR:
10
  Traceback (most recent call last):
11
+ File "/tmp/.cache/uv/environments-v2/1f148c168d860d2b/lib/python3.13/site-packages/transformers/models/auto/configuration_auto.py", line 1360, in from_pretrained
12
+ config_class = CONFIG_MAPPING[config_dict["model_type"]]
13
+ ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
+ File "/tmp/.cache/uv/environments-v2/1f148c168d860d2b/lib/python3.13/site-packages/transformers/models/auto/configuration_auto.py", line 1048, in __getitem__
15
+ raise KeyError(key)
16
+ KeyError: 'glmasr'
17
+
18
+ During handling of the above exception, another exception occurred:
19
+
20
+ Traceback (most recent call last):
21
+ File "/tmp/zai-org_GLM-ASR-Nano-2512_16gFqbZ.py", line 27, in <module>
22
+ model = AutoModelForSeq2SeqLM.from_pretrained("zai-org/GLM-ASR-Nano-2512")
23
+ File "/tmp/.cache/uv/environments-v2/1f148c168d860d2b/lib/python3.13/site-packages/transformers/models/auto/auto_factory.py", line 549, in from_pretrained
24
+ config, kwargs = AutoConfig.from_pretrained(
25
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~^
26
+ pretrained_model_name_or_path,
27
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28
+ ...<4 lines>...
29
+ **kwargs,
30
+ ^^^^^^^^^
31
+ )
32
+ ^
33
+ File "/tmp/.cache/uv/environments-v2/1f148c168d860d2b/lib/python3.13/site-packages/transformers/models/auto/configuration_auto.py", line 1362, in from_pretrained
34
+ raise ValueError(
35
+ ...<8 lines>...
36
  )
37
+ ValueError: The checkpoint you are trying to load has model type `glmasr` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.
38
+
39
+ You can update Transformers with the command `pip install --upgrade transformers`. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet. In this case, you can get the most up-to-date code by installing Transformers from source with the command `pip install git+https://github.com/huggingface/transformers.git`