Instructions to use second-state/DeepSeek-Coder-V2-Instruct-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use second-state/DeepSeek-Coder-V2-Instruct-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="second-state/DeepSeek-Coder-V2-Instruct-GGUF", filename="DeepSeek-Coder-V2-Instruct-Q2_K-00001-of-00003.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use second-state/DeepSeek-Coder-V2-Instruct-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf second-state/DeepSeek-Coder-V2-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf second-state/DeepSeek-Coder-V2-Instruct-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf second-state/DeepSeek-Coder-V2-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf second-state/DeepSeek-Coder-V2-Instruct-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf second-state/DeepSeek-Coder-V2-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf second-state/DeepSeek-Coder-V2-Instruct-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf second-state/DeepSeek-Coder-V2-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf second-state/DeepSeek-Coder-V2-Instruct-GGUF:Q4_K_M
Use Docker
docker model run hf.co/second-state/DeepSeek-Coder-V2-Instruct-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use second-state/DeepSeek-Coder-V2-Instruct-GGUF with Ollama:
ollama run hf.co/second-state/DeepSeek-Coder-V2-Instruct-GGUF:Q4_K_M
- Unsloth Studio new
How to use second-state/DeepSeek-Coder-V2-Instruct-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for second-state/DeepSeek-Coder-V2-Instruct-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for second-state/DeepSeek-Coder-V2-Instruct-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for second-state/DeepSeek-Coder-V2-Instruct-GGUF to start chatting
- Docker Model Runner
How to use second-state/DeepSeek-Coder-V2-Instruct-GGUF with Docker Model Runner:
docker model run hf.co/second-state/DeepSeek-Coder-V2-Instruct-GGUF:Q4_K_M
- Lemonade
How to use second-state/DeepSeek-Coder-V2-Instruct-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull second-state/DeepSeek-Coder-V2-Instruct-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.DeepSeek-Coder-V2-Instruct-GGUF-Q4_K_M
List all available models
lemonade list
Upload config.json with huggingface_hub
Browse files- config.json +60 -0
config.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"DeepseekV2ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"auto_map": {
|
| 8 |
+
"AutoConfig": "configuration_deepseek.DeepseekV2Config",
|
| 9 |
+
"AutoModel": "modeling_deepseek.DeepseekV2Model",
|
| 10 |
+
"AutoModelForCausalLM": "modeling_deepseek.DeepseekV2ForCausalLM"
|
| 11 |
+
},
|
| 12 |
+
"aux_loss_alpha": 0.001,
|
| 13 |
+
"bos_token_id": 100000,
|
| 14 |
+
"eos_token_id": 100001,
|
| 15 |
+
"ep_size": 1,
|
| 16 |
+
"first_k_dense_replace": 1,
|
| 17 |
+
"hidden_act": "silu",
|
| 18 |
+
"hidden_size": 5120,
|
| 19 |
+
"initializer_range": 0.02,
|
| 20 |
+
"intermediate_size": 12288,
|
| 21 |
+
"kv_lora_rank": 512,
|
| 22 |
+
"max_position_embeddings": 163840,
|
| 23 |
+
"model_type": "deepseek_v2",
|
| 24 |
+
"moe_intermediate_size": 1536,
|
| 25 |
+
"moe_layer_freq": 1,
|
| 26 |
+
"n_group": 8,
|
| 27 |
+
"n_routed_experts": 160,
|
| 28 |
+
"n_shared_experts": 2,
|
| 29 |
+
"norm_topk_prob": false,
|
| 30 |
+
"num_attention_heads": 128,
|
| 31 |
+
"num_experts_per_tok": 6,
|
| 32 |
+
"num_hidden_layers": 60,
|
| 33 |
+
"num_key_value_heads": 128,
|
| 34 |
+
"pretraining_tp": 1,
|
| 35 |
+
"q_lora_rank": 1536,
|
| 36 |
+
"qk_nope_head_dim": 128,
|
| 37 |
+
"qk_rope_head_dim": 64,
|
| 38 |
+
"rms_norm_eps": 1e-06,
|
| 39 |
+
"rope_scaling": {
|
| 40 |
+
"beta_fast": 32,
|
| 41 |
+
"beta_slow": 1,
|
| 42 |
+
"factor": 40,
|
| 43 |
+
"mscale": 1.0,
|
| 44 |
+
"mscale_all_dim": 1.0,
|
| 45 |
+
"original_max_position_embeddings": 4096,
|
| 46 |
+
"type": "yarn"
|
| 47 |
+
},
|
| 48 |
+
"rope_theta": 10000,
|
| 49 |
+
"routed_scaling_factor": 16.0,
|
| 50 |
+
"scoring_func": "softmax",
|
| 51 |
+
"seq_aux": true,
|
| 52 |
+
"tie_word_embeddings": false,
|
| 53 |
+
"topk_group": 3,
|
| 54 |
+
"topk_method": "group_limited_greedy",
|
| 55 |
+
"torch_dtype": "bfloat16",
|
| 56 |
+
"transformers_version": "4.39.3",
|
| 57 |
+
"use_cache": true,
|
| 58 |
+
"v_head_dim": 128,
|
| 59 |
+
"vocab_size": 102400
|
| 60 |
+
}
|