gwkrsrch commited on
Commit
4288cd7
1 Parent(s): 56d8d07

initial commit

Browse files
README.md CHANGED
@@ -1,3 +1,6 @@
1
  ---
2
  license: apple-ascl
 
3
  ---
 
 
 
1
  ---
2
  license: apple-ascl
3
+ pipeline_tag: image-text-to-text
4
  ---
5
+
6
+ This repository contains the Elva-OpenELM-270M model presented in [On Efficient Language and Vision Assistants for Visually-Situated Natural Language Understanding: What Matters in Reading and Reasoning](https://huggingface.co/papers/2406.11823).
config.json ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "apple/OpenELM-270M-Instruct",
3
+ "activation_fn_name": "swish",
4
+ "architectures": [
5
+ "LlavaOpenELMForCausalLM"
6
+ ],
7
+ "auto_map": {
8
+ "AutoConfig": "configuration_openelm.OpenELMConfig",
9
+ "AutoModelForCausalLM": "modeling_openelm.OpenELMForCausalLM"
10
+ },
11
+ "bos_token_id": 1,
12
+ "eos_token_id": 2,
13
+ "ffn_dim_divisor": 256,
14
+ "ffn_multipliers": [
15
+ 0.5,
16
+ 0.73,
17
+ 0.97,
18
+ 1.2,
19
+ 1.43,
20
+ 1.67,
21
+ 1.9,
22
+ 2.13,
23
+ 2.37,
24
+ 2.6,
25
+ 2.83,
26
+ 3.07,
27
+ 3.3,
28
+ 3.53,
29
+ 3.77,
30
+ 4.0
31
+ ],
32
+ "ffn_with_glu": true,
33
+ "freeze_mm_mlp_adapter": false,
34
+ "head_dim": 64,
35
+ "hidden_size": 1280,
36
+ "image_aspect_ratio": "anyres",
37
+ "image_grid_pinpoints": [[224, 224], [224, 448], [448, 224], [448, 448], [448, 672], [672, 448], [672, 672], [672, 896], [896, 672]],
38
+ "initializer_range": 0.02,
39
+ "max_context_length": 2048,
40
+ "mm_hidden_size": 768,
41
+ "mm_patch_merge_type": "spatial",
42
+ "mm_projector_lr": null,
43
+ "mm_projector_type": "mlp2x_gelu",
44
+ "mm_use_im_patch_token": false,
45
+ "mm_use_im_start_end": false,
46
+ "mm_vision_select_feature": "patch",
47
+ "mm_vision_select_layer": -2,
48
+ "mm_vision_tower": "gwkrsrch/elva-encoder-base-patch32",
49
+ "mm_vision_tower_lr": null,
50
+ "model_dim": 1280,
51
+ "model_type": "llava_openelm",
52
+ "normalization_layer_name": "rms_norm",
53
+ "normalize_qk_projections": true,
54
+ "num_gqa_groups": 4,
55
+ "num_kv_heads": [
56
+ 3,
57
+ 3,
58
+ 3,
59
+ 3,
60
+ 3,
61
+ 4,
62
+ 4,
63
+ 4,
64
+ 4,
65
+ 4,
66
+ 4,
67
+ 4,
68
+ 5,
69
+ 5,
70
+ 5,
71
+ 5
72
+ ],
73
+ "num_query_heads": [
74
+ 12,
75
+ 12,
76
+ 12,
77
+ 12,
78
+ 12,
79
+ 16,
80
+ 16,
81
+ 16,
82
+ 16,
83
+ 16,
84
+ 16,
85
+ 16,
86
+ 20,
87
+ 20,
88
+ 20,
89
+ 20
90
+ ],
91
+ "num_transformer_layers": 16,
92
+ "qkv_multipliers": [
93
+ 0.5,
94
+ 1.0
95
+ ],
96
+ "rope_freq_constant": 10000,
97
+ "rope_max_length": 4096,
98
+ "share_input_output_layers": true,
99
+ "tokenizer_model_max_length": 2048,
100
+ "tokenizer_padding_side": "right",
101
+ "torch_dtype": "bfloat16",
102
+ "transformers_version": "4.42.4",
103
+ "tune_mm_mlp_adapter": false,
104
+ "use_cache": true,
105
+ "use_mm_proj": true,
106
+ "vocab_size": 32000
107
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "transformers_version": "4.42.4"
6
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9252271e00e7b019ad5334773e79972bc4c238ac4bd22b7cc0c2dff461455582
3
+ size 723261056
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "<unk>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
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,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
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": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ }
30
+ },
31
+ "bos_token": "<s>",
32
+ "clean_up_tokenization_spaces": false,
33
+ "eos_token": "</s>",
34
+ "legacy": false,
35
+ "model_max_length": 2048,
36
+ "pad_token": "<unk>",
37
+ "padding_side": "right",
38
+ "sp_model_kwargs": {},
39
+ "spaces_between_special_tokens": false,
40
+ "tokenizer_class": "LlamaTokenizer",
41
+ "unk_token": "<unk>",
42
+ "use_default_system_prompt": false
43
+ }