merve HF Staff commited on
Commit
95c80fc
·
verified ·
1 Parent(s): 3ec0cc5

Upload processor

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
chat_template.jinja ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if not add_generation_prompt is defined -%}
2
+ {%- set add_generation_prompt = true -%}
3
+ {%- endif -%}
4
+ {%- if not cls_token is defined -%}
5
+ {%- set cls_token = "<|begin_of_sentence|>" -%}
6
+ {%- endif -%}
7
+ {%- if not eos_token is defined -%}
8
+ {%- set eos_token = "</s>" -%}
9
+ {%- endif -%}
10
+ {{- cls_token -}}
11
+ {%- for message in messages -%}
12
+ {%- if message["role"] == "user" -%}
13
+ {{- "User: " -}}
14
+ {%- for content in message["content"] -%}
15
+ {%- if content["type"] == "image" -%}
16
+ {{ "<|IMAGE_START|><|IMAGE_PLACEHOLDER|><|IMAGE_END|>" }}
17
+ {%- endif -%}
18
+ {%- endfor -%}
19
+ {%- for content in message["content"] -%}
20
+ {%- if content["type"] == "text" -%}
21
+ {{ content["text"] }}
22
+ {%- endif -%}
23
+ {%- endfor -%}
24
+ {{ "\n" -}}
25
+ {%- elif message["role"] == "assistant" -%}
26
+ {{- "Assistant: " -}}
27
+ {%- for content in message["content"] -%}
28
+ {%- if content["type"] == "text" -%}
29
+ {{ content["text"] }}
30
+ {%- endif -%}
31
+ {%- endfor -%}
32
+ {{ eos_token -}}
33
+ {%- elif message["role"] == "system" -%}
34
+ {%- for content in message["content"] -%}
35
+ {%- if content["type"] == "text" -%}
36
+ {{ content["text"] + "\n" }}
37
+ {%- endif -%}
38
+ {%- endfor -%}
39
+ {%- endif -%}
40
+ {%- endfor -%}
41
+ {%- if add_generation_prompt -%}
42
+ {{- "Assistant: " -}}
43
+ {%- endif -%}
processor_config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_processor": {
3
+ "data_format": "channels_first",
4
+ "do_convert_rgb": true,
5
+ "do_normalize": true,
6
+ "do_rescale": true,
7
+ "do_resize": true,
8
+ "image_mean": [
9
+ 0.5,
10
+ 0.5,
11
+ 0.5
12
+ ],
13
+ "image_processor_type": "PaddleOCRVLImageProcessorFast",
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "max_pixels": 2822400,
20
+ "merge_size": 2,
21
+ "min_pixels": 147384,
22
+ "patch_size": 14,
23
+ "resample": 3,
24
+ "rescale_factor": 0.00392156862745098,
25
+ "size": {
26
+ "longest_edge": 2822400,
27
+ "shortest_edge": 147384
28
+ },
29
+ "temporal_patch_size": 1
30
+ },
31
+ "processor_class": "PaddleOCRVLProcessor"
32
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f90f04fd8e5eb6dfa380f37d10c87392de8438dccb6768a2486b5a96ee76dba6
3
+ size 11187679
tokenizer_config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "auto_map": {
4
+ "AutoProcessor": "processing_paddleocr_vl.PaddleOCRVLProcessor"
5
+ },
6
+ "backend": "tokenizers",
7
+ "bos_token": "<s>",
8
+ "clean_up_tokenization_spaces": false,
9
+ "cls_token": "<|begin_of_sentence|>",
10
+ "eos_token": "</s>",
11
+ "image_token": "<|IMAGE_PLACEHOLDER|>",
12
+ "is_local": true,
13
+ "legacy": true,
14
+ "mask_token": "<mask:1>",
15
+ "model_max_length": 131072,
16
+ "model_specific_special_tokens": {
17
+ "image_token": "<|IMAGE_PLACEHOLDER|>"
18
+ },
19
+ "pad_token": "<unk>",
20
+ "processor_class": "PaddleOCRVLProcessor",
21
+ "sep_token": "<|end_of_sentence|>",
22
+ "sp_model_kwargs": {},
23
+ "spaces_between_special_tokens": false,
24
+ "tokenizer_class": "TokenizersBackend",
25
+ "unk_token": "<unk>",
26
+ "use_default_system_prompt": false
27
+ }