Przejdź do głównej treści

Run DeepSeek-V4-Flash-0731 with Unsloth Studio and OpenCode

Run the latest DeepSeek V4 Flash model on a multi-GPU setup with Unsloth Studio, connect it to OpenCode, and use a local AI coding agent to build an interactive stock analytics website.
5 sie 2026  · 8 min Czytać

Eksploruj z AI

Otwórz w ChatGPTOtwórz w ClaudeOtwórz w Perplexity

Smaller and faster no longer automatically means less capable. According to DeepSeek’s published evaluations, DeepSeek-V4-Flash-0731 uses a much smaller activated parameter footprint than DeepSeek-V4-Pro while delivering near-frontier agentic performance: it scores 82.7 on Terminal Bench 2.1, compared with 81.0 for GLM-5.2 and 85.0 for Opus 4.8, while its 25.2 Agents’ Last Exam score is close to Opus 4.8’s 25.7. 

Because the weights are openly available, you can theoretically run the model on your own hardware when you have enough combined RAM or VRAM, keeping inference and project data under your control. 

In this guide, we will configure a three-GPU RunPod environment, install and launch Unsloth Studio, download and load the Q8 version of DeepSeek-V4-Flash-0731 across the GPUs, test the model through Studio, connect the local inference server to OpenCode, and use the coding agent to build and launch an interactive stock analytics website.

What Makes DeepSeek-V4-Flash-0731 Different?

DeepSeek-V4-Flash-0731 is the official release that replaces the earlier preview, with major improvements in coding, tool use, and autonomous agent tasks. Its Mixture-of-Experts architecture activates only part of the model for each token. This helps it remain more efficient while still delivering strong performance.

DeepSeek-V4-Flash-0731 benchmark comparison table

Source: deepseek-ai/DeepSeek-V4-Flash-0731 · Hugging Face 

DeepSeek reports that the model improved from 61.8 to 82.7 on Terminal Bench 2.1 and from 7.3 to 54.4 on DeepSWE. It also outperformed the larger DeepSeek-V4-Pro Preview on several agent benchmarks.

The model supports context windows of up to one million tokens. This makes it suitable for large codebases, long documents, and complex workflows that require substantial context. Users can also choose between low, high, and maximum reasoning effort, depending on how much time the model should spend solving a task.

DeepSeek-V4-Flash-0731 also includes DSpark speculative decoding. DSpark drafts several tokens before the main model verifies them, which DeepSeek says can improve generation speed by 60% to 85% when used with a compatible inference engine.

1. Configure the RunPod Pod

We will begin by creating a RunPod environment with enough GPU memory and storage to run the Q8 version of DeepSeek-V4-Flash-0731 and host both Unsloth Studio and the website generated by OpenCode.

Configure the Pod with:

  • 3× NVIDIA A100 SXM 80GB GPUs
  • Latest RunPod PyTorch template
  • At least 250GB of persistent volume storage
  • At least 50GB of container storage
  • /workspace as the persistent volume mount path
  • A Hugging Face access token added as HF_TOKEN
  • HTTP ports 8910 and 9101 exposed

Editing the Pytorch Runpod template

Port 8910 will be used for Unsloth Studio and its local inference API. Port 9101 will host the interactive website created by OpenCode.

RunPod exposes these services through its HTTP proxy, so both applications must listen on 0.0.0.0 rather than only 127.0.0.1

Deploying the 3x A100 GPU pod  on runpod

After deploying the Pod, open the Connect tab, launch JupyterLab, and create three terminal sessions:

Terminal 1: Unsloth Studio
Terminal 2: GPU monitoring
Terminal 3: OpenCode

Keeping the tasks in separate terminals makes it easier to monitor the GPUs, troubleshoot the model, and run the coding agent at the same time.

2. Install and Launch Unsloth Studio

Next, we will install Unsloth Studio, configure a persistent Hugging Face cache, and launch the interface on port 8910.

In Terminal 1, confirm that all three GPUs are available:

nvidia-smi

You should see all three A100 GPUs listed on the Linux server.

3x A100 GPU summary

Create a persistent Hugging Face cache inside /workspace so downloaded models remain available on the RunPod volume:

mkdir -p /workspace/huggingface
export HF_HOME=/workspace/huggingface

echo 'export HF_HOME=/workspace/huggingface' >> ~/.bashrc

Next, install the required system packages and Unsloth Studio:

cd /workspace

apt-get update
apt-get install -y curl git cmake build-essential libcurl4-openssl-dev

curl -fsSL https://unsloth.ai/install.sh | sh

Unsloth Studio Installer

The installer configures the Studio interface, Python environment, dependencies, and local inference components. 

The first installation may take several minutes.

Unsloth Studio Installer

When the installer asks whether you want to start Unsloth Studio immediately, enter “n”.

