AITRADER commited on
Commit
32df3cd
·
verified ·
1 Parent(s): 1561dad

Cleanup: remove bundled text encoder/tokenizer (use external text encoder repo)

Browse files
text_encoder/config.json DELETED
@@ -1,114 +0,0 @@
1
- {
2
- "architectures": [
3
- "Gemma3ForConditionalGeneration"
4
- ],
5
- "boi_token_index": 255999,
6
- "dtype": "float32",
7
- "eoi_token_index": 256000,
8
- "eos_token_id": [
9
- 1,
10
- 106
11
- ],
12
- "image_token_index": 262144,
13
- "initializer_range": 0.02,
14
- "mm_tokens_per_image": 256,
15
- "model_type": "gemma3",
16
- "text_config": {
17
- "_sliding_window_pattern": 6,
18
- "attention_bias": false,
19
- "attention_dropout": 0.0,
20
- "attn_logit_softcapping": null,
21
- "cache_implementation": "hybrid",
22
- "dtype": "float32",
23
- "final_logit_softcapping": null,
24
- "head_dim": 256,
25
- "hidden_activation": "gelu_pytorch_tanh",
26
- "hidden_size": 3840,
27
- "initializer_range": 0.02,
28
- "intermediate_size": 15360,
29
- "layer_types": [
30
- "sliding_attention",
31
- "sliding_attention",
32
- "sliding_attention",
33
- "sliding_attention",
34
- "sliding_attention",
35
- "full_attention",
36
- "sliding_attention",
37
- "sliding_attention",
38
- "sliding_attention",
39
- "sliding_attention",
40
- "sliding_attention",
41
- "full_attention",
42
- "sliding_attention",
43
- "sliding_attention",
44
- "sliding_attention",
45
- "sliding_attention",
46
- "sliding_attention",
47
- "full_attention",
48
- "sliding_attention",
49
- "sliding_attention",
50
- "sliding_attention",
51
- "sliding_attention",
52
- "sliding_attention",
53
- "full_attention",
54
- "sliding_attention",
55
- "sliding_attention",
56
- "sliding_attention",
57
- "sliding_attention",
58
- "sliding_attention",
59
- "full_attention",
60
- "sliding_attention",
61
- "sliding_attention",
62
- "sliding_attention",
63
- "sliding_attention",
64
- "sliding_attention",
65
- "full_attention",
66
- "sliding_attention",
67
- "sliding_attention",
68
- "sliding_attention",
69
- "sliding_attention",
70
- "sliding_attention",
71
- "full_attention",
72
- "sliding_attention",
73
- "sliding_attention",
74
- "sliding_attention",
75
- "sliding_attention",
76
- "sliding_attention",
77
- "full_attention"
78
- ],
79
- "max_position_embeddings": 131072,
80
- "model_type": "gemma3_text",
81
- "num_attention_heads": 16,
82
- "num_hidden_layers": 48,
83
- "num_key_value_heads": 8,
84
- "query_pre_attn_scalar": 256,
85
- "rms_norm_eps": 1e-06,
86
- "rope_local_base_freq": 10000,
87
- "rope_scaling": {
88
- "factor": 8.0,
89
- "rope_type": "linear"
90
- },
91
- "rope_theta": 1000000,
92
- "sliding_window": 1024,
93
- "sliding_window_pattern": 6,
94
- "use_bidirectional_attention": false,
95
- "use_cache": true,
96
- "vocab_size": 262208
97
- },
98
- "transformers_version": "4.57.3",
99
- "vision_config": {
100
- "attention_dropout": 0.0,
101
- "dtype": "float32",
102
- "hidden_act": "gelu_pytorch_tanh",
103
- "hidden_size": 1152,
104
- "image_size": 896,
105
- "intermediate_size": 4304,
106
- "layer_norm_eps": 1e-06,
107
- "model_type": "siglip_vision_model",
108
- "num_attention_heads": 16,
109
- "num_channels": 3,
110
- "num_hidden_layers": 27,
111
- "patch_size": 14,
112
- "vision_use_head": false
113
- }
114
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
text_encoder/generation_config.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "cache_implementation": "hybrid",
3
- "do_sample": true,
4
- "eos_token_id": [
5
- 1,
6
- 106
7
- ],
8
- "top_k": 64,
9
- "top_p": 0.95,
10
- "transformers_version": "4.57.3"
11
- }
 
 
 
 
 
 
 
 
 
 
 
 
text_encoder/model-00001-of-00011.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:cbc6e8132e4998652d4c8c219f0ca8da10a143606c806c8728a7513d49bbcdb3
3
- size 1685223128
 
 
 
 
text_encoder/model-00002-of-00011.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b95e7ab472b88860e53c71ef078fe8ba4c85e3727b8f0a0bcc130c1f4a2b9ab9
3
- size 4987027384
 
 
 
 
text_encoder/model-00003-of-00011.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:3731e7c18280d0e9dcbcfadaecaeb8b81fa7f7f15e702ea3d1b4f8eb1b5919f7
3
- size 4844749824
 
 
 
 
text_encoder/model-00004-of-00011.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e9d1ce8b472f2cc6d70c7885388f50fb3a5f233cf1d4784f6a4be1732547a74c
3
- size 4954909736
 
 
 
 
text_encoder/model-00005-of-00011.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:cb478659a67b2e34a920f237387a1d7a8208325aa2fc285198a97603f15af1e6
3
- size 4907664584
 
 
 
 
text_encoder/model-00006-of-00011.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a190581d871980f9309f40d5c2b4db99d76737d7ed743d531bac95443f6b7145
3
- size 4954909792
 
 
 
 
text_encoder/model-00007-of-00011.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c347de789ff34be642e4fe7ab8e142ca5e3d833d70cb9ec5127a86af0e2ecfed
3
- size 4907664584
 
 
 
 
text_encoder/model-00008-of-00011.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2ec7525b89b083d774f4abbdd1f2d7ee190f0475658875cf700530a2faa84a4f
3
- size 4954909792
 
 
 
 
text_encoder/model-00009-of-00011.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2b0117ecf1d83691bb875c66a9f2b47e450a87fdfe90915bc7b9e9946c37a650
3
- size 4907664584
 
 
 
 
text_encoder/model-00010-of-00011.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d9f665a743589231adb812c61c9d8e295c9a68c31d3e87976ae032f1de4e46b6
3
- size 4954909792
 
 
 
 
text_encoder/model-00011-of-00011.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:999bf4706d4f616e558eec486667fc2b66f8d0f9c106e1d1f802458fb349b0db
3
- size 2689808472
 
 
 
 
text_encoder/model.safetensors.index.json DELETED
The diff for this file is too large to render. See raw diff
 
