davidberenstein1957 commited on
Commit
f207f55
·
verified ·
1 Parent(s): 80696a4

Add files using upload-large-folder tool

Browse files
Files changed (5) hide show
  1. README.md +82 -0
  2. config.json +38 -0
  3. generation_config.json +7 -0
  4. model.safetensors +3 -0
  5. smash_config.json +27 -0
README.md ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model:
3
+ - HuggingFaceTB/SmolLM2-360M
4
+ language:
5
+ - en
6
+ library_name: transformers
7
+ license: apache-2.0
8
+ pipeline_tag: text-generation
9
+ tags:
10
+ - safetensors
11
+ - onnx
12
+ - transformers.js
13
+ - pruna-ai
14
+ ---
15
+
16
+ # Model Card for davidberenstein1957/SmolLM2-360M-Instruct-smashed
17
+
18
+ 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.
19
+
20
+ ## Usage
21
+
22
+ First things first, you need to install the pruna library:
23
+
24
+ ```bash
25
+ pip install pruna
26
+ ```
27
+
28
+ You can [use the transformers library to load the model](https://huggingface.co/davidberenstein1957/SmolLM2-360M-Instruct-smashed?library=transformers) but this might not include all optimizations by default.
29
+
30
+ To ensure that all optimizations are applied, use the pruna library to load the model using the following code:
31
+
32
+ ```python
33
+ from pruna import PrunaModel
34
+
35
+ loaded_model = PrunaModel.from_pretrained(
36
+ "davidberenstein1957/SmolLM2-360M-Instruct-smashed"
37
+ )
38
+ ```
39
+
40
+ For inference, you can use the inference methods of the original model like shown [in the original model card](https://huggingface.co/davidberenstein1957/SmolLM2-360M-Instruct-smashed?library=transformers). Alternatively, you can visit the full documentation [here](https://pruna.readthedocs.io/en/latest/index.html) for more information.
41
+
42
+ ## Smash Configuration
43
+
44
+ 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.
45
+
46
+ ```bash
47
+ {
48
+ "batcher": null,
49
+ "cacher": null,
50
+ "compiler": null,
51
+ "factorizer": null,
52
+ "pruner": null,
53
+ "quantizer": "torchao",
54
+ "torchao_excluded_modules": "none",
55
+ "torchao_quant_type": "int8dq",
56
+ "batch_size": 1,
57
+ "device": "cpu",
58
+ "device_map": null,
59
+ "save_fns": [
60
+ "save_before_apply"
61
+ ],
62
+ "load_fns": [
63
+ "transformers"
64
+ ],
65
+ "reapply_after_load": {
66
+ "factorizer": null,
67
+ "pruner": null,
68
+ "quantizer": "torchao",
69
+ "cacher": null,
70
+ "compiler": null,
71
+ "batcher": null
72
+ }
73
+ }
74
+ ```
75
+
76
+ ## 🌍 Join the Pruna AI community!
77
+
78
+ [![Twitter](https://img.shields.io/twitter/follow/PrunaAI?style=social)](https://twitter.com/PrunaAI)
79
+ [![GitHub](https://img.shields.io/github/followers/PrunaAI?label=Follow%20%40PrunaAI&style=social)](https://github.com/PrunaAI)
80
+ [![LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue)](https://www.linkedin.com/company/93832878/admin/feed/posts/?feedType=following)
81
+ [![Discord](https://img.shields.io/badge/Discord-Join%20Us-blue?style=social&logo=discord)](https://discord.com/invite/rskEr4BZJx)
82
+ [![Reddit](https://img.shields.io/reddit/subreddit-subscribers/PrunaAI?style=social)](https://www.reddit.com/r/PrunaAI/)
config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "eos_token_id": 2,
9
+ "head_dim": 64,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 960,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 2560,
14
+ "is_llama_config": true,
15
+ "max_position_embeddings": 8192,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 15,
19
+ "num_hidden_layers": 32,
20
+ "num_key_value_heads": 5,
21
+ "pad_token_id": 2,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-05,
24
+ "rope_interleaved": false,
25
+ "rope_scaling": null,
26
+ "rope_theta": 100000,
27
+ "tie_word_embeddings": true,
28
+ "torch_dtype": "float32",
29
+ "transformers.js_config": {
30
+ "kv_cache_dtype": {
31
+ "fp16": "float16",
32
+ "q4f16": "float16"
33
+ }
34
+ },
35
+ "transformers_version": "4.52.3",
36
+ "use_cache": true,
37
+ "vocab_size": 49152
38
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "pad_token_id": 2,
6
+ "transformers_version": "4.52.3"
7
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d387d4323e5314a3d8f37b4ca628776a16a5963169eb775ed70a201bee5a7544
3
+ size 1447317080
smash_config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "batcher": null,
3
+ "cacher": null,
4
+ "compiler": null,
5
+ "factorizer": null,
6
+ "pruner": null,
7
+ "quantizer": "torchao",
8
+ "torchao_excluded_modules": "none",
9
+ "torchao_quant_type": "int8dq",
10
+ "batch_size": 1,
11
+ "device": "cpu",
12
+ "device_map": null,
13
+ "save_fns": [
14
+ "save_before_apply"
15
+ ],
16
+ "load_fns": [
17
+ "transformers"
18
+ ],
19
+ "reapply_after_load": {
20
+ "factorizer": null,
21
+ "pruner": null,
22
+ "quantizer": "torchao",
23
+ "cacher": null,
24
+ "compiler": null,
25
+ "batcher": null
26
+ }
27
+ }