We will launch it manually so it uses port 8910 and listens on the correct network address.

Restart the shell so the new commands are available:

exec bash
cd /workspace

Before launching Studio, reset the default password:

unsloth studio reset-password

Copy the temporary password shown during setup, as you may need it to complete the reset.

Now launch Unsloth Studio:

unsloth studio \
  -H 0.0.0.0 \
  -p 8910

Starting the Unsloth Studio

Studio should now report that it is running on port 8910. Keep Terminal 1 open while using Unsloth Studio and OpenCode.

Return to the RunPod Connect page and open the HTTP Service for port 8910

Accessing the Unsloth Studio Runpod tunnel

Use the temporary password generated earlier to complete the reset, then sign in with the new password you created. 

Complete or skip the onboarding steps and open the Chat page.

Unsloth Studio Chat menu

3. Download and Run DeepSeek-V4-Flash-0731

Now that Unsloth Studio is running, we can download the Q8 model, load it across the three GPUs, and test its chat and tool-use capabilities.

Open the model selector in the top-left corner and search for unsloth/DeepSeek-V4-Flash-0731-GGUF and then select the Q8 quantization UD-Q8_K_XL.

Downloading the Q8 version of the Deepseek v4 flash model in Unsloth Studio

We are using Q8 because the three A100 GPUs provide enough combined VRAM. It preserves quality closer to the original model, while lower quantizations are more useful when hardware memory is limited.

Once the download finishes, Unsloth Studio will automatically begin loading the model into GPU memory. This can take several minutes because the Q8 model is very large.

Loading the Deepseek v4 flash model in Unsloth Studio

After loading, use the Chat page to test the model with a few simple prompts. 

In our testing, generation reached approximately 33 tokens per second without speculative decoding, which is a reasonable result for a model of this size.

Testing the Deepseek v4 flash model in Unsloth Studio

You can also enable Studio’s web-search tool and ask the model to look up current information, such as the latest gold and silver prices. This is a useful way to confirm that the model can call external tools rather than relying only on its internal knowledge.

Testing the Deepseek v4 flash model in Unsloth Studio with web tool

In Terminal 2, check how the model is distributed across the GPUs:

nvidia-smi

GPU summary of the Q8 Deepseek v4 flash model loaded in GPU memeory

You should see substantial memory usage on all three GPUs. 

In our test, each GPU was around 70% full. However, this does not necessarily mean the complete Q8 model will fit comfortably on only two 80GB GPUs, because additional VRAM is still required for the context window, KV cache, and inference buffers.

Finally, test the model with the planning prompt for the application we will build:

Create a concise architecture plan for an interactive stock analytics website 
using Next.js, financial charts, technical indicators, portfolio tracking, 
and responsive animations.

The model returns a structured development plan covering the application architecture, components, data flow, charting libraries, financial calculations, and interface design.

Testing the Deepseek v4 flash model in Unsloth Studio with complex prompt

4. Connect DeepSeek-V4-Flash-0731 to OpenCode and Build the Website

Now that the model is running in Unsloth Studio, we can connect it to OpenCode and use it as a local coding agent.

In Terminal 3, set the Studio URL:

echo 'export UNSLOTH_STUDIO_URL="http://127.0.0.1:8910"' >> ~/.bashrc
source ~/.bashrc

Create a new project directory:

mkdir -p /workspace/market-pulse
cd /workspace/market-pulse

Start OpenCode through Unsloth Studio:

unsloth start opencode

The first time you run this command, it will ask for permission to install OpenCode. Enter “y”.

Installing and starting the Opencode

Once the installation is complete, OpenCode will launch with the locally running DeepSeek-V4-Flash-0731 model already configured.

OpenCode integrated with the locally run DeepSeek v4 Flash model

Paste the following two-line prompt into OpenCode:

Build a polished, highly interactive stock analytics website using Bun, Next.js App Router, 
TypeScript, shadcn/ui, Motion, TradingView Lightweight Charts, and a free financial-data API, 
with live stock search, charts, technical indicators, gains, losses, watchlists, portfolio tracking, 
comparisons, responsive design, animations, loading states, and error handling.

Work autonomously: install everything, create every file, test and fix the complete application, 
and run the finished website on 0.0.0.0:9101.

Within a few seconds, the coding agent should create a detailed task list and begin working through the project step by step.

Building interactive stock analytics website in Opencode with Unsloth inference server

The full build took around 20 minutes in our test. While it is running, you can return to Unsloth Studio and open the API monitoring page in Settings to track model usage and generation speed.

We observed an average of approximately 22.6 tokens per second during the coding workflow. The speed may decrease as the conversation and project context grow.

Monitor dashabord of the Unsloth inference server

After completing the tasks, OpenCode should provide a summary of the files, features, and commands it created. It should also start the finished website on port 9101.

