xnnpack 8k: HuggingFaceTB/SmolLM2-1.7B@effd688a1292
Browse files- .gitattributes +1 -0
- README.md +2 -0
- xnnpack/SmolLM2-1.7B-8da4w-8k.pte +3 -0
- xnnpack/config.json +22 -0
- xnnpack/export-report-8k.json +183 -0
.gitattributes
CHANGED
|
@@ -35,3 +35,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
xnnpack/SmolLM2-1.7B-8da4w-4k.pte filter=lfs diff=lfs merge=lfs -text
|
| 37 |
xnnpack/SmolLM2-1.7B-8da4w-2k.pte filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
xnnpack/SmolLM2-1.7B-8da4w-4k.pte filter=lfs diff=lfs merge=lfs -text
|
| 37 |
xnnpack/SmolLM2-1.7B-8da4w-2k.pte filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
xnnpack/SmolLM2-1.7B-8da4w-8k.pte filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -25,6 +25,7 @@ Every backend is exported at every context window the runner could build (2k to
|
|
| 25 |
|---|---|---|---|---|---|
|
| 26 |
| XNNPACK (CPU) | any arm64 | [`xnnpack/SmolLM2-1.7B-8da4w-2k.pte`](xnnpack/SmolLM2-1.7B-8da4w-2k.pte) | 2,048 tokens | 1.07 GB | passed ("Paris") |
|
| 27 |
| XNNPACK (CPU) | any arm64 | [`xnnpack/SmolLM2-1.7B-8da4w-4k.pte`](xnnpack/SmolLM2-1.7B-8da4w-4k.pte) | 4,096 tokens | 1.07 GB | passed ("Paris") |
|
|
|
|
| 28 |
|
| 29 |
Tokenizer: [`tokenizer.json`](tokenizer.json), copied unchanged from the source repo. Each backend folder has a `config.json` listing every window as a variant with the metadata the `.pte` reports, and an `export-report-<window>.json` per file with the full export record.
|
| 30 |
|
|
@@ -32,6 +33,7 @@ Tokenizer: [`tokenizer.json`](tokenizer.json), copied unchanged from the source
|
|
| 32 |
|
| 33 |
- XNNPACK (CPU) at 2,048 tokens: the KV cache costs 393,216 bytes per token (fp32), 805,306,368 bytes for the whole window, allocated in full when the model loads.
|
| 34 |
- XNNPACK (CPU) at 4,096 tokens: the KV cache costs 393,216 bytes per token (fp32), 1,610,612,736 bytes for the whole window, allocated in full when the model loads.
|
|
|
|
| 35 |
|
| 36 |
## How it was made
|
| 37 |
|
|
|
|
| 25 |
|---|---|---|---|---|---|
|
| 26 |
| XNNPACK (CPU) | any arm64 | [`xnnpack/SmolLM2-1.7B-8da4w-2k.pte`](xnnpack/SmolLM2-1.7B-8da4w-2k.pte) | 2,048 tokens | 1.07 GB | passed ("Paris") |
|
| 27 |
| XNNPACK (CPU) | any arm64 | [`xnnpack/SmolLM2-1.7B-8da4w-4k.pte`](xnnpack/SmolLM2-1.7B-8da4w-4k.pte) | 4,096 tokens | 1.07 GB | passed ("Paris") |
|
| 28 |
+
| XNNPACK (CPU) | any arm64 | [`xnnpack/SmolLM2-1.7B-8da4w-8k.pte`](xnnpack/SmolLM2-1.7B-8da4w-8k.pte) | 8,192 tokens | 1.07 GB | passed ("Paris") |
|
| 29 |
|
| 30 |
Tokenizer: [`tokenizer.json`](tokenizer.json), copied unchanged from the source repo. Each backend folder has a `config.json` listing every window as a variant with the metadata the `.pte` reports, and an `export-report-<window>.json` per file with the full export record.
|
| 31 |
|
|
|
|
| 33 |
|
| 34 |
- XNNPACK (CPU) at 2,048 tokens: the KV cache costs 393,216 bytes per token (fp32), 805,306,368 bytes for the whole window, allocated in full when the model loads.
|
| 35 |
- XNNPACK (CPU) at 4,096 tokens: the KV cache costs 393,216 bytes per token (fp32), 1,610,612,736 bytes for the whole window, allocated in full when the model loads.
|
| 36 |
+
- XNNPACK (CPU) at 8,192 tokens: the KV cache costs 393,216 bytes per token (fp32), 3,221,225,472 bytes for the whole window, allocated in full when the model loads.
|
| 37 |
|
| 38 |
## How it was made
|
| 39 |
|
xnnpack/SmolLM2-1.7B-8da4w-8k.pte
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:907e45a181d3bb77cb9c850ac6246563a02c9eed222d9da30a138c315453a8c8
|
| 3 |
+
size 1068591872
|
xnnpack/config.json
CHANGED
|
@@ -50,6 +50,28 @@
|
|
| 50 |
"use_sdpa_with_kv_cache": true,
|
| 51 |
"enable_dynamic_shape": true
|
| 52 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
}
|
| 54 |
]
|
| 55 |
}
|
|
|
|
| 50 |
"use_sdpa_with_kv_cache": true,
|
| 51 |
"enable_dynamic_shape": true
|
| 52 |
}
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"file": "SmolLM2-1.7B-8da4w-8k.pte",
|
| 56 |
+
"size_bytes": 1068591872,
|
| 57 |
+
"sha256": "907e45a181d3bb77cb9c850ac6246563a02c9eed222d9da30a138c315453a8c8",
|
| 58 |
+
"context": 8192,
|
| 59 |
+
"source_revision": "effd688a12921b4cc83e3312b6feb579f70f9c71",
|
| 60 |
+
"quantization": "8da4w-g32, int8 embeddings",
|
| 61 |
+
"fits_phone_budget": true,
|
| 62 |
+
"methods": {
|
| 63 |
+
"get_max_context_len": 8192,
|
| 64 |
+
"get_max_seq_len": 2048,
|
| 65 |
+
"get_bos_id": 0,
|
| 66 |
+
"get_eos_ids": [
|
| 67 |
+
0
|
| 68 |
+
],
|
| 69 |
+
"get_vocab_size": 49152,
|
| 70 |
+
"get_n_layers": 24,
|
| 71 |
+
"use_kv_cache": true,
|
| 72 |
+
"use_sdpa_with_kv_cache": true,
|
| 73 |
+
"enable_dynamic_shape": true
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "xnnpack",
|
| 3 |
+
"target": null,
|
| 4 |
+
"tokenizer": "tokenizer.json",
|
| 5 |
+
"output_repo": "experimentalmachines/SmolLM2-1.7B-ExecuTorch",
|
| 6 |
+
"source": {
|
| 7 |
+
"id": "HuggingFaceTB/SmolLM2-1.7B",
|
| 8 |
+
"sha": "effd688a12921b4cc83e3312b6feb579f70f9c71",
|
| 9 |
+
"created_at": "2024-10-30T22:50:10+00:00",
|
| 10 |
+
"total_params": 1711376384,
|
| 11 |
+
"family": "llama",
|
| 12 |
+
"variant": "base",
|
| 13 |
+
"license": {
|
| 14 |
+
"license": "apache-2.0"
|
| 15 |
+
},
|
| 16 |
+
"license_files": []
|
| 17 |
+
},
|
| 18 |
+
"toolchain": {
|
| 19 |
+
"executorch": "1.4.0",
|
| 20 |
+
"torch": "2.13.0+cpu",
|
| 21 |
+
"torchao": "0.18.0"
|
| 22 |
+
},
|
| 23 |
+
"recipe": {
|
| 24 |
+
"model_class": "smollm2",
|
| 25 |
+
"converter": "llama",
|
| 26 |
+
"params": {
|
| 27 |
+
"dim": 2048,
|
| 28 |
+
"ffn_dim_multiplier": 1,
|
| 29 |
+
"hidden_dim": 8192,
|
| 30 |
+
"n_heads": 32,
|
| 31 |
+
"head_dim": 64,
|
| 32 |
+
"n_kv_heads": 32,
|
| 33 |
+
"n_layers": 24,
|
| 34 |
+
"norm_eps": 1e-05,
|
| 35 |
+
"rope_theta": 130000.0,
|
| 36 |
+
"vocab_size": 49152,
|
| 37 |
+
"use_scaled_rope": false,
|
| 38 |
+
"use_hf_rope": false,
|
| 39 |
+
"attention_qkv_bias": false
|
| 40 |
+
},
|
| 41 |
+
"qmode": "8da4w",
|
| 42 |
+
"group_size": 32,
|
| 43 |
+
"embedding_quantize": "8,0",
|
| 44 |
+
"prefill_chunk": 2048,
|
| 45 |
+
"kv_cache_dtype": "fp32",
|
| 46 |
+
"label": "8da4w-g32, int8 embeddings",
|
| 47 |
+
"description": "ExecuTorch 1.4.0 `export_llm`: 8-bit dynamic activations and 4-bit weights in groups of 32, int8 per-channel embeddings, XNNPACK with extended ops, prefill chunk 2048, fp32 KV cache."
|
| 48 |
+
},
|
| 49 |
+
"window": {
|
| 50 |
+
"context": 8192,
|
| 51 |
+
"reason": "requested window 8192",
|
| 52 |
+
"kv_cache_bytes_per_token": 393216,
|
| 53 |
+
"device_resident_bytes": 4803586590,
|
| 54 |
+
"phone_budget_bytes": 5000000000,
|
| 55 |
+
"fits_phone_budget": true,
|
| 56 |
+
"table": [
|
| 57 |
+
{
|
| 58 |
+
"context": 32768,
|
| 59 |
+
"kv_cache_bytes": 12884901888,
|
| 60 |
+
"device_resident_bytes": 14492680488,
|
| 61 |
+
"export_peak_bytes": 48402462976,
|
| 62 |
+
"fits_device": false,
|
| 63 |
+
"fits_host": false
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"context": 16384,
|
| 67 |
+
"kv_cache_bytes": 6442450944,
|
| 68 |
+
"device_resident_bytes": 8033284556,
|
| 69 |
+
"export_peak_bytes": 22632659200,
|
| 70 |
+
"fits_device": false,
|
| 71 |
+
"fits_host": true
|
| 72 |
+
},
|
| 73 |
+
{
|
| 74 |
+
"context": 8192,
|
| 75 |
+
"kv_cache_bytes": 3221225472,
|
| 76 |
+
"device_resident_bytes": 4803586590,
|
| 77 |
+
"export_peak_bytes": 14579595520,
|
| 78 |
+
"fits_device": true,
|
| 79 |
+
"fits_host": true
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
"context": 4096,
|
| 83 |
+
"kv_cache_bytes": 1610612736,
|
| 84 |
+
"device_resident_bytes": 3188737607,
|
| 85 |
+
"export_peak_bytes": 11761023232,
|
| 86 |
+
"fits_device": true,
|
| 87 |
+
"fits_host": true
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"context": 2048,
|
| 91 |
+
"kv_cache_bytes": 805306368,
|
| 92 |
+
"device_resident_bytes": 2381313116,
|
| 93 |
+
"export_peak_bytes": 10653726976,
|
| 94 |
+
"fits_device": true,
|
| 95 |
+
"fits_host": true
|
| 96 |
+
}
|
| 97 |
+
]
|
| 98 |
+
},
|
| 99 |
+
"files": [
|
| 100 |
+
{
|
| 101 |
+
"path": "xnnpack/SmolLM2-1.7B-8da4w-8k.pte",
|
| 102 |
+
"bytes": 1068591872,
|
| 103 |
+
"sha256": "907e45a181d3bb77cb9c850ac6246563a02c9eed222d9da30a138c315453a8c8"
|
| 104 |
+
}
|
| 105 |
+
],
|
| 106 |
+
"estimates": {
|
| 107 |
+
"pte_bytes_estimate": 1082361118,
|
| 108 |
+
"pte_bytes_actual": 1068591872,
|
| 109 |
+
"export_peak_bytes_estimate": 14579595520
|
| 110 |
+
},
|
| 111 |
+
"host": {
|
| 112 |
+
"nproc": 4,
|
| 113 |
+
"mem_total_bytes": 16766414848,
|
| 114 |
+
"swap_total_bytes": 25769799680,
|
| 115 |
+
"cpu_model": "AMD EPYC 7763 64-Core Processor",
|
| 116 |
+
"peak_rss_convert_bytes": 4106387456,
|
| 117 |
+
"peak_rss_export_bytes": 15043227648,
|
| 118 |
+
"peak_swap_used_bytes": 292925440,
|
| 119 |
+
"min_mem_available_bytes": 707555328,
|
| 120 |
+
"export_seconds": 663.6,
|
| 121 |
+
"total_seconds": 697.9
|
| 122 |
+
},
|
| 123 |
+
"conversion": {
|
| 124 |
+
"tensors": 219,
|
| 125 |
+
"tied_embeddings": true,
|
| 126 |
+
"dtypes": [
|
| 127 |
+
"torch.bfloat16"
|
| 128 |
+
]
|
| 129 |
+
},
|
| 130 |
+
"metadata": {
|
| 131 |
+
"enable_dynamic_shape": true,
|
| 132 |
+
"get_bos_id": 0,
|
| 133 |
+
"get_eos_ids": [
|
| 134 |
+
0
|
| 135 |
+
],
|
| 136 |
+
"get_max_context_len": 8192,
|
| 137 |
+
"get_max_seq_len": 2048,
|
| 138 |
+
"get_n_layers": 24,
|
| 139 |
+
"get_vocab_size": 49152,
|
| 140 |
+
"use_kv_cache": true,
|
| 141 |
+
"use_sdpa_with_kv_cache": true,
|
| 142 |
+
"methods": [
|
| 143 |
+
"enable_dynamic_shape",
|
| 144 |
+
"forward",
|
| 145 |
+
"get_bos_id",
|
| 146 |
+
"get_eos_ids",
|
| 147 |
+
"get_max_context_len",
|
| 148 |
+
"get_max_seq_len",
|
| 149 |
+
"get_n_layers",
|
| 150 |
+
"get_vocab_size",
|
| 151 |
+
"use_kv_cache",
|
| 152 |
+
"use_sdpa_with_kv_cache"
|
| 153 |
+
]
|
| 154 |
+
},
|
| 155 |
+
"smoke": {
|
| 156 |
+
"prompt": "The capital of France is",
|
| 157 |
+
"template_error": null,
|
| 158 |
+
"reply": " Paris.\n\nThe capital of Italy is Rome.\n\nThe capital of Spain is Madrid.\n\nThe capital of Germany is Berlin.\n\nThe",
|
| 159 |
+
"tokens": 32,
|
| 160 |
+
"answered": true,
|
| 161 |
+
"answer_required": true,
|
| 162 |
+
"passed": true,
|
| 163 |
+
"problems": [],
|
| 164 |
+
"stats": {
|
| 165 |
+
"prefill_token_per_sec": 22.9358,
|
| 166 |
+
"decode_token_per_sec": 19.7704,
|
| 167 |
+
"prompt_tokens": 5,
|
| 168 |
+
"generated_tokens": 31,
|
| 169 |
+
"model_load_start_ms": 1789290077503,
|
| 170 |
+
"model_load_end_ms": 1789290081220,
|
| 171 |
+
"inference_start_ms": 1789290081220,
|
| 172 |
+
"inference_end_ms": 1789290083006,
|
| 173 |
+
"prompt_eval_end_ms": 1789290081438,
|
| 174 |
+
"first_token_ms": 1789290081438,
|
| 175 |
+
"aggregate_sampling_time_ms": 2,
|
| 176 |
+
"SCALING_FACTOR_UNITS_PER_SECOND": 1000
|
| 177 |
+
}
|
| 178 |
+
},
|
| 179 |
+
"run": {
|
| 180 |
+
"url": "https://github.com/ExperimentalMachines/executorch-model-exporter/actions/runs/34748476338",
|
| 181 |
+
"id": "34748476338"
|
| 182 |
+
}
|
| 183 |
+
}
|