gsprochette commited on
Commit
792eabb
·
verified ·
1 Parent(s): 7039022

Upload folder using huggingface_hub

Browse files
Files changed (5) hide show
  1. README.md +84 -0
  2. config.json +30 -0
  3. generation_config.json +6 -0
  4. model.safetensors +3 -0
  5. smash_config.json +33 -0
README.md ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - safetensors
5
+ - pruna-ai
6
+ - pruna_pro-ai
7
+ ---
8
+
9
+ # Model Card for PrunaAI/test-save-tiny-random-llama3-smashed-pro
10
+
11
+ 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.
12
+
13
+ ## Usage
14
+
15
+ First things first, you need to install the pruna library:
16
+
17
+ ```bash
18
+ pip install pruna_pro
19
+ ```
20
+
21
+ You can [use the transformers library to load the model](https://huggingface.co/PrunaAI/test-save-tiny-random-llama3-smashed-pro?library=transformers) but this might not include all optimizations by default.
22
+
23
+ To ensure that all optimizations are applied, use the pruna library to load the model using the following code:
24
+
25
+ ```python
26
+ from pruna_pro import PrunaProModel
27
+
28
+ loaded_model = PrunaProModel.from_pretrained(
29
+ "PrunaAI/test-save-tiny-random-llama3-smashed-pro"
30
+ )
31
+ # we can then run inference using the methods supported by the base model
32
+ ```
33
+
34
+
35
+ For inference, you can use the inference methods of the original model like shown in [the original model card](https://huggingface.co/HuggingFaceM4/tiny-random-Llama3ForCausalLM?library=transformers).
36
+ Alternatively, you can visit [the Pruna documentation](https://docs.pruna.ai/en/stable/) for more information.
37
+
38
+ ## Smash Configuration
39
+
40
+ 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.
41
+
42
+ ```bash
43
+ {
44
+ "batcher": null,
45
+ "cacher": null,
46
+ "compiler": null,
47
+ "distiller": null,
48
+ "distributer": null,
49
+ "enhancer": null,
50
+ "factorizer": null,
51
+ "kernel": null,
52
+ "pruner": null,
53
+ "quantizer": null,
54
+ "recoverer": null,
55
+ "batch_size": 1,
56
+ "device": "cpu",
57
+ "device_map": null,
58
+ "save_fns": [],
59
+ "load_fns": [
60
+ "transformers"
61
+ ],
62
+ "reapply_after_load": {
63
+ "factorizer": null,
64
+ "pruner": null,
65
+ "quantizer": null,
66
+ "distiller": null,
67
+ "kernel": null,
68
+ "cacher": null,
69
+ "recoverer": null,
70
+ "distributer": null,
71
+ "compiler": null,
72
+ "batcher": null,
73
+ "enhancer": null
74
+ }
75
+ }
76
+ ```
77
+
78
+ ## 🌍 Join the Pruna AI community!
79
+
80
+ [![Twitter](https://img.shields.io/twitter/follow/PrunaAI?style=social)](https://twitter.com/PrunaAI)
81
+ [![GitHub](https://img.shields.io/github/followers/PrunaAI?label=Follow%20%40PrunaAI&style=social)](https://github.com/PrunaAI)
82
+ [![LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue)](https://www.linkedin.com/company/93832878/admin/feed/posts/?feedType=following)
83
+ [![Discord](https://img.shields.io/badge/Discord-Join%20Us-blue?style=social&logo=discord)](https://discord.gg/JFQmtFKCjd)
84
+ [![Reddit](https://img.shields.io/reddit/subreddit-subscribers/PrunaAI?style=social)](https://www.reddit.com/r/PrunaAI/)
config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "HuggingFaceM4/tiny-random-Llama3ForCausalLM",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "bos_token_id": 1,
9
+ "eos_token_id": 2,
10
+ "head_dim": 4,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 16,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 64,
15
+ "max_position_embeddings": 2048,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 4,
19
+ "num_hidden_layers": 2,
20
+ "num_key_value_heads": 1,
21
+ "pretraining_tp": 1,
22
+ "rms_norm_eps": 1e-06,
23
+ "rope_scaling": null,
24
+ "rope_theta": 10000.0,
25
+ "tie_word_embeddings": false,
26
+ "torch_dtype": "float32",
27
+ "transformers_version": "4.48.0",
28
+ "use_cache": true,
29
+ "vocab_size": 128256
30
+ }
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.48.0"
6
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:714bbd246d0de5fcbe1f18a3c2469a9f497bd6276b2979ac5db7766cd22550f9
3
+ size 16449008
smash_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "batcher": null,
3
+ "cacher": null,
4
+ "compiler": null,
5
+ "distiller": null,
6
+ "distributer": null,
7
+ "enhancer": null,
8
+ "factorizer": null,
9
+ "kernel": null,
10
+ "pruner": null,
11
+ "quantizer": null,
12
+ "recoverer": null,
13
+ "batch_size": 1,
14
+ "device": "cpu",
15
+ "device_map": null,
16
+ "save_fns": [],
17
+ "load_fns": [
18
+ "transformers"
19
+ ],
20
+ "reapply_after_load": {
21
+ "factorizer": null,
22
+ "pruner": null,
23
+ "quantizer": null,
24
+ "distiller": null,
25
+ "kernel": null,
26
+ "cacher": null,
27
+ "recoverer": null,
28
+ "distributer": null,
29
+ "compiler": null,
30
+ "batcher": null,
31
+ "enhancer": null
32
+ }
33
+ }