prince-canuma commited on
Commit
202332d
1 Parent(s): f61264b

Upload 10 files

Browse files
README.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - mlx
6
+ datasets:
7
+ - liuhaotian/LLaVA-Instruct-150K
8
+ pipeline_tag: image-to-text
9
+ inference: false
10
+ arxiv: 2304.08485
11
+ ---
12
+
13
+ # mlx-community/llava-1.5-7b
14
+ This model was converted to MLX format from [`llava-hf/llava-1.5-7b-hf`]() using mlx-vllm version **0.0.0**.
15
+ Refer to the [original model card](https://huggingface.co/llava-hf/llava-1.5-7b-hf) for more details on the model.
16
+ ## Use with mlx
17
+
18
+ ```bash
19
+ git clone https://github.com/ml-explore/mlx-examples.git
20
+ ```
21
+
22
+ ```bash
23
+ cd mlx-lm/vllms
24
+ python -m generate --model mlx_model --max-tokens 10 --temp 0.0
25
+ ```
added_tokens.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "<image>": 32000,
3
+ "<pad>": 32001
4
+ }
config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlavaForConditionalGeneration"
4
+ ],
5
+ "ignore_index": -100,
6
+ "image_token_index": 32000,
7
+ "model_type": "llava",
8
+ "pad_token_id": 32001,
9
+ "projector_hidden_act": "gelu",
10
+ "quantization": {
11
+ "group_size": 64,
12
+ "bits": 4
13
+ },
14
+ "text_config": {
15
+ "_name_or_path": "lmsys/vicuna-7b-v1.5",
16
+ "architectures": [
17
+ "LlamaForCausalLM"
18
+ ],
19
+ "max_position_embeddings": 4096,
20
+ "model_type": "llama",
21
+ "rms_norm_eps": 1e-05,
22
+ "torch_dtype": "float16",
23
+ "vocab_size": 32064
24
+ },
25
+ "tie_word_embeddings": false,
26
+ "torch_dtype": "float16",
27
+ "transformers_version": "4.36.0.dev0",
28
+ "vision_config": {
29
+ "hidden_size": 1024,
30
+ "image_size": 336,
31
+ "intermediate_size": 4096,
32
+ "model_type": "clip_vision_model",
33
+ "num_attention_heads": 16,
34
+ "num_hidden_layers": 24,
35
+ "patch_size": 14,
36
+ "projection_dim": 768,
37
+ "vocab_size": 32000
38
+ },
39
+ "vision_feature_layer": -2,
40
+ "vision_feature_select_strategy": "default",
41
+ "vocab_size": 32064
42
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0fbefdb9259abf4a2a438a057eaafa437d1b057f4b5b605b9211ba39ed8d237
3
+ size 4164736149
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,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
22
+ },
23
+ "do_center_crop": true,
24
+ "do_convert_rgb": true,
25
+ "do_normalize": true,
26
+ "do_rescale": true,
27
+ "do_resize": true,
28
+ "image_mean": [
29
+ 0.48145466,
30
+ 0.4578275,
31
+ 0.40821073
32
+ ],
33
+ "image_processor_type": "CLIPImageProcessor",
34
+ "image_std": [
35
+ 0.26862954,
36
+ 0.26130258,
37
+ 0.27577711
38
+ ],
39
+ "processor_class": "LlavaProcessor",
40
+ "resample": 3,
41
+ "rescale_factor": 0.00392156862745098,
42
+ "size": {
43
+ "shortest_edge": 336
44
+ }
45
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<pad>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
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:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
+ size 499723
tokenizer_config.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "<image>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "32001": {
38
+ "content": "<pad>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ }
45
+ },
46
+ "bos_token": "<s>",
47
+ "clean_up_tokenization_spaces": false,
48
+ "eos_token": "</s>",
49
+ "legacy": false,
50
+ "model_max_length": 1000000000000000019884624838656,
51
+ "pad_token": "<pad>",
52
+ "padding_side": "left",
53
+ "processor_class": "LlavaProcessor",
54
+ "sp_model_kwargs": {},
55
+ "tokenizer_class": "LlamaTokenizer",
56
+ "trust_remote_code": false,
57
+ "unk_token": "<unk>",
58
+ "use_default_system_prompt": false
59
+ }