neilmehta24 commited on
Commit
26a003d
·
verified ·
1 Parent(s): e38ecaa

Add files using upload-large-folder tool

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: mlx
3
+ language:
4
+ - ar
5
+ - de
6
+ - en
7
+ - es
8
+ - fr
9
+ - hi
10
+ - id
11
+ - it
12
+ - pt
13
+ - th
14
+ - tl
15
+ - vi
16
+ base_model: meta-llama/Llama-4-Scout-17B-16E-Instruct
17
+ tags:
18
+ - facebook
19
+ - meta
20
+ - pytorch
21
+ - llama
22
+ - llama-4
23
+ - mlx
24
+ extra_gated_prompt: '**LLAMA 4 COMMUNITY LICENSE AGREEMENT**
25
+
26
+ Llama 4 Version Effective Date: April 5, 2025
27
+
28
+ "**Agreement**" means the terms and conditions for use, reproduction, distribution
29
+ and modification of the Llama Materials set forth herein.
30
+
31
+ "**Documentation**" means the specifications, manuals and documentation accompanying
32
+ Llama 4 distributed by Meta at [https://www.llama.com/docs/overview](https://llama.com/docs/overview).
33
+
34
+ "**Licensee**" or "**you**" means you, or your employer or any other person or entity
35
+ (if you are entering into this Agreement on such person or entity’s behalf), of
36
+ the age required under applicable laws, rules or regulations to provide legal consent
37
+ and that has legal authority to bind your employer or such other person or entity
38
+ if you are entering in this Agreement on their behalf.
39
+
40
+ "**Llama 4**" means the foundational large language models and software and algorithms,
41
+ including machine-learning model code, trained model weights, inference-enabling
42
+ code, training-enabling code, fine-tuning enabling code and other elements of the
43
+ foregoing distributed by Meta at [https://www.llama.com/llama-downloads](https://www.llama.com/llama-downloads).
44
+
45
+ "**Llama Materials**" means, collectively, Meta’s proprietary Llama 4 and Documentation
46
+ (and any portion thereof) made available under this Agreement.
47
+
48
+ "**Meta**" or "**we**" means Meta Platforms Ireland Limited (if you are located
49
+ in or, if you are an entity, your principal place of business is in the EEA or Switzerland)
50
+ and Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland). 
51
+
52
+ By clicking "I Accept" below or by using or distributing any portion or element
53
+ of the Llama Materials, you agree to be bound by this Agreement.
54
+
55
+ 1\. **License Rights and Redistribution**.
56
+
57
+ a. Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable
58
+ and royalty-free limited license under Meta’s intellectual property or other rights
59
+ owned by Meta embodied in the Llama Materials to use, reproduce, distribute, copy,
60
+ create derivative works of, and make modifications to the Llama Materials.  
61
+
62
+ b. Redistribution and Use.  
63
+
64
+ i. If you distribute or make available the Llama Materials (or any derivative works
65
+ thereof), or a product or service (including another AI model) that contains any
66
+ of them, you shall (A) provide a copy of this Agreement with any such Llama Materials;
67
+ and (B) prominently display "Built with Llama" on a related website, user interface,
68
+ blogpost, about page, or product documentation. If you use the Llama Materials or
69
+ any outputs or results of the Llama Materials to create, train, fine tune, or otherwise
70
+ improve an AI model, which is distributed or made available, you shall also include
71
+ "Llama" at the beginning of any such AI model name.
72
+
73
+ ii. If you receive Llama Materials, or any derivative works thereof, from a Licensee
74
+ as part of an integrated end user product, then Section 2 of this Agreement will
75
+ not apply to you. 
76
+
77
+ iii. You must retain in all copies of the Llama Materials that you distribute the
78
+ following attribution notice within a "Notice" text file distributed as a part of
79
+ such copies: "Llama 4 is licensed under the Llama 4 Community License, Copyright
80
+ © Meta Platforms, Inc. All Rights Reserved."
81
+
82
+ iv. Your use of the Llama Materials must comply with applicable laws and regulations
83
+ (including trade compliance laws and regulations) and adhere to the Acceptable Use
84
+ Policy for the Llama Materials (available at [https://www.llama.com/llama4/use-policy](https://www.llama.com/llama4/use-policy)),
85
+ which is hereby incorporated by reference into this Agreement.    2\. **Additional
86
+ Commercial Terms**. If, on the Llama 4 version release date, the monthly active
87
+ users of the products or services made available by or for Licensee, or Licensee’s
88
+ affiliates, is greater than 700 million monthly active users in the preceding calendar
89
+ month, you must request a license from Meta, which Meta may grant to you in its
90
+ sole discretion, and you are not authorized to exercise any of the rights under
91
+ this Agreement unless or until Meta otherwise expressly grants you such rights.
92
+
93
+ 3**. Disclaimer of Warranty**. UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS
94
+ AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES
95
+ OF ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED,
96
+ INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY,
97
+ OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING
98
+ THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND ASSUME ANY
99
+ RISKS ASSOCIATED WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS.
100
+
101
+ 4\. **Limitation of Liability**. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE
102
+ UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY,
103
+ OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT,
104
+ SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META
105
+ OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.
106
+
107
+ 5\. **Intellectual Property**.
108
+
109
+ a. No trademark licenses are granted under this Agreement, and in connection with
110
+ the Llama Materials, neither Meta nor Licensee may use any name or mark owned by
111
+ or associated with the other or any of its affiliates, except as required for reasonable
112
+ and customary use in describing and redistributing the Llama Materials or as set
113
+ forth in this Section 5(a). Meta hereby grants you a license to use "Llama" (the
114
+ "Mark") solely as required to comply with the last sentence of Section 1.b.i. You
115
+ will comply with Meta’s brand guidelines (currently accessible at [https://about.meta.com/brand/resources/meta/company-brand/](https://about.meta.com/brand/resources/meta/company-brand/)[)](https://en.facebookbrand.com/).
116
+ All goodwill arising out of your use of the Mark will inure to the benefit of Meta.
117
+
118
+ b. Subject to Meta’s ownership of Llama Materials and derivatives made by or for
119
+ Meta, with respect to any derivative works and modifications of the Llama Materials
120
+ that are made by you, as between you and Meta, you are and will be the owner of
121
+ such derivative works and modifications.
122
+
123
+ c. If you institute litigation or other proceedings against Meta or any entity (including
124
+ a cross-claim or counterclaim in a lawsuit) alleging that the Llama Materials or
125
+ Llama 4 outputs or results, or any portion of any of the foregoing, constitutes
126
+ infringement of intellectual property or other rights owned or licensable by you,
127
+ then any licenses granted to you under this Agreement shall terminate as of the
128
+ date such litigation or claim is filed or instituted. You will indemnify and hold
129
+ harmless Meta from and against any claim by any third party arising out of or related
130
+ to your use or distribution of the Llama Materials.
131
+
132
+ 6\. **Term and Termination**. The term of this Agreement will commence upon your
133
+ acceptance of this Agreement or access to the Llama Materials and will continue
134
+ in full force and effect until terminated in accordance with the terms and conditions
135
+ herein. Meta may terminate this Agreement if you are in breach of any term or condition
136
+ of this Agreement. Upon termination of this Agreement, you shall delete and cease
137
+ use of the Llama Materials. Sections 3, 4 and 7 shall survive the termination of
138
+ this Agreement. 
139
+
140
+ 7\. **Governing Law and Jurisdiction**. This Agreement will be governed and construed
141
+ under the laws of the State of California without regard to choice of law principles,
142
+ and the UN Convention on Contracts for the International Sale of Goods does not
143
+ apply to this Agreement. The courts of California shall have exclusive jurisdiction
144
+ of any dispute arising out of this Agreement.'
145
+ extra_gated_fields:
146
+ First Name: text
147
+ Last Name: text
148
+ Date of birth: date_picker
149
+ Country: country
150
+ Affiliation: text
151
+ Job title:
152
+ type: select
153
+ options:
154
+ - Student
155
+ - Research Graduate
156
+ - AI researcher
157
+ - AI developer/engineer
158
+ - Reporter
159
+ - Other
160
+ geo: ip_location
161
+ ? By clicking Submit below I accept the terms of the license and acknowledge that
162
+ the information I provide will be collected stored processed and shared in accordance
163
+ with the Meta Privacy Policy
164
+ : checkbox
165
+ extra_gated_description: The information you provide will be collected, stored, processed
166
+ and shared in accordance with the [Meta Privacy Policy](https://www.facebook.com/privacy/policy/).
167
+ extra_gated_button_content: Submit
168
+ extra_gated_heading: Please be sure to provide your full legal name, date of birth,
169
+ and full organization name with all corporate identifiers. Avoid the use of acronyms
170
+ and special characters. Failure to follow these instructions may prevent you from
171
+ accessing this model and others on Hugging Face. You will not have the ability to
172
+ edit this form after submission, so please ensure all information is accurate.
173
+ license: other
174
+ license_name: llama4
175
+ pipeline_tag: text-generation
176
+ ---
177
+
178
+ # lmstudio-community/meta-llama-Llama-4-Scout-17B-16E-MLX-text-4bit
179
+
180
+ This model [lmstudio-community/meta-llama-Llama-4-Scout-17B-16E-MLX-text-4bit](https://huggingface.co/lmstudio-community/meta-llama-Llama-4-Scout-17B-16E-MLX-text-4bit) was
181
+ converted to MLX format from [meta-llama/Llama-4-Scout-17B-16E-Instruct](https://huggingface.co/meta-llama/Llama-4-Scout-17B-16E-Instruct)
182
+ using mlx-lm version **0.22.4**.
183
+
184
+ ## Use with mlx
185
+
186
+ ```bash
187
+ pip install mlx-lm
188
+ ```
189
+
190
+ ```python
191
+ from mlx_lm import load, generate
192
+
193
+ model, tokenizer = load("lmstudio-community/meta-llama-Llama-4-Scout-17B-16E-MLX-text-4bit")
194
+
195
+ prompt = "hello"
196
+
197
+ if tokenizer.chat_template is not None:
198
+ messages = [{"role": "user", "content": prompt}]
199
+ prompt = tokenizer.apply_chat_template(
200
+ messages, add_generation_prompt=True
201
+ )
202
+
203
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
204
+ ```
config.json ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Llama4ForConditionalGeneration"
4
+ ],
5
+ "boi_token_index": 200080,
6
+ "eoi_token_index": 200081,
7
+ "image_token_index": 200092,
8
+ "model_type": "llama4",
9
+ "quantization": {
10
+ "group_size": 64,
11
+ "bits": 4
12
+ },
13
+ "quantization_config": {
14
+ "group_size": 64,
15
+ "bits": 4
16
+ },
17
+ "text_config": {
18
+ "_attn_implementation_autoset": true,
19
+ "attention_bias": false,
20
+ "attention_chunk_size": 8192,
21
+ "attention_dropout": 0.0,
22
+ "bos_token_id": 200000,
23
+ "eos_token_id": [
24
+ 200001,
25
+ 200007,
26
+ 200008
27
+ ],
28
+ "for_llm_compressor": false,
29
+ "head_dim": 128,
30
+ "hidden_act": "silu",
31
+ "hidden_size": 5120,
32
+ "initializer_range": 0.02,
33
+ "interleave_moe_layer_step": 1,
34
+ "intermediate_size": 8192,
35
+ "intermediate_size_mlp": 16384,
36
+ "max_position_embeddings": 10485760,
37
+ "model_type": "llama4_text",
38
+ "no_rope_layers": [],
39
+ "num_attention_heads": 40,
40
+ "num_experts_per_tok": 1,
41
+ "num_hidden_layers": 48,
42
+ "num_key_value_heads": 8,
43
+ "num_local_experts": 16,
44
+ "output_router_logits": false,
45
+ "pad_token_id": 200018,
46
+ "rms_norm_eps": 1e-05,
47
+ "rope_scaling": {
48
+ "factor": 8.0,
49
+ "high_freq_factor": 4.0,
50
+ "low_freq_factor": 1.0,
51
+ "original_max_position_embeddings": 8192,
52
+ "rope_type": "llama3"
53
+ },
54
+ "rope_theta": 500000.0,
55
+ "router_aux_loss_coef": 0.001,
56
+ "router_jitter_noise": 0.0,
57
+ "torch_dtype": "bfloat16",
58
+ "use_cache": true,
59
+ "use_qk_norm": true,
60
+ "vocab_size": 202048
61
+ },
62
+ "torch_dtype": "bfloat16",
63
+ "transformers_version": "4.51.0.dev0",
64
+ "vision_config": {
65
+ "_attn_implementation_autoset": true,
66
+ "attention_dropout": 0.0,
67
+ "hidden_act": "gelu",
68
+ "hidden_size": 1408,
69
+ "image_size": 336,
70
+ "initializer_range": 0.02,
71
+ "intermediate_size": 5632,
72
+ "model_type": "llama4_vision_model",
73
+ "multi_modal_projector_bias": false,
74
+ "norm_eps": 1e-05,
75
+ "num_attention_heads": 16,
76
+ "num_channels": 3,
77
+ "num_hidden_layers": 34,
78
+ "patch_size": 14,
79
+ "pixel_shuffle_ratio": 0.5,
80
+ "projector_dropout": 0.0,
81
+ "projector_input_dim": 4096,
82
+ "projector_output_dim": 4096,
83
+ "rope_theta": 10000,
84
+ "vision_feature_layer": -1,
85
+ "vision_feature_select_strategy": "default",
86
+ "vision_output_dim": 4096
87
+ }
88
+ }
model-00001-of-00012.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cdea865cd32dfc96c79fde87c3ffd8348f18a75a1c61930c906f52cb28a2b3e5
3
+ size 5088370620
model-00002-of-00012.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd05be54e827c0ebd6a159be0f7ca2e3cfab2c60ae553f6f425924dcf5271110
3
+ size 5355934899
model-00003-of-00012.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:122f452514bb6ad42af76d55ebfb76a55bc586c7180e9dc86af463f8f147908a
3
+ size 5037405794
model-00004-of-00012.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d3523951fe9bfa8026419506bc9570fdc4f966c7f8acd7a63dbc842737691a76
3
+ size 5332295112
model-00005-of-00012.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0cf03beb76ca1102fdc592682ef9268913bb4de043a7afb82db62b63bb359e4
3
+ size 5332295176
model-00006-of-00012.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15457b5d78c903df787b4ed20cd9eec697df9025ac1d4d00ef7ad04c3f92b8c7
3
+ size 5355935046
model-00007-of-00012.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63a859c380ae6ec418736518cb68f223800daa7721645d264563857f8640c619
3
+ size 5037405870
model-00008-of-00012.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a02b2e93f9ae91119ba0134a0528c49e38cd5c8d063b031a9c00966e3c2c326e
3
+ size 5332295200
model-00009-of-00012.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b3173147f6d7a1512226b0e06eef2040ee872d3a77c7ec94971c6b7861d7462
3
+ size 5332295194
model-00010-of-00012.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c5b7d84288393ebbadd10717078e81e62c0032b5245194bae4e697235be384e
3
+ size 5355935026
model-00011-of-00012.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd83d21dd0ef97360f80cd8f4a4dc14d072d088de7c074e242ce84df65da9561
3
+ size 5037405906
model-00012-of-00012.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:20013e84d9662de982a250874b0af85ab09679ee39659d83fb4b15624f95d7ab
3
+ size 3023921593
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|begin_of_text|>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|eot|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<|finetune_right_pad_id|>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:172c9eb4beafc72601690da3ccfcede5c2e6806a8d5ec1fca33e22acea8023a4
3
+ size 27948578
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff