Add files using upload-large-folder tool
Browse files- README.md +66 -0
- config.json +66 -0
- generation_config.json +11 -0
- model.safetensors +3 -0
- smash_config.json +20 -0
README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- pruna-ai
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# Model Card for PrunaAI/test-save-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 [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.
|
| 20 |
+
|
| 21 |
+
To ensure that all optimizations are applied, use the pruna library to load the model using the following code:
|
| 22 |
+
|
| 23 |
+
```python
|
| 24 |
+
from pruna import PrunaModel
|
| 25 |
+
|
| 26 |
+
loaded_model = PrunaModel.from_hub(
|
| 27 |
+
"PrunaAI/test-save-tiny-random-llama4-smashed"
|
| 28 |
+
)
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
After loading the model, you can use the inference methods of the original model. Take a look at the [documentation](https://pruna.readthedocs.io/en/latest/index.html) for more usage information.
|
| 32 |
+
|
| 33 |
+
## Smash Configuration
|
| 34 |
+
|
| 35 |
+
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.
|
| 36 |
+
|
| 37 |
+
```bash
|
| 38 |
+
{
|
| 39 |
+
"batcher": null,
|
| 40 |
+
"cacher": null,
|
| 41 |
+
"compiler": null,
|
| 42 |
+
"pruner": null,
|
| 43 |
+
"quantizer": null,
|
| 44 |
+
"batch_size": 1,
|
| 45 |
+
"device": "cpu",
|
| 46 |
+
"save_fns": [],
|
| 47 |
+
"load_fns": [
|
| 48 |
+
"transformers"
|
| 49 |
+
],
|
| 50 |
+
"reapply_after_load": {
|
| 51 |
+
"pruner": null,
|
| 52 |
+
"quantizer": null,
|
| 53 |
+
"cacher": null,
|
| 54 |
+
"compiler": null,
|
| 55 |
+
"batcher": null
|
| 56 |
+
}
|
| 57 |
+
}
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
## 🌍 Join the Pruna AI community!
|
| 61 |
+
|
| 62 |
+
[](https://twitter.com/PrunaAI)
|
| 63 |
+
[](https://github.com/PrunaAI)
|
| 64 |
+
[](https://www.linkedin.com/company/93832878/admin/feed/posts/?feedType=following)
|
| 65 |
+
[](https://discord.com/invite/rskEr4BZJx)
|
| 66 |
+
[](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.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:c2defd19b1af7461456472bda405a146652059192ab48bccc020ff4ebff18472
|
| 3 |
+
size 26086368
|
smash_config.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"batcher": null,
|
| 3 |
+
"cacher": null,
|
| 4 |
+
"compiler": null,
|
| 5 |
+
"pruner": null,
|
| 6 |
+
"quantizer": null,
|
| 7 |
+
"batch_size": 1,
|
| 8 |
+
"device": "cpu",
|
| 9 |
+
"save_fns": [],
|
| 10 |
+
"load_fns": [
|
| 11 |
+
"transformers"
|
| 12 |
+
],
|
| 13 |
+
"reapply_after_load": {
|
| 14 |
+
"pruner": null,
|
| 15 |
+
"quantizer": null,
|
| 16 |
+
"cacher": null,
|
| 17 |
+
"compiler": null,
|
| 18 |
+
"batcher": null
|
| 19 |
+
}
|
| 20 |
+
}
|