Instructions to use QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF", filename="deepseek-coder-7b-instruct-v1.5.Q2_K.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf QuantFactory/deepseek-coder-7b-instruct-v1.5-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 QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/deepseek-coder-7b-instruct-v1.5-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 QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF with Ollama:
ollama run hf.co/QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF:Q4_K_M
- Unsloth Studio
How to use QuantFactory/deepseek-coder-7b-instruct-v1.5-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 QuantFactory/deepseek-coder-7b-instruct-v1.5-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 QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.deepseek-coder-7b-instruct-v1.5-GGUF-Q4_K_M
List all available models
lemonade list
QuantFactory/deepseek-coder-7b-instruct-v1.5-GGUF
This is quantized version of deepseek-ai/deepseek-coder-7b-instruct-v1.5 created using llama.cpp
Original Model Card
[🏠Homepage] | [🤖 Chat with DeepSeek Coder] | [Discord] | [Wechat(微信)]
1. Introduction of Deepseek-Coder-7B-Instruct v1.5
Deepseek-Coder-7B-Instruct-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, and then fine-tuned on 2B tokens of instruction data.
- Home Page: DeepSeek
- Repository: deepseek-ai/deepseek-coder
- Chat With DeepSeek Coder: DeepSeek-Coder
2. Evaluation Results
3. How to Use
Here give some examples of how to use our model.
Chat Model Inference
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/deepseek-coder-7b-instruct-v1.5", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-7b-instruct-v1.5", trust_remote_code=True).cuda()
messages=[
{ 'role': 'user', 'content': "write a quick sort algorithm in python."}
]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=512, do_sample=False, top_k=50, top_p=0.95, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id)
print(tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True))
4. License
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.
See the LICENSE-MODEL for more details.
5. Contact
If you have any questions, please raise an issue or contact us at service@deepseek.com.
- Downloads last month
- 369
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit