prince-canuma commited on
Commit
4fb3b52
1 Parent(s): 340df40

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - vision
4
+ - image-text-to-text
5
+ - mlx
6
+ ---
7
+
8
+ # mlx-community/llava-v1.6-34b-8bit
9
+ This model was converted to MLX format from [`llava-hf/llava-v1.6-34b-hf`]() using mlx-vlm version **0.0.9**.
10
+ Refer to the [original model card](https://huggingface.co/llava-hf/llava-v1.6-34b-hf) for more details on the model.
11
+ ## Use with mlx
12
+
13
+ ```bash
14
+ pip install -U mlx-vlm
15
+ ```
16
+
17
+ ```bash
18
+ python -m mlx_vlm.generate --model mlx-community/llava-v1.6-34b-8bit --max-tokens 100 --temp 0.0
19
+ ```
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<image>": 64000
3
+ }
config.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlavaNextForConditionalGeneration"
4
+ ],
5
+ "ignore_index": -100,
6
+ "image_grid_pinpoints": [
7
+ [
8
+ 336,
9
+ 672
10
+ ],
11
+ [
12
+ 672,
13
+ 336
14
+ ],
15
+ [
16
+ 672,
17
+ 672
18
+ ],
19
+ [
20
+ 1008,
21
+ 336
22
+ ],
23
+ [
24
+ 336,
25
+ 1008
26
+ ]
27
+ ],
28
+ "image_token_index": 64000,
29
+ "model_type": "llava_next",
30
+ "projector_hidden_act": "gelu",
31
+ "quantization": {
32
+ "group_size": 64,
33
+ "bits": 8
34
+ },
35
+ "text_config": {
36
+ "_name_or_path": "NousResearch/Nous-Hermes-2-Yi-34B",
37
+ "architectures": [
38
+ "LlamaForCausalLM"
39
+ ],
40
+ "eos_token_id": 7,
41
+ "hidden_size": 7168,
42
+ "intermediate_size": 20480,
43
+ "max_position_embeddings": 4096,
44
+ "model_type": "llama",
45
+ "num_attention_heads": 56,
46
+ "num_hidden_layers": 60,
47
+ "num_key_value_heads": 8,
48
+ "pad_token_id": 0,
49
+ "rms_norm_eps": 1e-05,
50
+ "rope_theta": 5000000.0,
51
+ "torch_dtype": "bfloat16",
52
+ "use_cache": false,
53
+ "vocab_size": 64064
54
+ },
55
+ "torch_dtype": "float16",
56
+ "transformers_version": "4.39.0.dev0",
57
+ "use_image_newline_parameter": true,
58
+ "vision_config": {
59
+ "hidden_size": 1024,
60
+ "image_size": 336,
61
+ "intermediate_size": 4096,
62
+ "model_type": "clip_vision_model",
63
+ "num_attention_heads": 16,
64
+ "num_hidden_layers": 24,
65
+ "patch_size": 14,
66
+ "projection_dim": 768,
67
+ "vocab_size": 32000
68
+ },
69
+ "vision_feature_layer": -2,
70
+ "vision_feature_select_strategy": "default",
71
+ "vocab_size": 64064
72
+ }
model-00001-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:046f1e757aa35f197066906ca8e4c06ad4319ccf0f33575df9ba9fc578422113
3
+ size 5241283928
model-00002-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:426eb0ec578ad818724e0fc8784133e42c0dd1e7c892174c926d9d406e674348
3
+ size 5334653148
model-00003-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc4dd60f97ab4e5ce5973054f684807182abf8474bcb6a4a7226c8e825bd112d
3
+ size 5334653176
model-00004-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0302b226a94911d8491e881f538f16d93dff8dd4c44758e89e0d09824fb21fe8
3
+ size 5334653166
model-00005-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b51e69ed50ff9e02a6dfe2cbcff7f2ba28e834936f5fd8114ef39dcc7ed31a6
3
+ size 5334653136
model-00006-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b079a2291bc14fb4a924ecb97c74fd0b0990f50794110e6575ad689526ad053d
3
+ size 5334653184
model-00007-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98b4f117e8d2a4224deeb3d7c195bb2a7b1bab88989d353d2d2f701e4724fff5
3
+ size 5011516184
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,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "aspect_ratio_setting": "anyres",
3
+ "crop_size": {
4
+ "height": 336,
5
+ "width": 336
6
+ },
7
+ "do_center_crop": true,
8
+ "do_convert_rgb": true,
9
+ "do_normalize": true,
10
+ "do_pad": true,
11
+ "do_rescale": true,
12
+ "do_resize": true,
13
+ "image_grid_pinpoints": [
14
+ [
15
+ 336,
16
+ 672
17
+ ],
18
+ [
19
+ 672,
20
+ 336
21
+ ],
22
+ [
23
+ 672,
24
+ 672
25
+ ],
26
+ [
27
+ 1008,
28
+ 336
29
+ ],
30
+ [
31
+ 336,
32
+ 1008
33
+ ]
34
+ ],
35
+ "image_mean": [
36
+ 0.48145466,
37
+ 0.4578275,
38
+ 0.40821073
39
+ ],
40
+ "image_processor_type": "LlavaNextImageProcessor",
41
+ "image_std": [
42
+ 0.26862954,
43
+ 0.26130258,
44
+ 0.27577711
45
+ ],
46
+ "processor_class": "LlavaNextProcessor",
47
+ "resample": 3,
48
+ "rescale_factor": 0.00392156862745098,
49
+ "size": {
50
+ "shortest_edge": 336
51
+ }
52
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<image>"
4
+ ],
5
+ "bos_token": {
6
+ "content": "<|startoftext|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false
11
+ },
12
+ "eos_token": {
13
+ "content": "<|im_end|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false
18
+ },
19
+ "pad_token": {
20
+ "content": "<unk>",
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.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:386c49cf943d71aa110361135338c50e38beeff0a66593480421f37b319e1a39
3
+ size 1033105
tokenizer_config.json ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": true,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<|startoftext|>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "<|endoftext|>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ },
30
+ "6": {
31
+ "content": "<|im_start|>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": false
37
+ },
38
+ "7": {
39
+ "content": "<|im_end|>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": false,
43
+ "single_word": false,
44
+ "special": true
45
+ },
46
+ "64000": {
47
+ "content": "<image>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": false,
51
+ "single_word": false,
52
+ "special": true
53
+ }
54
+ },
55
+ "additional_special_tokens": [
56
+ "<image>"
57
+ ],
58
+ "bos_token": "<|startoftext|>",
59
+ "chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
60
+ "clean_up_tokenization_spaces": false,
61
+ "eos_token": "<|im_end|>",
62
+ "legacy": true,
63
+ "model_max_length": 4096,
64
+ "pad_token": "<unk>",
65
+ "processor_class": "LlavaNextProcessor",
66
+ "sp_model_kwargs": {},
67
+ "spaces_between_special_tokens": false,
68
+ "tokenizer_class": "LlamaTokenizer",
69
+ "trust_remote_code": false,
70
+ "unk_token": "<unk>",
71
+ "use_default_system_prompt": false,
72
+ "use_fast": true
73
+ }