gsprochette commited on
Commit
2a9bf79
·
verified ·
1 Parent(s): db42e94

Upload folder using huggingface_hub

Browse files
Files changed (5) hide show
  1. README.md +75 -0
  2. config.json +66 -0
  3. generation_config.json +11 -0
  4. model.safetensors +3 -0
  5. smash_config.json +25 -0
README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - pruna-ai
5
+ - safetensors
6
+ ---
7
+
8
+ # Model Card for PrunaAI/test-save-tiny-random-llama4-smashed
9
+
10
+ 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.
11
+
12
+ ## Usage
13
+
14
+ First things first, you need to install the pruna library:
15
+
16
+ ```bash
17
+ pip install pruna
18
+ ```
19
+
20
+ You can [use the transformers library to load the model](https://huggingface.co/PrunaAI/test-save-tiny-random-llama4-smashed?library=transformers) but this might not include all optimizations by default.
21
+
22
+ To ensure that all optimizations are applied, use the pruna library to load the model using the following code:
23
+
24
+ ```python
25
+ from pruna import PrunaModel
26
+
27
+ loaded_model = PrunaModel.from_pretrained(
28
+ "PrunaAI/test-save-tiny-random-llama4-smashed"
29
+ )
30
+ # we can then run inference using the methods supported by the base model
31
+ ```
32
+
33
+
34
+ For inference, you can use the inference methods of the original model like shown in [the original model card](https://huggingface.co/hf-internal-testing/tiny-random-llama4?library=transformers).
35
+ Alternatively, you can visit [the Pruna documentation](https://docs.pruna.ai/en/stable/) for more information.
36
+
37
+ ## Smash Configuration
38
+
39
+ The compression configuration of the model is stored in the `smash_config.json` file, which describes the optimization methods that were applied to the model.
40
+
41
+ ```bash
42
+ {
43
+ "batcher": null,
44
+ "cacher": null,
45
+ "compiler": null,
46
+ "factorizer": null,
47
+ "kernel": null,
48
+ "pruner": null,
49
+ "quantizer": null,
50
+ "batch_size": 1,
51
+ "device": "cpu",
52
+ "device_map": null,
53
+ "save_fns": [],
54
+ "load_fns": [
55
+ "transformers"
56
+ ],
57
+ "reapply_after_load": {
58
+ "factorizer": null,
59
+ "pruner": null,
60
+ "quantizer": null,
61
+ "kernel": null,
62
+ "cacher": null,
63
+ "compiler": null,
64
+ "batcher": null
65
+ }
66
+ }
67
+ ```
68
+
69
+ ## 🌍 Join the Pruna AI community!
70
+
71
+ [![Twitter](https://img.shields.io/twitter/follow/PrunaAI?style=social)](https://twitter.com/PrunaAI)
72
+ [![GitHub](https://img.shields.io/github/followers/PrunaAI?label=Follow%20%40PrunaAI&style=social)](https://github.com/PrunaAI)
73
+ [![LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue)](https://www.linkedin.com/company/93832878/admin/feed/posts/?feedType=following)
74
+ [![Discord](https://img.shields.io/badge/Discord-Join%20Us-blue?style=social&logo=discord)](https://discord.com/invite/rskEr4BZJx)
75
+ [![Reddit](https://img.shields.io/reddit/subreddit-subscribers/PrunaAI?style=social)](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": "float32",
62
+ "transformers_version": "4.52.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.52.3"
11
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c2defd19b1af7461456472bda405a146652059192ab48bccc020ff4ebff18472
3
+ size 26086368
smash_config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "batcher": null,
3
+ "cacher": null,
4
+ "compiler": null,
5
+ "factorizer": null,
6
+ "kernel": null,
7
+ "pruner": null,
8
+ "quantizer": null,
9
+ "batch_size": 1,
10
+ "device": "cpu",
11
+ "device_map": null,
12
+ "save_fns": [],
13
+ "load_fns": [
14
+ "transformers"
15
+ ],
16
+ "reapply_after_load": {
17
+ "factorizer": null,
18
+ "pruner": null,
19
+ "quantizer": null,
20
+ "kernel": null,
21
+ "cacher": null,
22
+ "compiler": null,
23
+ "batcher": null
24
+ }
25
+ }