Skip to content
Jien Weng
Menu
Blog

Building a DeepSeek-R1 Chatbot

I built a chatbot with DeepSeek-R1-Distill-Qwen-1.5B to experiment with a downloadable reasoning model. The interface separates its intermediate output from the final response.

Try the Hugging Face demo or read the source.

Showing the intermediate output

While testing responses, I noticed the model produced reasoning text before its answer. I decided to display it rather than discard it.

Chatbot displaying intermediate model output above the response

Asked about climate change in Malaysia, it produced a structured response but included the Andaman and Nicobar Islands and a “Ch bamboo” initiative I had never heard of. The output sounded convincing despite those mistakes.

Climate response with incorrect references to Malaysian geography

Showing the intermediate text helped me inspect the response and compare prompts. It still needed fact-checking.

Hosting the experiment

I used Gradio on a basic Hugging Face Spaces instance with 2 vCPUs and 16 GB RAM. That limits inference speed; the demo can take time to respond.

The small model made the experiment manageable. I could download it, inspect the model card, and change the interface without depending on a paid inference API.

Chatbot interface

For model details and published results, see the official model card. The Spaces documentation covers hosting.