initial commit
Browse files- chat_template.json +3 -0
- config.json +30 -0
- generation_config.json +8 -0
- model.safetensors +3 -0
- preprocessor_config.json +30 -0
- special_tokens_map.json +34 -0
- tokenizer.json +0 -0
- tokenizer_config.json +0 -0
chat_template.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"chat_template": "{%set seps=['\n\n','<\uff5cend\u2581of\u2581sentence\uff5c>']%}{%set i=0%}{%for message in messages%}{%if message['role']=='user'%}<|User|>: {%elif message['role']=='assistant'%}<|Assistant|>:{%if not (loop.last and not add_generation_prompt and message['content'][0]['type']=='text' and message['content'][0]['text']=='')%} {%endif%}{%else%}{{message['role'].capitalize()}}: {%endif%}{%for content in message['content']%}{%if content['type']=='image'%}{%if not loop.first%}{{'\n'}}{%endif%}<image_placeholder>{%if not loop.last%}{{'\n'}}{%endif%}{%elif content['type']=='text'%}{%set text=content['text']%}{%if loop.first%}{%set text=text.lstrip()%}{%endif%}{%if loop.last%}{%set text=text.rstrip()%}{%endif%}{%if not loop.first and message['content'][loop.index0-1]['type']=='text'%}{{' '+text}}{%else%}{{text}}{%endif%}{%endif%}{%endfor%}{%if not loop.last or add_generation_prompt%}{%if message['role']=='user'%}{{seps[0]}}{%else%}{{seps[1]}}{%endif%}{%endif%}{%endfor%}{%if add_generation_prompt%}<|Assistant|>:{%endif%}"
|
| 3 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"JanusForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"model_type": "janus",
|
| 6 |
+
"text_config": {
|
| 7 |
+
"bos_token_id": 100000,
|
| 8 |
+
"eos_token_id": 100001,
|
| 9 |
+
"hidden_size": 2048,
|
| 10 |
+
"intermediate_size": 5632,
|
| 11 |
+
"max_position_embeddings": 16384,
|
| 12 |
+
"model_type": "llama",
|
| 13 |
+
"num_attention_heads": 16,
|
| 14 |
+
"num_hidden_layers": 24,
|
| 15 |
+
"num_key_value_heads": 16,
|
| 16 |
+
"pad_token_id": 100002,
|
| 17 |
+
"torch_dtype": "bfloat16",
|
| 18 |
+
"vocab_size": 102400
|
| 19 |
+
},
|
| 20 |
+
"torch_dtype": "bfloat16",
|
| 21 |
+
"transformers_version": "4.50.0.dev0",
|
| 22 |
+
"vision_config": {
|
| 23 |
+
"model_type": "siglip_vision_model"
|
| 24 |
+
},
|
| 25 |
+
"vq_config": {
|
| 26 |
+
"_attn_implementation_autoset": true,
|
| 27 |
+
"model_type": "janus_vqgan",
|
| 28 |
+
"num_patches": 24
|
| 29 |
+
}
|
| 30 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 100000,
|
| 4 |
+
"eos_token_id": 100001,
|
| 5 |
+
"guidance_scale": 5,
|
| 6 |
+
"pad_token_id": 100002,
|
| 7 |
+
"transformers_version": "4.50.0.dev0"
|
| 8 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b899f1e818e24d78515dd15b4553852808af772e54992ed13f387b7276997a83
|
| 3 |
+
size 4178574806
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"background_color": [
|
| 3 |
+
127,
|
| 4 |
+
127,
|
| 5 |
+
127
|
| 6 |
+
],
|
| 7 |
+
"do_convert_rgb": null,
|
| 8 |
+
"do_normalize": true,
|
| 9 |
+
"do_rescale": true,
|
| 10 |
+
"do_resize": true,
|
| 11 |
+
"image_mean": [
|
| 12 |
+
0.5,
|
| 13 |
+
0.5,
|
| 14 |
+
0.5
|
| 15 |
+
],
|
| 16 |
+
"image_processor_type": "JanusImageProcessor",
|
| 17 |
+
"image_std": [
|
| 18 |
+
0.5,
|
| 19 |
+
0.5,
|
| 20 |
+
0.5
|
| 21 |
+
],
|
| 22 |
+
"min_size": 14,
|
| 23 |
+
"processor_class": "JanusProcessor",
|
| 24 |
+
"resample": 3,
|
| 25 |
+
"rescale_factor": 0.00392156862745098,
|
| 26 |
+
"size": {
|
| 27 |
+
"height": 384,
|
| 28 |
+
"width": 384
|
| 29 |
+
}
|
| 30 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<image_placeholder>",
|
| 4 |
+
"<patch_placeholder>",
|
| 5 |
+
"<|ref|>",
|
| 6 |
+
"<|/ref|>",
|
| 7 |
+
"<|det|>",
|
| 8 |
+
"<|/det|>",
|
| 9 |
+
"<|grounding|>",
|
| 10 |
+
"<|User|>",
|
| 11 |
+
"<|Assistant|>"
|
| 12 |
+
],
|
| 13 |
+
"bos_token": {
|
| 14 |
+
"content": "<|begin▁of▁sentence|>",
|
| 15 |
+
"lstrip": false,
|
| 16 |
+
"normalized": true,
|
| 17 |
+
"rstrip": false,
|
| 18 |
+
"single_word": false
|
| 19 |
+
},
|
| 20 |
+
"eos_token": {
|
| 21 |
+
"content": "<|end▁of▁sentence|>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": true,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false
|
| 26 |
+
},
|
| 27 |
+
"pad_token": {
|
| 28 |
+
"content": "<|▁pad▁|>",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false
|
| 33 |
+
}
|
| 34 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|