Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- DeepSeek_V4.pdf +3 -0
- LICENSE +21 -0
- README.md +22 -0
- config.json +111 -0
- generation_config.json +9 -0
- model-00001-of-00046.safetensors +3 -0
- model-00002-of-00046.safetensors +3 -0
- model-00003-of-00046.safetensors +3 -0
- model-00004-of-00046.safetensors +3 -0
- model-00005-of-00046.safetensors +3 -0
- model-00045-of-00046.safetensors +3 -0
- model.safetensors.index.json +0 -0
- tokenizer.json +0 -0
- tokenizer_config.json +34 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* 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
|
|
|
|
|
|
| 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
|
| 36 |
+
DeepSeek_V4.pdf filter=lfs diff=lfs merge=lfs -text
|
DeepSeek_V4.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fa4a3490e2dcc03c9da61b04a8be471795e9966ebbbf292a3899fa62683a330e
|
| 3 |
+
size 4479901
|
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2023 DeepSeek
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model: deepseek-ai/DeepSeek-V4-Flash
|
| 4 |
+
tags:
|
| 5 |
+
- deepseek-v4
|
| 6 |
+
- fp8
|
| 7 |
+
- quantized
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# DeepSeek-V4-Flash-FP8
|
| 11 |
+
|
| 12 |
+
FP8 re-packaging of [`deepseek-ai/DeepSeek-V4-Flash`](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash).
|
| 13 |
+
Model architecture, tokenizer, chat template, and reference `encoding/` are
|
| 14 |
+
unchanged from the base repo. No fine-tuning, no retraining — weights only.
|
| 15 |
+
|
| 16 |
+
# Deployment
|
| 17 |
+
|
| 18 |
+
SGLang Cookbook: https://docs.sglang.io/cookbook/autoregressive/DeepSeek/DeepSeek-V4
|
| 19 |
+
|
| 20 |
+
## License
|
| 21 |
+
|
| 22 |
+
MIT — see `LICENSE`. Copyright © DeepSeek.
|
config.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"DeepseekV4ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"eos_token_id": 1,
|
| 9 |
+
"hc_eps": 1e-06,
|
| 10 |
+
"hc_mult": 4,
|
| 11 |
+
"hc_sinkhorn_iters": 20,
|
| 12 |
+
"head_dim": 512,
|
| 13 |
+
"hidden_act": "silu",
|
| 14 |
+
"hidden_size": 4096,
|
| 15 |
+
"index_head_dim": 128,
|
| 16 |
+
"index_n_heads": 64,
|
| 17 |
+
"index_topk": 512,
|
| 18 |
+
"initializer_range": 0.02,
|
| 19 |
+
"max_position_embeddings": 1048576,
|
| 20 |
+
"model_type": "deepseek_v4",
|
| 21 |
+
"moe_intermediate_size": 2048,
|
| 22 |
+
"n_routed_experts": 256,
|
| 23 |
+
"n_shared_experts": 1,
|
| 24 |
+
"norm_topk_prob": true,
|
| 25 |
+
"num_attention_heads": 64,
|
| 26 |
+
"num_experts_per_tok": 6,
|
| 27 |
+
"num_hidden_layers": 4,
|
| 28 |
+
"num_hash_layers": 3,
|
| 29 |
+
"num_key_value_heads": 1,
|
| 30 |
+
"num_nextn_predict_layers": 1,
|
| 31 |
+
"o_groups": 8,
|
| 32 |
+
"o_lora_rank": 1024,
|
| 33 |
+
"q_lora_rank": 1024,
|
| 34 |
+
"qk_rope_head_dim": 64,
|
| 35 |
+
"quantization_config": {
|
| 36 |
+
"activation_scheme": "dynamic",
|
| 37 |
+
"fmt": "e4m3",
|
| 38 |
+
"quant_method": "fp8",
|
| 39 |
+
"scale_fmt": "ue8m0",
|
| 40 |
+
"weight_block_size": [
|
| 41 |
+
128,
|
| 42 |
+
128
|
| 43 |
+
]
|
| 44 |
+
},
|
| 45 |
+
"rms_norm_eps": 1e-06,
|
| 46 |
+
"rope_scaling": {
|
| 47 |
+
"beta_fast": 32,
|
| 48 |
+
"beta_slow": 1,
|
| 49 |
+
"factor": 16,
|
| 50 |
+
"original_max_position_embeddings": 65536,
|
| 51 |
+
"type": "yarn"
|
| 52 |
+
},
|
| 53 |
+
"rope_theta": 10000,
|
| 54 |
+
"routed_scaling_factor": 1.5,
|
| 55 |
+
"scoring_func": "sqrtsoftplus",
|
| 56 |
+
"sliding_window": 128,
|
| 57 |
+
"swiglu_limit": 10.0,
|
| 58 |
+
"tie_word_embeddings": false,
|
| 59 |
+
"topk_method": "noaux_tc",
|
| 60 |
+
"torch_dtype": "bfloat16",
|
| 61 |
+
"transformers_version": "4.57.1",
|
| 62 |
+
"use_cache": true,
|
| 63 |
+
"vocab_size": 129280,
|
| 64 |
+
"compress_rope_theta": 160000,
|
| 65 |
+
"compress_ratios": [
|
| 66 |
+
0,
|
| 67 |
+
0,
|
| 68 |
+
4,
|
| 69 |
+
128,
|
| 70 |
+
4,
|
| 71 |
+
128,
|
| 72 |
+
4,
|
| 73 |
+
128,
|
| 74 |
+
4,
|
| 75 |
+
128,
|
| 76 |
+
4,
|
| 77 |
+
128,
|
| 78 |
+
4,
|
| 79 |
+
128,
|
| 80 |
+
4,
|
| 81 |
+
128,
|
| 82 |
+
4,
|
| 83 |
+
128,
|
| 84 |
+
4,
|
| 85 |
+
128,
|
| 86 |
+
4,
|
| 87 |
+
128,
|
| 88 |
+
4,
|
| 89 |
+
128,
|
| 90 |
+
4,
|
| 91 |
+
128,
|
| 92 |
+
4,
|
| 93 |
+
128,
|
| 94 |
+
4,
|
| 95 |
+
128,
|
| 96 |
+
4,
|
| 97 |
+
128,
|
| 98 |
+
4,
|
| 99 |
+
128,
|
| 100 |
+
4,
|
| 101 |
+
128,
|
| 102 |
+
4,
|
| 103 |
+
128,
|
| 104 |
+
4,
|
| 105 |
+
128,
|
| 106 |
+
4,
|
| 107 |
+
128,
|
| 108 |
+
4,
|
| 109 |
+
0
|
| 110 |
+
]
|
| 111 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"eos_token_id": 1,
|
| 5 |
+
"do_sample": true,
|
| 6 |
+
"temperature": 1.0,
|
| 7 |
+
"top_p": 1.0,
|
| 8 |
+
"transformers_version": "4.46.3"
|
| 9 |
+
}
|
model-00001-of-00046.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5176586613905d4beaadbaea1cfecd1693e17f9da4a0ea09d99aab7d3f2f5b7c
|
| 3 |
+
size 1059061856
|
model-00002-of-00046.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:85f62f82b65a51d381aa0b6061052589e97f53ad2af9ed6103e5466dfcfb7921
|
| 3 |
+
size 6621359672
|
model-00003-of-00046.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9af616661384572d137935ea244d2734d2ef6f1c35bf41cf051a7572fe8cf277
|
| 3 |
+
size 6621359672
|
model-00004-of-00046.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5656151b4bbc29598636e839474180f013c50e3407324ffc5262c637752706d9
|
| 3 |
+
size 6651269104
|
model-00005-of-00046.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dcdd3027187cb8c7850a09e565f114fb13438ab024cc1bf37c7f6efdc177cf85
|
| 3 |
+
size 6623806712
|
model-00045-of-00046.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a0fd242134e9ebe4e6993a7631692944838e4fdf20067b3219caa48eab68045
|
| 3 |
+
size 1059332516
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
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": false,
|
| 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": "<|end▁of▁sentence|>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": true,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false
|
| 20 |
+
},
|
| 21 |
+
"legacy": true,
|
| 22 |
+
"model_max_length": 1048576,
|
| 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": "PreTrainedTokenizerFast"
|
| 34 |
+
}
|