Your Name commited on
Commit
774aac0
1 Parent(s): f839184

Model upload.

Browse files
.gitattributes CHANGED
@@ -9,7 +9,6 @@
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
@@ -25,7 +24,6 @@
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
 
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
  *.msgpack filter=lfs diff=lfs merge=lfs -text
13
  *.npy filter=lfs diff=lfs merge=lfs -text
14
  *.npz filter=lfs diff=lfs merge=lfs -text
 
24
  *.safetensors filter=lfs diff=lfs merge=lfs -text
25
  saved_model/**/* filter=lfs diff=lfs merge=lfs -text
26
  *.tar.* filter=lfs diff=lfs merge=lfs -text
 
27
  *.tflite filter=lfs diff=lfs merge=lfs -text
28
  *.tgz filter=lfs diff=lfs merge=lfs -text
29
  *.wasm filter=lfs diff=lfs merge=lfs -text
4bit-32g.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c3acac392d4e3265d1730f649b12a005d5dd95a6d1eb893bfa6ed75cabc106e
3
+ size 4276179984
README.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ ---
4
+ # superhot-7b-8k-4bit-32g-safetensors
5
+
6
+ **Note: Maximum sequence length (max_seq_len) and compression factor (compress_pos_emb) need to be set to 8192 (or lower) and 4.**
7
+
8
+ Merged base LLaMA and LoRA with this:
9
+ https://github.com/tloen/alpaca-lora
10
+
11
+ Base LLaMA 7B:
12
+ https://huggingface.co/huggyllama/llama-7b
13
+
14
+ SuperHOT 7B 8k no-rlhf-test LoRA:
15
+ https://huggingface.co/kaiokendev/superhot-7b-8k-no-rlhf-test
16
+
17
+ ``` sh
18
+ BASE_MODEL=huggyllama_llama-7b LORA=kaiokendev_superhot-7b-8k-no-rlhf-test python export_hf_checkpoint.py
19
+ ```
20
+
21
+ Quantized with AutoGPTQ:
22
+ https://github.com/PanQiWei/AutoGPTQ
23
+
24
+ ``` sh
25
+ python quant_with_alpaca.py --pretrained_model_dir superhot-7b-8k-safetensors --quantized_model_dir superhot-7b-8k-no-rlhf-test-32g-GPTQ --bits 4 --group_size 32 --desc_act --num_samples 256 --save_and_reload
26
+ ```
27
+
28
+ Perplexity:
29
+ ```
30
+ CUDA_VISIBLE_DEVICES=0 python test_benchmark_inference.py \
31
+ -d /workspace/models/superhot-7b-8k-no-rlhf-test-32g-GPTQ \
32
+ -ppl \
33
+ -ppl_ds datasets/wikitext2.txt \
34
+ -l 8192 \
35
+ -cpe 4 \
36
+ -ppl_cn 40 \
37
+ -ppl_cs 8192 \
38
+ -ppl_ct 8192
39
+ -- Perplexity:
40
+ -- - Dataset: datasets/wikitext2.txt
41
+ -- - Chunks: 40
42
+ -- - Chunk size: 8192 -> 8192
43
+ -- - Chunk overlap: 0
44
+ -- - Min. chunk size: 50
45
+ -- - Key: text
46
+ -- Tokenizer: /workspace/models/superhot-7b-8k-no-rlhf-test-32g-GPTQ/tokenizer.model
47
+ -- Model config: /workspace/models/superhot-7b-8k-no-rlhf-test-32g-GPTQ/config.json
48
+ -- Model: /workspace/models/superhot-7b-8k-no-rlhf-test-32g-GPTQ/4bit-32g.safetensors
49
+ -- Sequence length: 8192
50
+ -- RoPE compression factor: 4.0
51
+ -- Tuning:
52
+ -- --matmul_recons_thd: 8
53
+ -- --fused_mlp_thd: 2
54
+ -- --sdp_thd: 8
55
+ -- Options: ['perplexity']
56
+ ** Time, Load model: 1.64 seconds
57
+ ** Time, Load tokenizer: 0.02 seconds
58
+ -- Groupsize (inferred): 32
59
+ -- Act-order (inferred): yes
60
+ ** VRAM, Model: [cuda:0] 4,131.34 MB
61
+ -- Loading dataset...
62
+ -- Testing 40 chunks....
63
+ ** Perplexity: 6.3184
64
+ ```
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "superhot-7b-8k-no-rlhf-test",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "bos_token_id": 1,
7
+ "eos_token_id": 2,
8
+ "hidden_act": "silu",
9
+ "hidden_size": 4096,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 11008,
12
+ "max_position_embeddings": 2048,
13
+ "max_sequence_length": 2048,
14
+ "model_type": "llama",
15
+ "num_attention_heads": 32,
16
+ "num_hidden_layers": 32,
17
+ "pad_token_id": 0,
18
+ "rms_norm_eps": 1e-06,
19
+ "tie_word_embeddings": false,
20
+ "torch_dtype": "float16",
21
+ "transformers_version": "4.30.2",
22
+ "use_cache": true,
23
+ "vocab_size": 32000
24
+ }
quantize_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bits": 4,
3
+ "group_size": 32,
4
+ "damp_percent": 0.01,
5
+ "desc_act": true,
6
+ "sym": true,
7
+ "true_sequential": true,
8
+ "model_name_or_path": null,
9
+ "model_file_base_name": null
10
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "unk_token": {
17
+ "content": "<unk>",
18
+ "lstrip": false,
19
+ "normalized": true,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
Binary file (500 kB). View file
 
tokenizer_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "bos_token": {
5
+ "__type": "AddedToken",
6
+ "content": "<s>",
7
+ "lstrip": false,
8
+ "normalized": true,
9
+ "rstrip": false,
10
+ "single_word": false
11
+ },
12
+ "clean_up_tokenization_spaces": false,
13
+ "eos_token": {
14
+ "__type": "AddedToken",
15
+ "content": "</s>",
16
+ "lstrip": false,
17
+ "normalized": true,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "model_max_length": 2048,
22
+ "pad_token": null,
23
+ "sp_model_kwargs": {},
24
+ "tokenizer_class": "LlamaTokenizer",
25
+ "unk_token": {
26
+ "__type": "AddedToken",
27
+ "content": "<unk>",
28
+ "lstrip": false,
29
+ "normalized": true,
30
+ "rstrip": false,
31
+ "single_word": false
32
+ }
33
+ }