A lightweight terminal-based chat interface for DeepSeek-Coder-6.7B-Instruct using llama.cpp. Supports streaming responses, multi-turn conversations, file attachments, and CPU performance benchmarking.
- Python 3.10+
- llama.cpp (built with
llama-serverandllama-bench) - DeepSeek-Coder-6.7B-Instruct GGUF model
No additional Python packages required.
Start an interactive chat:
python3 deepseek_chat.pySend a one-shot prompt:
python3 deepseek_chat.py -p "Explain binary search trees"Pipe a file into the model:
cat app.py | python3 deepseek_chat.py -p "Review this code"Run a performance benchmark:
python3 deepseek_chat.py --benchKeep the server running:
python3 deepseek_chat.py --serve-onlyWhat I did was to make it less wordy (.zshrc or bashrc):
alias ds-chat='python3 deepseek_chat.py'| Command | Description |
|---|---|
/file PATH |
Attach a file to the next message |
/system [TXT] |
View or change the system prompt |
/temp X |
Change temperature |
/max N |
Set maximum response tokens |
/reset |
Clear conversation history |
/save PATH |
Save conversation as Markdown |
/help |
Display available commands |
/exit |
Exit the application |
Command-line options allow customization of context size, CPU threads, KV cache precision, sampling parameters, and server arguments. Run:
python3 deepseek_chat.py --helpThe code has been commented using Doxygen blocks for better readability/usability.