AINovice2005 commited on
Commit
3a4aa68
·
verified ·
1 Parent(s): 40bfe7f

Add files using upload-large-folder tool

Browse files
Files changed (4) hide show
  1. README.md +97 -0
  2. config.json +30 -0
  3. qmodel.pt +3 -0
  4. smash_config.json +42 -0
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - HuggingFaceTB/smollm-corpus
4
+ language:
5
+ - en
6
+ library_name: transformers
7
+ license: apache-2.0
8
+ tags:
9
+ - pruna-ai
10
+ - safetensors
11
+ ---
12
+
13
+ # Model Card for AINovice2005/SmolLM-360M-smashed
14
+
15
+ 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.
16
+
17
+ ## Usage
18
+
19
+ First things first, you need to install the pruna library:
20
+
21
+ ```bash
22
+ pip install pruna
23
+ ```
24
+
25
+ You can [use the transformers library to load the model](https://huggingface.co/AINovice2005/SmolLM-360M-smashed?library=transformers) but this might not include all optimizations by default.
26
+
27
+ To ensure that all optimizations are applied, use the pruna library to load the model using the following code:
28
+
29
+ ```python
30
+ from pruna import PrunaModel
31
+
32
+ loaded_model = PrunaModel.from_pretrained(
33
+ "AINovice2005/SmolLM-360M-smashed"
34
+ )
35
+ # we can then run inference using the methods supported by the base model
36
+ ```
37
+
38
+
39
+ For inference, you can use the inference methods of the original model like shown in [the original model card](https://huggingface.co/HuggingFaceTB/SmolLM-360M?library=transformers).
40
+ Alternatively, you can visit [the Pruna documentation](https://docs.pruna.ai/en/stable/) 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": "torch_compile",
51
+ "factorizer": null,
52
+ "kernel": null,
53
+ "pruner": null,
54
+ "quantizer": "hqq",
55
+ "hqq_backend": "torchao_int4",
56
+ "hqq_compute_dtype": "torch.bfloat16",
57
+ "hqq_force_hf_implementation": false,
58
+ "hqq_group_size": 128,
59
+ "hqq_use_torchao_kernels": true,
60
+ "hqq_weight_bits": 4,
61
+ "torch_compile_backend": "inductor",
62
+ "torch_compile_dynamic": false,
63
+ "torch_compile_fullgraph": true,
64
+ "torch_compile_make_portable": false,
65
+ "torch_compile_max_kv_cache_size": 800,
66
+ "torch_compile_mode": "default",
67
+ "torch_compile_seqlen_manual_cuda_graph": 400,
68
+ "torch_compile_target": "module_list",
69
+ "batch_size": 1,
70
+ "device": "cuda:0",
71
+ "device_map": null,
72
+ "save_fns": [
73
+ "hqq",
74
+ "save_before_apply"
75
+ ],
76
+ "load_fns": [
77
+ "hqq"
78
+ ],
79
+ "reapply_after_load": {
80
+ "factorizer": null,
81
+ "pruner": null,
82
+ "quantizer": null,
83
+ "kernel": null,
84
+ "cacher": null,
85
+ "compiler": "torch_compile",
86
+ "batcher": null
87
+ }
88
+ }
89
+ ```
90
+
91
+ ## 🌍 Join the Pruna AI community!
92
+
93
+ [![Twitter](https://img.shields.io/twitter/follow/PrunaAI?style=social)](https://twitter.com/PrunaAI)
94
+ [![GitHub](https://img.shields.io/github/followers/PrunaAI?label=Follow%20%40PrunaAI&style=social)](https://github.com/PrunaAI)
95
+ [![LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue)](https://www.linkedin.com/company/93832878/admin/feed/posts/?feedType=following)
96
+ [![Discord](https://img.shields.io/badge/Discord-Join%20Us-blue?style=social&logo=discord)](https://discord.gg/JFQmtFKCjd)
97
+ [![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
+ "_attn_implementation_autoset": true,
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "bos_token_id": 0,
9
+ "eos_token_id": 0,
10
+ "head_dim": 64,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 960,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 2560,
15
+ "max_position_embeddings": 2048,
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
+ "pretraining_tp": 1,
22
+ "rms_norm_eps": 1e-05,
23
+ "rope_scaling": null,
24
+ "rope_theta": 10000.0,
25
+ "tie_word_embeddings": true,
26
+ "torch_dtype": "float32",
27
+ "transformers_version": "4.51.0",
28
+ "use_cache": true,
29
+ "vocab_size": 49152
30
+ }
qmodel.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a739c24cda8536de721f4104ed218d30af0d7e16265e4a7c8f29e17fff29ee6
3
+ size 261853587
smash_config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "batcher": null,
3
+ "cacher": null,
4
+ "compiler": "torch_compile",
5
+ "factorizer": null,
6
+ "kernel": null,
7
+ "pruner": null,
8
+ "quantizer": "hqq",
9
+ "hqq_backend": "torchao_int4",
10
+ "hqq_compute_dtype": "torch.bfloat16",
11
+ "hqq_force_hf_implementation": false,
12
+ "hqq_group_size": 128,
13
+ "hqq_use_torchao_kernels": true,
14
+ "hqq_weight_bits": 4,
15
+ "torch_compile_backend": "inductor",
16
+ "torch_compile_dynamic": false,
17
+ "torch_compile_fullgraph": true,
18
+ "torch_compile_make_portable": false,
19
+ "torch_compile_max_kv_cache_size": 800,
20
+ "torch_compile_mode": "default",
21
+ "torch_compile_seqlen_manual_cuda_graph": 400,
22
+ "torch_compile_target": "module_list",
23
+ "batch_size": 1,
24
+ "device": "cuda:0",
25
+ "device_map": null,
26
+ "save_fns": [
27
+ "hqq",
28
+ "save_before_apply"
29
+ ],
30
+ "load_fns": [
31
+ "hqq"
32
+ ],
33
+ "reapply_after_load": {
34
+ "factorizer": null,
35
+ "pruner": null,
36
+ "quantizer": null,
37
+ "kernel": null,
38
+ "cacher": null,
39
+ "compiler": "torch_compile",
40
+ "batcher": null
41
+ }
42
+ }