dtransposed commited on
Commit
dfa42bd
1 Parent(s): 97e3530

Delete llama2.c-stories110M-pruned50

Browse files
llama2.c-stories110M-pruned50/.DS_Store DELETED
Binary file (6.15 kB)
 
llama2.c-stories110M-pruned50/.gitattributes DELETED
@@ -1,35 +0,0 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
llama2.c-stories110M-pruned50/README.md DELETED
@@ -1,74 +0,0 @@
1
- ---
2
- base_model: Xenova/llama2.c-stories110M
3
- inference: true
4
- model_type: llama
5
- quantized_by: mgoin
6
- tags:
7
- - nm-vllm
8
- - sparse
9
- ---
10
-
11
- ## llama2.c-stories110M-pruned50
12
- This repo contains model files for [llama2.c 110M tinystories](https://huggingface.co/Xenova/llama2.c-stories110M) optimized for [NM-vLLM](https://github.com/neuralmagic/nm-vllm), a high-throughput serving engine for compressed LLMs.
13
-
14
- This model was pruned with [SparseGPT](https://arxiv.org/abs/2301.00774), using [SparseML](https://github.com/neuralmagic/sparseml).
15
-
16
- ## Inference
17
- Install [NM-vLLM](https://github.com/neuralmagic/nm-vllm) for fast inference and low memory-usage:
18
- ```bash
19
- pip install nm-vllm[sparse]
20
- ```
21
- Run in a Python pipeline for local inference:
22
- ```python
23
- from vllm import LLM, SamplingParams
24
-
25
- model = LLM("nm-testing/llama2.c-stories110M-pruned50", sparsity="sparse_w16a16")
26
- prompt = "Hello my name is"
27
-
28
- sampling_params = SamplingParams(max_tokens=100, temperature=0)
29
- outputs = model.generate(prompt, sampling_params=sampling_params)
30
- print(outputs[0].outputs[0].text)
31
- ```
32
-
33
- ## Prompt template
34
-
35
- N/A
36
-
37
- ## Sparsification
38
- For details on how this model was sparsified, see the `recipe.yaml` in this repo and follow the instructions below.
39
-
40
- Install [SparseML](https://github.com/neuralmagic/sparseml):
41
- ```bash
42
- git clone https://github.com/neuralmagic/sparseml
43
- pip install -e "sparseml[transformers]"
44
- ```
45
-
46
- Replace the recipe as you like and run this one-shot compression script to apply SparseGPT:
47
- ```python
48
- import sparseml.transformers
49
-
50
- original_model_name = "Xenova/llama2.c-stories110M"
51
- calibration_dataset = "open_platypus"
52
- output_directory = "output/"
53
-
54
- recipe = """
55
- test_stage:
56
- obcq_modifiers:
57
- SparseGPTModifier:
58
- sparsity: 0.5
59
- sequential_update: true
60
- targets: ['re:model.layers.\d*$']
61
- """
62
-
63
- # Apply SparseGPT to the model
64
- sparseml.transformers.oneshot(
65
- model=original_model_name,
66
- dataset=calibration_dataset,
67
- recipe=recipe,
68
- output_dir=output_directory,
69
- )
70
- ```
71
-
72
- ## Slack
73
-
74
- For further support, and discussions on these models and AI in general, join [Neural Magic's Slack Community](https://join.slack.com/t/discuss-neuralmagic/shared_invite/zt-q1a1cnvo-YBoICSIw3L1dmQpjBeDurQ)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
llama2.c-stories110M-pruned50/config.json DELETED
@@ -1,33 +0,0 @@
1
- {
2
- "_name_or_path": "/home/damian/.cache/huggingface/hub/models--neuralmagic--llama2.c-stories110M-pruned50/snapshots/ae99c0a865dc99a60311e3fd3fc145eb339cff77",
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
- "hidden_act": "silu",
11
- "hidden_size": 768,
12
- "initializer_range": 0.02,
13
- "intermediate_size": 2048,
14
- "max_position_embeddings": 1024,
15
- "model_type": "llama",
16
- "num_attention_heads": 12,
17
- "num_hidden_layers": 12,
18
- "num_key_value_heads": 12,
19
- "pretraining_tp": 1,
20
- "rms_norm_eps": 1e-05,
21
- "rope_scaling": null,
22
- "rope_theta": 10000.0,
23
- "sparsity_config": {
24
- "format": "sparse_bitmask",
25
- "global_sparsity": 38.77294698534069,
26
- "sparsity_structure": "0:0"
27
- },
28
- "tie_word_embeddings": true,
29
- "torch_dtype": "float32",
30
- "transformers_version": "4.39.3",
31
- "use_cache": true,
32
- "vocab_size": 32000
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
llama2.c-stories110M-pruned50/model.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:eeefac9ec1d09c9d64dc87cc943a67c1ac2fbba888c7f7c94d12714e28e9cde3
3
- size 384641204
 
 
 
 
llama2.c-stories110M-pruned50/recipe.yaml DELETED
@@ -1,6 +0,0 @@
1
- test_stage:
2
- obcq_modifiers:
3
- SparseGPTModifier:
4
- sparsity: 0.5
5
- sequential_update: true
6
- targets: ['re:model.layers.\d*$']
 
 
 
 
 
 
 
llama2.c-stories110M-pruned50/special_tokens_map.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "bos_token": {
3
- "content": "<s>",
4
- "lstrip": false,
5
- "normalized": true,
6
- "rstrip": false,
7
- "single_word": false
8
- },
9
- "eos_token": {
10
- "content": "</s>",
11
- "lstrip": false,
12
- "normalized": true,
13
- "rstrip": false,
14
- "single_word": false
15
- },
16
- "pad_token": "</s>",
17
- "unk_token": {
18
- "content": "<unk>",
19
- "lstrip": false,
20
- "normalized": true,
21
- "rstrip": false,
22
- "single_word": false
23
- }
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
llama2.c-stories110M-pruned50/tokenizer.json DELETED
The diff for this file is too large to render. See raw diff
 
llama2.c-stories110M-pruned50/tokenizer.model DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
- size 499723
 
 
 
 
llama2.c-stories110M-pruned50/tokenizer_config.json DELETED
@@ -1,38 +0,0 @@
1
- {
2
- "added_tokens_decoder": {
3
- "0": {
4
- "content": "<unk>",
5
- "lstrip": false,
6
- "normalized": true,
7
- "rstrip": false,
8
- "single_word": false,
9
- "special": true
10
- },
11
- "1": {
12
- "content": "<s>",
13
- "lstrip": false,
14
- "normalized": true,
15
- "rstrip": false,
16
- "single_word": false,
17
- "special": true
18
- },
19
- "2": {
20
- "content": "</s>",
21
- "lstrip": false,
22
- "normalized": true,
23
- "rstrip": false,
24
- "single_word": false,
25
- "special": true
26
- }
27
- },
28
- "additional_special_tokens": [],
29
- "bos_token": "<s>",
30
- "clean_up_tokenization_spaces": false,
31
- "eos_token": "</s>",
32
- "model_max_length": 2048,
33
- "pad_token": "</s>",
34
- "sp_model_kwargs": {},
35
- "tokenizer_class": "LlamaTokenizer",
36
- "unk_token": "<unk>",
37
- "use_default_system_prompt": true
38
- }