Upload folder using huggingface_hub
Browse files- LICENSE +0 -0
- README.md +52 -0
- config.json +100 -0
- generation_config.json +6 -0
- pytorch_model.bin +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +34 -0
LICENSE
ADDED
File without changes
|
README.md
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
license_name: deepseek-license
|
4 |
+
license_link: LICENSE
|
5 |
+
---
|
6 |
+
|
7 |
+
<p align="center">
|
8 |
+
<img width="1000px" alt="DeepSeek Coder" src="https://github.com/deepseek-ai/DeepSeek-Coder/blob/main/pictures/logo.png?raw=true">
|
9 |
+
</p>
|
10 |
+
<p align="center"><a href="https://www.deepseek.com/">[🏠Homepage]</a> | <a href="https://coder.deepseek.com/">[🤖 Chat with DeepSeek Coder]</a> | <a href="https://discord.gg/Tc7c45Zzu5">[Discord]</a> | <a href="https://github.com/guoday/assert/blob/main/QR.png?raw=true">[Wechat(微信)]</a> </p>
|
11 |
+
<hr>
|
12 |
+
|
13 |
+
[AQLM](https://arxiv.org/abs/2401.06118) quantized version of deepseek-coder-6.7b-base model.
|
14 |
+
Refer to the [official GitHub repo](https://github.com/Vahe1994/AQLM) for more information.
|
15 |
+
|
16 |
+
---
|
17 |
+
|
18 |
+
### 1. Introduction of Deepseek-Coder-7B-Base-v1.5
|
19 |
+
|
20 |
+
Deepseek-Coder-7B-Base-v1.5 is continue pre-trained from Deepseek-LLM 7B on 2T tokens by employing a window size of 4K and next token prediction objective.
|
21 |
+
|
22 |
+
- **Home Page:** [DeepSeek](https://deepseek.com/)
|
23 |
+
- **Repository:** [deepseek-ai/deepseek-coder](https://github.com/deepseek-ai/deepseek-coder)
|
24 |
+
- **Chat With DeepSeek Coder:** [DeepSeek-Coder](https://coder.deepseek.com/)
|
25 |
+
|
26 |
+
|
27 |
+
### 2. Evaluation Results
|
28 |
+
<img width="1000px" alt="DeepSeek Coder" src="https://cdn-uploads.huggingface.co/production/uploads/6538815d1bdb3c40db94fbfa/xOtCTW5xdoLCKY4FR6tri.png">
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
### 3. How to Use
|
33 |
+
Here give an example of how to use our model.
|
34 |
+
```python
|
35 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
36 |
+
import torch
|
37 |
+
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/deepseek-coder-7b-base-v1.5", trust_remote_code=True)
|
38 |
+
model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-7b-base-v1.5", trust_remote_code=True).cuda()
|
39 |
+
input_text = "#write a quick sort algorithm"
|
40 |
+
inputs = tokenizer(input_text, return_tensors="pt").cuda()
|
41 |
+
outputs = model.generate(**inputs, max_length=128)
|
42 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
43 |
+
```
|
44 |
+
|
45 |
+
### 4. License
|
46 |
+
This code repository is licensed under the MIT License. The use of DeepSeek Coder models is subject to the Model License. DeepSeek Coder supports commercial use.
|
47 |
+
|
48 |
+
See the [LICENSE-MODEL](https://github.com/deepseek-ai/deepseek-coder/blob/main/LICENSE-MODEL) for more details.
|
49 |
+
|
50 |
+
### 5. Contact
|
51 |
+
|
52 |
+
If you have any questions, please raise an issue or contact us at [[email protected]](mailto:[email protected]).
|
config.json
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"vocab_size": 102400,
|
3 |
+
"max_position_embeddings": 4096,
|
4 |
+
"hidden_size": 4096,
|
5 |
+
"intermediate_size": 11008,
|
6 |
+
"num_hidden_layers": 30,
|
7 |
+
"num_attention_heads": 32,
|
8 |
+
"num_key_value_heads": 32,
|
9 |
+
"hidden_act": "silu",
|
10 |
+
"initializer_range": 0.02,
|
11 |
+
"rms_norm_eps": 1e-06,
|
12 |
+
"pretraining_tp": 1,
|
13 |
+
"use_cache": true,
|
14 |
+
"rope_theta": 10000.0,
|
15 |
+
"rope_scaling": null,
|
16 |
+
"attention_bias": false,
|
17 |
+
"attention_dropout": 0.0,
|
18 |
+
"torch_dtype": "float16",
|
19 |
+
"tie_word_embeddings": false,
|
20 |
+
"architectures": [
|
21 |
+
"LlamaForCausalLM"
|
22 |
+
],
|
23 |
+
"bos_token_id": 100000,
|
24 |
+
"eos_token_id": 100001,
|
25 |
+
"_name_or_path": "deepseek-ai/deepseek-coder-7b-base-v1.5",
|
26 |
+
"transformers_version": "4.38.2",
|
27 |
+
"model_type": "llama",
|
28 |
+
"quantization_config": {
|
29 |
+
"quant_method": "aqlm",
|
30 |
+
"nbits_per_codebook": 16,
|
31 |
+
"num_codebooks": 1,
|
32 |
+
"out_group_size": 1,
|
33 |
+
"in_group_size": 8,
|
34 |
+
"linear_weights_not_to_quantize": [
|
35 |
+
"model.layers.0.input_layernorm.weight",
|
36 |
+
"model.layers.0.post_attention_layernorm.weight",
|
37 |
+
"model.layers.1.input_layernorm.weight",
|
38 |
+
"model.layers.1.post_attention_layernorm.weight",
|
39 |
+
"model.layers.2.input_layernorm.weight",
|
40 |
+
"model.layers.2.post_attention_layernorm.weight",
|
41 |
+
"model.layers.3.input_layernorm.weight",
|
42 |
+
"model.layers.3.post_attention_layernorm.weight",
|
43 |
+
"model.layers.4.input_layernorm.weight",
|
44 |
+
"model.layers.4.post_attention_layernorm.weight",
|
45 |
+
"model.layers.5.input_layernorm.weight",
|
46 |
+
"model.layers.5.post_attention_layernorm.weight",
|
47 |
+
"model.layers.6.input_layernorm.weight",
|
48 |
+
"model.layers.6.post_attention_layernorm.weight",
|
49 |
+
"model.layers.7.input_layernorm.weight",
|
50 |
+
"model.layers.7.post_attention_layernorm.weight",
|
51 |
+
"model.layers.8.input_layernorm.weight",
|
52 |
+
"model.layers.8.post_attention_layernorm.weight",
|
53 |
+
"model.layers.9.input_layernorm.weight",
|
54 |
+
"model.layers.9.post_attention_layernorm.weight",
|
55 |
+
"model.layers.10.input_layernorm.weight",
|
56 |
+
"model.layers.10.post_attention_layernorm.weight",
|
57 |
+
"model.layers.11.input_layernorm.weight",
|
58 |
+
"model.layers.11.post_attention_layernorm.weight",
|
59 |
+
"model.layers.12.input_layernorm.weight",
|
60 |
+
"model.layers.12.post_attention_layernorm.weight",
|
61 |
+
"model.layers.13.input_layernorm.weight",
|
62 |
+
"model.layers.13.post_attention_layernorm.weight",
|
63 |
+
"model.layers.14.input_layernorm.weight",
|
64 |
+
"model.layers.14.post_attention_layernorm.weight",
|
65 |
+
"model.layers.15.input_layernorm.weight",
|
66 |
+
"model.layers.15.post_attention_layernorm.weight",
|
67 |
+
"model.layers.16.input_layernorm.weight",
|
68 |
+
"model.layers.16.post_attention_layernorm.weight",
|
69 |
+
"model.layers.17.input_layernorm.weight",
|
70 |
+
"model.layers.17.post_attention_layernorm.weight",
|
71 |
+
"model.layers.18.input_layernorm.weight",
|
72 |
+
"model.layers.18.post_attention_layernorm.weight",
|
73 |
+
"model.layers.19.input_layernorm.weight",
|
74 |
+
"model.layers.19.post_attention_layernorm.weight",
|
75 |
+
"model.layers.20.input_layernorm.weight",
|
76 |
+
"model.layers.20.post_attention_layernorm.weight",
|
77 |
+
"model.layers.21.input_layernorm.weight",
|
78 |
+
"model.layers.21.post_attention_layernorm.weight",
|
79 |
+
"model.layers.22.input_layernorm.weight",
|
80 |
+
"model.layers.22.post_attention_layernorm.weight",
|
81 |
+
"model.layers.23.input_layernorm.weight",
|
82 |
+
"model.layers.23.post_attention_layernorm.weight",
|
83 |
+
"model.layers.24.input_layernorm.weight",
|
84 |
+
"model.layers.24.post_attention_layernorm.weight",
|
85 |
+
"model.layers.25.input_layernorm.weight",
|
86 |
+
"model.layers.25.post_attention_layernorm.weight",
|
87 |
+
"model.layers.26.input_layernorm.weight",
|
88 |
+
"model.layers.26.post_attention_layernorm.weight",
|
89 |
+
"model.layers.27.input_layernorm.weight",
|
90 |
+
"model.layers.27.post_attention_layernorm.weight",
|
91 |
+
"model.layers.28.input_layernorm.weight",
|
92 |
+
"model.layers.28.post_attention_layernorm.weight",
|
93 |
+
"model.layers.29.input_layernorm.weight",
|
94 |
+
"model.layers.29.post_attention_layernorm.weight",
|
95 |
+
"model.embed_tokens.weight",
|
96 |
+
"model.norm.weight",
|
97 |
+
"lm_head.weight"
|
98 |
+
]
|
99 |
+
}
|
100 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 100000,
|
4 |
+
"eos_token_id": 100001,
|
5 |
+
"transformers_version": "4.35.2"
|
6 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f17a472bfe01e384e377b26ca4b5b24301da7f06414398c5ae55d555ad4f589c
|
3 |
+
size 3419025758
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"bos_token": {
|
5 |
+
"__type": "AddedToken",
|
6 |
+
"content": "<|begin▁of▁sentence|>",
|
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": "<|EOT|>",
|
16 |
+
"lstrip": false,
|
17 |
+
"normalized": true,
|
18 |
+
"rstrip": false,
|
19 |
+
"single_word": false
|
20 |
+
},
|
21 |
+
"legacy": true,
|
22 |
+
"model_max_length": 4096,
|
23 |
+
"pad_token": {
|
24 |
+
"__type": "AddedToken",
|
25 |
+
"content": "<|end▁of▁sentence|>",
|
26 |
+
"lstrip": false,
|
27 |
+
"normalized": true,
|
28 |
+
"rstrip": false,
|
29 |
+
"single_word": false
|
30 |
+
},
|
31 |
+
"sp_model_kwargs": {},
|
32 |
+
"unk_token": null,
|
33 |
+
"tokenizer_class": "LlamaTokenizerFast"
|
34 |
+
}
|