hf-transformers-bot commited on
Commit
27f18b8
·
verified ·
1 Parent(s): f2746cd

Update tiny models for GlmAsrEncoder

Browse files
chat_template.jinja ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- macro to_text(content) -%}
2
+ {%- if content is string -%}
3
+ {{- content -}}
4
+ {%- elif content is iterable and content is not mapping -%}
5
+ {%- for item in content -%}
6
+ {%- if item is mapping and item.type == 'text' and item.text is defined -%}
7
+ {{- item.text -}}
8
+ {%- elif item is mapping and (item.type == 'audio' or 'audio' in item) -%}
9
+ <|begin_of_audio|><|pad|><|end_of_audio|><|user|>
10
+ {% elif item is string -%}
11
+ {{- item -}}
12
+ {%- endif -%}
13
+ {%- endfor -%}
14
+ {%- else -%}
15
+ {{- content -}}
16
+ {%- endif -%}
17
+ {%- endmacro -%}
18
+ {%- for m in messages -%}
19
+ {%- if m.role == 'system' -%}
20
+ <|system|>
21
+ {{ to_text(m.content) | trim }}
22
+ {%- elif m.role == 'user' -%}
23
+ <|user|>
24
+ {{ to_text(m.content) | trim }}
25
+ {%- elif m.role == 'assistant' -%}
26
+ <|assistant|>
27
+ {{ to_text(m.content) | trim }}
28
+ {%- endif -%}
29
+ {%- endfor -%}
30
+ {%- if add_generation_prompt -%}
31
+ <|assistant|>
32
+ {% endif -%}
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "GlmAsrEncoder"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "dtype": "float32",
7
+ "hidden_act": "gelu",
8
+ "hidden_size": 32,
9
+ "initializer_range": 0.02,
10
+ "intermediate_size": 32,
11
+ "max_position_embeddings": 512,
12
+ "model_type": "glmasr_encoder",
13
+ "num_attention_heads": 2,
14
+ "num_hidden_layers": 2,
15
+ "num_key_value_heads": 2,
16
+ "num_mel_bins": 80,
17
+ "partial_rotary_factor": 0.5,
18
+ "rope_parameters": {
19
+ "partial_rotary_factor": 0.5,
20
+ "rope_theta": 10000.0,
21
+ "rope_type": "default"
22
+ },
23
+ "transformers_version": "5.16.0.dev0"
24
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:020462479d034626f2d967ed83313021846d6e4f73760dea73d3ba10c062c5c3
3
+ size 98208
preprocessor_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "chunk_length": 30,
3
+ "dither": 0.0,
4
+ "feature_extractor_type": "WhisperFeatureExtractor",
5
+ "feature_size": 128,
6
+ "hop_length": 160,
7
+ "n_fft": 400,
8
+ "n_samples": 480000,
9
+ "nb_max_frames": 3000,
10
+ "padding_side": "right",
11
+ "padding_value": 0.0,
12
+ "return_attention_mask": false,
13
+ "sampling_rate": 16000
14
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "clean_up_tokenization_spaces": false,
4
+ "do_lower_case": false,
5
+ "eos_token": "<|endoftext|>",
6
+ "extra_special_tokens": [
7
+ "<|endoftext|>",
8
+ "[MASK]",
9
+ "[gMASK]",
10
+ "[sMASK]",
11
+ "<sop>",
12
+ "<eop>",
13
+ "<|system|>",
14
+ "<|user|>",
15
+ "<|assistant|>",
16
+ "<|observation|>",
17
+ "<|begin_of_image|>",
18
+ "<|end_of_image|>",
19
+ "<|begin_of_video|>",
20
+ "<|end_of_video|>",
21
+ "<|pad|>",
22
+ "<|begin_of_audio|>",
23
+ "<|end_of_audio|>"
24
+ ],
25
+ "is_local": true,
26
+ "local_files_only": false,
27
+ "model_input_names": [
28
+ "input_ids",
29
+ "attention_mask"
30
+ ],
31
+ "model_max_length": 512,
32
+ "model_specific_special_tokens": {},
33
+ "pad_token": "<|endoftext|>",
34
+ "padding_side": "left",
35
+ "processor_class": "GlmAsrProcessor",
36
+ "remove_space": false,
37
+ "tokenizer_class": "TokenizersBackend"
38
+ }