Summary of the interactive stock analytics website in Opencode

Return to the RunPod Connect page and open the HTTP Service for port 9101.

The result was surprisingly polished. The website looked clean, animated, and similar to a professional trading dashboard. The model completed the web application in a single prompt, including the interface, data views, charts, and navigation.

Testing the interactive stock analytics website created with DeepSeek-V4-Flash-0731

You can select individual stock tickers to view candlestick charts, historical performance, indicators, and additional company information.

Testing the interactive stock analytics website created with DeepSeek-V4-Flash-0731

The Compare tab also lets you compare several stocks and see which performed better over the selected period.

Testing the interactive stock analytics website created with DeepSeek-V4-Flash-0731

I was genuinely surprised that a smaller local model could build the entire website from a single prompt. 

After testing the application, every major feature worked as intended, including live stock prices, historical market data, charts, indicators, and comparison tools.

It is remarkable how quickly local models are improving and how capable they have become at completing complex, end-to-end development tasks. 

Final Thoughts

For me, DeepSeek-V4-Flash-0731 is the best local model I have tested so far. 

It performed better than Inkling, the 2-bit GLM-5.2 quantization, and Qwen3.6-27B, which had previously been my favorite. This is based on my own experience rather than a formal benchmark, but it is now my preferred local model.

For most practical workloads, I would still start with the official DeepSeek API because it is extremely affordable. 

V4 Flash currently costs $0.14 per million uncached input tokens, $0.0028 per million cached input tokens, and $0.28 per million output tokens. At that rate, one billion cached input tokens would cost around $2.80 before output charges.

Before settling on Unsloth Studio, I tried running the model through llama.cpp. The prebuilt installer did not provide a suitable recent CUDA binary for my environment, and although I compiled the latest version from source, I encountered further problems when enabling DSpark speculative decoding.

Unsloth Studio ultimately provided the simplest setup and removed most of the manual configuration. It worked well with OpenCode, although building the complete application took around 20 minutes.


Abid Ali Awan's photo
Author
Abid Ali Awan
LinkedIn
Twitter

As a certified data scientist, I am passionate about leveraging cutting-edge technology to create innovative machine learning applications. With a strong background in speech recognition, data analysis and reporting, MLOps, conversational AI, and NLP, I have honed my skills in developing intelligent systems that can make a real impact. In addition to my technical expertise, I am also a skilled communicator with a talent for distilling complex concepts into clear and concise language. As a result, I have become a sought-after blogger on data science, sharing my insights and experiences with a growing community of fellow data professionals. Currently, I am focusing on content creation and editing, working with large language models to develop powerful and engaging content that can help businesses and individuals alike make the most of their data.

Tematy

Top DataCamp Courses

Track

Inżynier AI Associate dla Data Scientistów

40 godz.
Trenuj i dostrajaj najnowsze modele AI do zastosowań produkcyjnych, w tym LLM-y takie jak Llama 3. Rozpocznij swoją drogę do zostania inżynierem AI już dziś!
Zobacz szczegółyRight Arrow
Rozpocznij Kurs
Zobacz więcejRight Arrow
Powiązany

blog

DeepSeek V4: Features, Benchmarks, and Comparisons

Discover DeepSeek V4 features, pricing, and 1M context efficiency. We compare V4 Pro and Flash benchmarks against frontier models like GPT-5.5 and Opus 4.7.
Matt Crabtree's photo

Matt Crabtree

7 min

blog

Claude Opus 4.7 vs DeepSeek V4: Which Model Should You Use?

Compare Anthropic's Claude Opus 4.7 and DeepSeek V4 on benchmarks, pricing, agentic coding, and reasoning. Find out which model fits your workflow.
Tom Farnschläder's photo

Tom Farnschläder

12 min

Tutorial

How to Run DeepSeek V4 Flash Locally

Learn how to run the full DeepSeek V4 Flash model on a single GPU using a modified llama.cpp build and a compatible GGUF file in this hands-on tutorial.
Abid Ali Awan's photo

Abid Ali Awan

Tutorial

DeepSeek V3: A Guide With Demo Project

Learn how to build an AI-powered code reviewer assistant using DeepSeek-V3 and Gradio.
Aashi Dutt's photo

Aashi Dutt

Tutorial

DeepSeek V3.2: A Guide With Demo Project

Learn about DeepSeek-V3.2-Exp, its new sparse attention mechanism, how it reduces API costs and improves long-context handling, and how to use it in your own projects.
Bex Tuychiev's photo

Bex Tuychiev

Tutorial

DeepSeek-V3.2-Speciale Tutorial: Build a Data Analyst Agent

Learn how to use DeepSeek V3.2 Speciale and Streamlit to turn any CSV into an interactive analytics assistant.
Aashi Dutt's photo

Aashi Dutt

Zobacz WięcejZobacz Więcej