How to use from
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 duyntnet/deepseek-coder-6.7b-instruct-imatrix-GGUF:
# Run inference directly in the terminal:
llama cli -hf duyntnet/deepseek-coder-6.7b-instruct-imatrix-GGUF:
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf duyntnet/deepseek-coder-6.7b-instruct-imatrix-GGUF:
# Run inference directly in the terminal:
llama cli -hf duyntnet/deepseek-coder-6.7b-instruct-imatrix-GGUF:
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 duyntnet/deepseek-coder-6.7b-instruct-imatrix-GGUF:
# Run inference directly in the terminal:
./llama-cli -hf duyntnet/deepseek-coder-6.7b-instruct-imatrix-GGUF:
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 duyntnet/deepseek-coder-6.7b-instruct-imatrix-GGUF:
# Run inference directly in the terminal:
./build/bin/llama-cli -hf duyntnet/deepseek-coder-6.7b-instruct-imatrix-GGUF:
Use Docker
docker model run hf.co/duyntnet/deepseek-coder-6.7b-instruct-imatrix-GGUF:
Quick Links

Quantizations of https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-instruct

From original readme

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-6.7b-instruct", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-6.7b-instruct", trust_remote_code=True, torch_dtype=torch.bfloat16).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)
# tokenizer.eos_token_id is the id of <|EOT|> token
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))
Downloads last month
1,134
GGUF
Model size
7B params
Architecture
llama
Hardware compatibility
Log In to add your hardware

1-bit

2-bit

3-bit

4-bit

5-bit

6-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support