tokenizer/added_tokens.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "<image_soft_token>": 262144
3
- }
 
 
 
 
tokenizer/chat_template.jinja DELETED
@@ -1,47 +0,0 @@
1
- {{ bos_token }}
2
- {%- if messages[0]['role'] == 'system' -%}
3
- {%- if messages[0]['content'] is string -%}
4
- {%- set first_user_prefix = messages[0]['content'] + '
5
-
6
- ' -%}
7
- {%- else -%}
8
- {%- set first_user_prefix = messages[0]['content'][0]['text'] + '
9
-
10
- ' -%}
11
- {%- endif -%}
12
- {%- set loop_messages = messages[1:] -%}
13
- {%- else -%}
14
- {%- set first_user_prefix = "" -%}
15
- {%- set loop_messages = messages -%}
16
- {%- endif -%}
17
- {%- for message in loop_messages -%}
18
- {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}
19
- {{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }}
20
- {%- endif -%}
21
- {%- if (message['role'] == 'assistant') -%}
22
- {%- set role = "model" -%}
23
- {%- else -%}
24
- {%- set role = message['role'] -%}
25
- {%- endif -%}
26
- {{ '<start_of_turn>' + role + '
27
- ' + (first_user_prefix if loop.first else "") }}
28
- {%- if message['content'] is string -%}
29
- {{ message['content'] | trim }}
30
- {%- elif message['content'] is iterable -%}
31
- {%- for item in message['content'] -%}
32
- {%- if item['type'] == 'image' -%}
33
- {{ '<start_of_image>' }}
34
- {%- elif item['type'] == 'text' -%}
35
- {{ item['text'] | trim }}
36
- {%- endif -%}
37
- {%- endfor -%}
38
- {%- else -%}
39
- {{ raise_exception("Invalid content type") }}
40
- {%- endif -%}
41
- {{ '<end_of_turn>
42
- ' }}
43
- {%- endfor -%}
44
- {%- if add_generation_prompt -%}
45
- {{'<start_of_turn>model
46
- '}}
47
- {%- endif -%}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tokenizer/preprocessor_config.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "do_convert_rgb": null,
3
- "do_normalize": true,
4
- "do_pan_and_scan": null,
5
- "do_rescale": true,
6
- "do_resize": true,
7
- "image_mean": [
8
- 0.5,
9
- 0.5,
10
- 0.5
11
- ],
12
- "image_processor_type": "Gemma3ImageProcessor",
13
- "image_seq_length": 256,
14
- "image_std": [
15
- 0.5,
16
- 0.5,
17
- 0.5
18
- ],
19
- "pan_and_scan_max_num_crops": null,
20
- "pan_and_scan_min_crop_size": null,
21
- "pan_and_scan_min_ratio_to_activate": null,
22
- "processor_class": "Gemma3Processor",
23
- "resample": 2,
24
- "rescale_factor": 0.00392156862745098,
25
- "size": {
26
- "height": 896,
27
- "width": 896
28
- }
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tokenizer/processor_config.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "image_seq_length": 256,
3
- "processor_class": "Gemma3Processor"
4
- }
 
 
 
 
 
tokenizer/special_tokens_map.json DELETED
@@ -1,33 +0,0 @@
1
- {
2
- "boi_token": "<start_of_image>",
3
- "bos_token": {
4
- "content": "<bos>",
5
- "lstrip": false,
6
- "normalized": false,
7
- "rstrip": false,
8
- "single_word": false
9
- },
10
- "eoi_token": "<end_of_image>",
11
- "eos_token": {
12
- "content": "<eos>",
13
- "lstrip": false,
14
- "normalized": false,
15
- "rstrip": false,
16
- "single_word": false
17
- },
18
- "image_token": "<image_soft_token>",
19
- "pad_token": {
20
- "content": "<pad>",
21
- "lstrip": false,
22
- "normalized": false,
23
- "rstrip": false,
24
- "single_word": false
25
- },
26
- "unk_token": {
27
- "content": "<unk>",
28
- "lstrip": false,
29
- "normalized": false,
30
- "rstrip": false,
31
- "single_word": false
32
- }
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tokenizer/tokenizer.json DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4667f2089529e8e7657cfb6d1c19910ae71ff5f28aa7ab2ff2763330affad795
3
- size 33384568
 
 
 
 
tokenizer/tokenizer.model DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79c
3
- size 4689074
 
 
 
 
tokenizer/tokenizer_config.json DELETED
The diff for this file is too large to render. See raw diff