Add files using upload-large-folder tool
Browse files- .gitattributes +1 -0
- README.md +158 -0
- config.json +66 -0
- generation_config.json +11 -0
- model.safetensors +3 -0
- smash_config.json +30 -0
- tokenizer/special_tokens_map.json +23 -0
- tokenizer/tokenizer.json +3 -0
- tokenizer/tokenizer_config.json +0 -0
.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/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
tags:
|
4 |
+
- pruna-ai
|
5 |
+
---
|
6 |
+
|
7 |
+
# Model Card for PrunaAI/tiny-random-llama4-smashed
|
8 |
+
|
9 |
+
This model was created using the [pruna](https://github.com/PrunaAI/pruna) library. Pruna is a model optimization framework built for developers, enabling you to deliver more efficient models with minimal implementation overhead.
|
10 |
+
|
11 |
+
## Usage
|
12 |
+
|
13 |
+
First things first, you need to install the pruna library:
|
14 |
+
|
15 |
+
```bash
|
16 |
+
pip install pruna
|
17 |
+
```
|
18 |
+
|
19 |
+
You can then load this model using the following code:
|
20 |
+
|
21 |
+
```python
|
22 |
+
from pruna import PrunaModel
|
23 |
+
|
24 |
+
loaded_model = PrunaModel.from_hub("PrunaAI/tiny-random-llama4-smashed")
|
25 |
+
```
|
26 |
+
|
27 |
+
After loading the model, you can use the inference methods of the original model.
|
28 |
+
|
29 |
+
## Smash Configuration
|
30 |
+
|
31 |
+
The compression configuration of the model is stored in the `smash_config.json` file.
|
32 |
+
|
33 |
+
```bash
|
34 |
+
{
|
35 |
+
"batcher": null,
|
36 |
+
"cacher": null,
|
37 |
+
"compiler": "torch_compile",
|
38 |
+
"pruner": null,
|
39 |
+
"quantizer": null,
|
40 |
+
"torch_compile_backend": "inductor",
|
41 |
+
"torch_compile_batch_size": 1,
|
42 |
+
"torch_compile_dynamic": null,
|
43 |
+
"torch_compile_fullgraph": true,
|
44 |
+
"torch_compile_make_portable": false,
|
45 |
+
"torch_compile_max_kv_cache_size": 400,
|
46 |
+
"torch_compile_mode": "default",
|
47 |
+
"torch_compile_seqlen_manual_cuda_graph": 100,
|
48 |
+
"max_batch_size": 1,
|
49 |
+
"device": "cpu",
|
50 |
+
"save_fns": [
|
51 |
+
"save_before_apply"
|
52 |
+
],
|
53 |
+
"load_fns": [
|
54 |
+
"transformers"
|
55 |
+
],
|
56 |
+
"reapply_after_load": {
|
57 |
+
"pruner": null,
|
58 |
+
"quantizer": null,
|
59 |
+
"cacher": null,
|
60 |
+
"compiler": "torch_compile",
|
61 |
+
"batcher": null
|
62 |
+
}
|
63 |
+
}
|
64 |
+
```
|
65 |
+
|
66 |
+
## Model Configuration
|
67 |
+
|
68 |
+
The configuration of the model is stored in the `config.json` file.
|
69 |
+
|
70 |
+
```bash
|
71 |
+
{
|
72 |
+
"config": {
|
73 |
+
"architectures": [
|
74 |
+
"Llama4ForCausalLM"
|
75 |
+
],
|
76 |
+
"attention_bias": false,
|
77 |
+
"attention_chunk_size": 8192,
|
78 |
+
"attention_dropout": 0.0,
|
79 |
+
"attn_scale": 0.1,
|
80 |
+
"attn_temperature_tuning": 4,
|
81 |
+
"bos_token_id": 200000,
|
82 |
+
"cache_implementation": "hybrid",
|
83 |
+
"eos_token_id": [
|
84 |
+
200001,
|
85 |
+
200007,
|
86 |
+
200008
|
87 |
+
],
|
88 |
+
"floor_scale": 8192,
|
89 |
+
"for_llm_compressor": false,
|
90 |
+
"head_dim": 8,
|
91 |
+
"hidden_act": "silu",
|
92 |
+
"hidden_size": 16,
|
93 |
+
"initializer_range": 0.02,
|
94 |
+
"interleave_moe_layer_step": 1,
|
95 |
+
"intermediate_size": 32,
|
96 |
+
"intermediate_size_mlp": 64,
|
97 |
+
"max_position_embeddings": 10485760,
|
98 |
+
"model_type": "llama4_text",
|
99 |
+
"moe_layers": [
|
100 |
+
0,
|
101 |
+
1,
|
102 |
+
2,
|
103 |
+
3,
|
104 |
+
4
|
105 |
+
],
|
106 |
+
"no_rope_layers": [
|
107 |
+
1,
|
108 |
+
1,
|
109 |
+
1,
|
110 |
+
0,
|
111 |
+
1
|
112 |
+
],
|
113 |
+
"num_attention_heads": 10,
|
114 |
+
"num_experts_per_tok": 1,
|
115 |
+
"num_hidden_layers": 5,
|
116 |
+
"num_key_value_heads": 2,
|
117 |
+
"num_local_experts": 4,
|
118 |
+
"output_router_logits": false,
|
119 |
+
"pad_token_id": 200018,
|
120 |
+
"rms_norm_eps": 1e-05,
|
121 |
+
"rope_scaling": {
|
122 |
+
"factor": 8.0,
|
123 |
+
"high_freq_factor": 4.0,
|
124 |
+
"low_freq_factor": 1.0,
|
125 |
+
"original_max_position_embeddings": 8192,
|
126 |
+
"rope_type": "llama3"
|
127 |
+
},
|
128 |
+
"rope_theta": 500000.0,
|
129 |
+
"router_aux_loss_coef": 0.001,
|
130 |
+
"router_jitter_noise": 0.0,
|
131 |
+
"tie_word_embeddings": false,
|
132 |
+
"torch_dtype": "bfloat16",
|
133 |
+
"transformers_version": "4.51.3",
|
134 |
+
"use_cache": true,
|
135 |
+
"use_qk_norm": true,
|
136 |
+
"vocab_size": 202048
|
137 |
+
},
|
138 |
+
"generation_config": {
|
139 |
+
"_from_model_config": true,
|
140 |
+
"bos_token_id": 200000,
|
141 |
+
"eos_token_id": [
|
142 |
+
200001,
|
143 |
+
200007,
|
144 |
+
200008
|
145 |
+
],
|
146 |
+
"pad_token_id": 200018,
|
147 |
+
"transformers_version": "4.51.3"
|
148 |
+
}
|
149 |
+
}
|
150 |
+
```
|
151 |
+
|
152 |
+
## 🌍 Join the Pruna AI community!
|
153 |
+
|
154 |
+
[](https://twitter.com/PrunaAI)
|
155 |
+
[](https://github.com/PrunaAI)
|
156 |
+
[](https://www.linkedin.com/company/93832878/admin/feed/posts/?feedType=following)
|
157 |
+
[](https://discord.com/invite/rskEr4BZJx)
|
158 |
+
[](https://www.reddit.com/r/PrunaAI/)
|
config.json
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"Llama4ForCausalLM"
|
4 |
+
],
|
5 |
+
"attention_bias": false,
|
6 |
+
"attention_chunk_size": 8192,
|
7 |
+
"attention_dropout": 0.0,
|
8 |
+
"attn_scale": 0.1,
|
9 |
+
"attn_temperature_tuning": 4,
|
10 |
+
"bos_token_id": 200000,
|
11 |
+
"cache_implementation": "hybrid",
|
12 |
+
"eos_token_id": [
|
13 |
+
200001,
|
14 |
+
200007,
|
15 |
+
200008
|
16 |
+
],
|
17 |
+
"floor_scale": 8192,
|
18 |
+
"for_llm_compressor": false,
|
19 |
+
"head_dim": 8,
|
20 |
+
"hidden_act": "silu",
|
21 |
+
"hidden_size": 16,
|
22 |
+
"initializer_range": 0.02,
|
23 |
+
"interleave_moe_layer_step": 1,
|
24 |
+
"intermediate_size": 32,
|
25 |
+
"intermediate_size_mlp": 64,
|
26 |
+
"max_position_embeddings": 10485760,
|
27 |
+
"model_type": "llama4_text",
|
28 |
+
"moe_layers": [
|
29 |
+
0,
|
30 |
+
1,
|
31 |
+
2,
|
32 |
+
3,
|
33 |
+
4
|
34 |
+
],
|
35 |
+
"no_rope_layers": [
|
36 |
+
1,
|
37 |
+
1,
|
38 |
+
1,
|
39 |
+
0,
|
40 |
+
1
|
41 |
+
],
|
42 |
+
"num_attention_heads": 10,
|
43 |
+
"num_experts_per_tok": 1,
|
44 |
+
"num_hidden_layers": 5,
|
45 |
+
"num_key_value_heads": 2,
|
46 |
+
"num_local_experts": 4,
|
47 |
+
"output_router_logits": false,
|
48 |
+
"pad_token_id": 200018,
|
49 |
+
"rms_norm_eps": 1e-05,
|
50 |
+
"rope_scaling": {
|
51 |
+
"factor": 8.0,
|
52 |
+
"high_freq_factor": 4.0,
|
53 |
+
"low_freq_factor": 1.0,
|
54 |
+
"original_max_position_embeddings": 8192,
|
55 |
+
"rope_type": "llama3"
|
56 |
+
},
|
57 |
+
"rope_theta": 500000.0,
|
58 |
+
"router_aux_loss_coef": 0.001,
|
59 |
+
"router_jitter_noise": 0.0,
|
60 |
+
"tie_word_embeddings": false,
|
61 |
+
"torch_dtype": "bfloat16",
|
62 |
+
"transformers_version": "4.51.3",
|
63 |
+
"use_cache": true,
|
64 |
+
"use_qk_norm": true,
|
65 |
+
"vocab_size": 202048
|
66 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 200000,
|
4 |
+
"eos_token_id": [
|
5 |
+
200001,
|
6 |
+
200007,
|
7 |
+
200008
|
8 |
+
],
|
9 |
+
"pad_token_id": 200018,
|
10 |
+
"transformers_version": "4.51.3"
|
11 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ae0393e56b63c5d4d4a10aa6ffe12a6e348b4eefac322ee77ea7f974affc7138
|
3 |
+
size 13046840
|
smash_config.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"batcher": null,
|
3 |
+
"cacher": null,
|
4 |
+
"compiler": "torch_compile",
|
5 |
+
"pruner": null,
|
6 |
+
"quantizer": null,
|
7 |
+
"torch_compile_backend": "inductor",
|
8 |
+
"torch_compile_batch_size": 1,
|
9 |
+
"torch_compile_dynamic": null,
|
10 |
+
"torch_compile_fullgraph": true,
|
11 |
+
"torch_compile_make_portable": false,
|
12 |
+
"torch_compile_max_kv_cache_size": 400,
|
13 |
+
"torch_compile_mode": "default",
|
14 |
+
"torch_compile_seqlen_manual_cuda_graph": 100,
|
15 |
+
"max_batch_size": 1,
|
16 |
+
"device": "cpu",
|
17 |
+
"save_fns": [
|
18 |
+
"save_before_apply"
|
19 |
+
],
|
20 |
+
"load_fns": [
|
21 |
+
"transformers"
|
22 |
+
],
|
23 |
+
"reapply_after_load": {
|
24 |
+
"pruner": null,
|
25 |
+
"quantizer": null,
|
26 |
+
"cacher": null,
|
27 |
+
"compiler": "torch_compile",
|
28 |
+
"batcher": null
|
29 |
+
}
|
30 |
+
}
|
tokenizer/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/tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:27e8a0999e5857682c0c0588eea86f0e0f10ded0e803eca22fb1715bdca63447
|
3 |
+
size 27948878
|
tokenizer/tokenizer_config.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|