VictorSanh
commited on
Commit
•
9f9d792
1
Parent(s):
126baf3
quantized version
Browse files- README.md +31 -0
- added_tokens.json +5 -0
- config.json +38 -0
- generation_config.json +18 -0
- model-00001-of-00002.safetensors +3 -0
- model-00002-of-00002.safetensors +3 -0
- model.safetensors.index.json +0 -0
- preprocessor_config.json +26 -0
- processor_config.json +5 -0
- special_tokens_map.json +53 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +71 -0
README.md
CHANGED
@@ -1,3 +1,34 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
datasets:
|
4 |
+
- HuggingFaceM4/OBELICS
|
5 |
+
- laion/laion-coco
|
6 |
+
- wikipedia
|
7 |
+
- facebook/pmd
|
8 |
+
- pixparse/idl-wds
|
9 |
+
- pixparse/pdfa-eng-wds
|
10 |
+
- wendlerc/RenderedText
|
11 |
+
- HuggingFaceM4/the_cauldron
|
12 |
+
- teknium/OpenHermes-2.5
|
13 |
+
- GAIR/lima
|
14 |
+
- databricks/databricks-dolly-15k
|
15 |
+
- meta-math/MetaMathQA
|
16 |
+
- TIGER-Lab/MathInstruct
|
17 |
+
- microsoft/orca-math-word-problems-200k
|
18 |
+
- camel-ai/math
|
19 |
+
- AtlasUnified/atlas-math-sets
|
20 |
+
- tiedong/goat
|
21 |
+
- Lin-Chen/ShareGPT4V
|
22 |
+
- jxu124/llava_conversation_58k
|
23 |
+
language:
|
24 |
+
- en
|
25 |
+
tags:
|
26 |
+
- multimodal
|
27 |
+
- vision
|
28 |
+
- image-text-to-text
|
29 |
+
- quantized
|
30 |
+
- 4-bit
|
31 |
+
- AWQ
|
32 |
---
|
33 |
+
|
34 |
+
4-bit AWQ-quantized version of [HuggingFaceM4/idefics2-8b-chatty](https://huggingface.co/HuggingFaceM4/idefics2-8b-chatty). Refer to the original model's card for more information (including inference snippet).
|
added_tokens.json
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"<end_of_utterance>": 32002,
|
3 |
+
"<fake_token_around_image>": 32000,
|
4 |
+
"<image>": 32001
|
5 |
+
}
|
config.json
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"Idefics2ForConditionalGeneration"
|
4 |
+
],
|
5 |
+
"image_token_id": 32001,
|
6 |
+
"model_type": "idefics2",
|
7 |
+
"perceiver_config": {
|
8 |
+
"model_type": "idefics2"
|
9 |
+
},
|
10 |
+
"quantization_config": {
|
11 |
+
"bits": 4,
|
12 |
+
"group_size": 128,
|
13 |
+
"modules_to_not_convert": ["model.vision_model", "model.connector.modality_projection", "model.connector.perceiver_resampler"],
|
14 |
+
"quant_method": "awq",
|
15 |
+
"version": "gemm",
|
16 |
+
"zero_point": true
|
17 |
+
},
|
18 |
+
"text_config": {
|
19 |
+
"max_position_embeddings": 32768,
|
20 |
+
"model_type": "mistral",
|
21 |
+
"pad_token_id": 0,
|
22 |
+
"rms_norm_eps": 1e-05,
|
23 |
+
"vocab_size": 32003
|
24 |
+
},
|
25 |
+
"tie_word_embeddings": false,
|
26 |
+
"torch_dtype": "float16",
|
27 |
+
"transformers_version": "4.40.0.dev0",
|
28 |
+
"use_cache": true,
|
29 |
+
"vision_config": {
|
30 |
+
"hidden_size": 1152,
|
31 |
+
"image_size": 980,
|
32 |
+
"intermediate_size": 4304,
|
33 |
+
"model_type": "idefics2",
|
34 |
+
"num_attention_heads": 16,
|
35 |
+
"num_hidden_layers": 27,
|
36 |
+
"patch_size": 14
|
37 |
+
}
|
38 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bad_words_ids": [
|
4 |
+
[
|
5 |
+
32000
|
6 |
+
],
|
7 |
+
[
|
8 |
+
32001
|
9 |
+
]
|
10 |
+
],
|
11 |
+
"bos_token_id": 1,
|
12 |
+
"eos_token_id": [
|
13 |
+
2,
|
14 |
+
32002
|
15 |
+
],
|
16 |
+
"pad_token_id": 0,
|
17 |
+
"transformers_version": "4.41.0.dev0"
|
18 |
+
}
|
model-00001-of-00002.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d86aeeaf6f3e1c529a3d2856093b4ed26aa0de977b9be90b2a7170daed3639de
|
3 |
+
size 4985996400
|
model-00002-of-00002.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3e4f2af58155fe87c73b49c63eaa5b8318135a822b958ee11c412a947db95cd9
|
3 |
+
size 1487025616
|
model.safetensors.index.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
preprocessor_config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_convert_rgb": true,
|
3 |
+
"do_image_splitting": true,
|
4 |
+
"do_normalize": true,
|
5 |
+
"do_pad": 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": "Idefics2ImageProcessor",
|
14 |
+
"image_std": [
|
15 |
+
0.5,
|
16 |
+
0.5,
|
17 |
+
0.5
|
18 |
+
],
|
19 |
+
"processor_class": "Idefics2Processor",
|
20 |
+
"resample": 2,
|
21 |
+
"rescale_factor": 0.00392156862745098,
|
22 |
+
"size": {
|
23 |
+
"longest_edge": 980,
|
24 |
+
"shortest_edge": 378
|
25 |
+
}
|
26 |
+
}
|
processor_config.json
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"chat_template": "{% for message in messages %}{{message['role'].capitalize()}}{% if message['content'][0]['type'] == 'image' %}{{':'}}{% else %}{{': '}}{% endif %}{% for line in message['content'] %}{% if line['type'] == 'text' %}{{line['text']}}{% elif line['type'] == 'image' %}{{ '<image>' }}{% endif %}{% endfor %}<end_of_utterance>\n{% endfor %}{% if add_generation_prompt %}{{ 'Assistant:' }}{% endif %}",
|
3 |
+
"image_seq_len": 64,
|
4 |
+
"processor_class": "Idefics2Processor"
|
5 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
{
|
4 |
+
"content": "<fake_token_around_image>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false
|
9 |
+
},
|
10 |
+
{
|
11 |
+
"content": "<image>",
|
12 |
+
"lstrip": false,
|
13 |
+
"normalized": false,
|
14 |
+
"rstrip": false,
|
15 |
+
"single_word": false
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"content": "<end_of_utterance>",
|
19 |
+
"lstrip": false,
|
20 |
+
"normalized": false,
|
21 |
+
"rstrip": false,
|
22 |
+
"single_word": false
|
23 |
+
}
|
24 |
+
],
|
25 |
+
"bos_token": {
|
26 |
+
"content": "<s>",
|
27 |
+
"lstrip": false,
|
28 |
+
"normalized": false,
|
29 |
+
"rstrip": false,
|
30 |
+
"single_word": false
|
31 |
+
},
|
32 |
+
"eos_token": {
|
33 |
+
"content": "</s>",
|
34 |
+
"lstrip": false,
|
35 |
+
"normalized": false,
|
36 |
+
"rstrip": false,
|
37 |
+
"single_word": false
|
38 |
+
},
|
39 |
+
"pad_token": {
|
40 |
+
"content": "<unk>",
|
41 |
+
"lstrip": false,
|
42 |
+
"normalized": false,
|
43 |
+
"rstrip": false,
|
44 |
+
"single_word": false
|
45 |
+
},
|
46 |
+
"unk_token": {
|
47 |
+
"content": "<unk>",
|
48 |
+
"lstrip": false,
|
49 |
+
"normalized": false,
|
50 |
+
"rstrip": false,
|
51 |
+
"single_word": false
|
52 |
+
}
|
53 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
|
3 |
+
size 493443
|
tokenizer_config.json
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"0": {
|
6 |
+
"content": "<unk>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
},
|
13 |
+
"1": {
|
14 |
+
"content": "<s>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false,
|
19 |
+
"special": true
|
20 |
+
},
|
21 |
+
"2": {
|
22 |
+
"content": "</s>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": false,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false,
|
27 |
+
"special": true
|
28 |
+
},
|
29 |
+
"32000": {
|
30 |
+
"content": "<fake_token_around_image>",
|
31 |
+
"lstrip": false,
|
32 |
+
"normalized": false,
|
33 |
+
"rstrip": false,
|
34 |
+
"single_word": false,
|
35 |
+
"special": true
|
36 |
+
},
|
37 |
+
"32001": {
|
38 |
+
"content": "<image>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false,
|
43 |
+
"special": true
|
44 |
+
},
|
45 |
+
"32002": {
|
46 |
+
"content": "<end_of_utterance>",
|
47 |
+
"lstrip": false,
|
48 |
+
"normalized": false,
|
49 |
+
"rstrip": false,
|
50 |
+
"single_word": false,
|
51 |
+
"special": true
|
52 |
+
}
|
53 |
+
},
|
54 |
+
"additional_special_tokens": [
|
55 |
+
"<fake_token_around_image>",
|
56 |
+
"<image>",
|
57 |
+
"<end_of_utterance>"
|
58 |
+
],
|
59 |
+
"bos_token": "<s>",
|
60 |
+
"clean_up_tokenization_spaces": false,
|
61 |
+
"eos_token": "</s>",
|
62 |
+
"legacy": false,
|
63 |
+
"model_max_length": 1000000000000000019884624838656,
|
64 |
+
"pad_token": "<unk>",
|
65 |
+
"processor_class": "Idefics2Processor",
|
66 |
+
"sp_model_kwargs": {},
|
67 |
+
"spaces_between_special_tokens": false,
|
68 |
+
"tokenizer_class": "LlamaTokenizer",
|
69 |
+
"unk_token": "<unk>",
|
70 |
+
"use_default_system_prompt": true
|
71 |
+
}
|