Upload processor
Browse files- preprocessor_config.json +0 -17
- processor_config.json +4 -0
preprocessor_config.json
CHANGED
|
@@ -1,21 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"_valid_processor_keys": [
|
| 3 |
-
"images",
|
| 4 |
-
"do_resize",
|
| 5 |
-
"size",
|
| 6 |
-
"resample",
|
| 7 |
-
"do_center_crop",
|
| 8 |
-
"crop_size",
|
| 9 |
-
"do_rescale",
|
| 10 |
-
"rescale_factor",
|
| 11 |
-
"do_normalize",
|
| 12 |
-
"image_mean",
|
| 13 |
-
"image_std",
|
| 14 |
-
"do_convert_rgb",
|
| 15 |
-
"return_tensors",
|
| 16 |
-
"data_format",
|
| 17 |
-
"input_data_format"
|
| 18 |
-
],
|
| 19 |
"crop_size": {
|
| 20 |
"height": 336,
|
| 21 |
"width": 336
|
|
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
"crop_size": {
|
| 3 |
"height": 336,
|
| 4 |
"width": 336
|
processor_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"chat_template": "{% for message in messages %}{% if message['role'] == 'user' %}{{ '[INST] ' }}{# Render all images first #}{% for content in message['content'] | selectattr('type', 'equalto', 'image') %}{{ '<image>\n' }}{% endfor %}{# Render all text next #}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{{ content['text'] }}{% endfor %}{{' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + message['content'][0]['text'] + '<\\s> '}}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}",
|
| 3 |
+
"processor_class": "LlavaProcessor"
|
| 4 |
+
}
|