在前文《图文教程丨DeepSeek V3、R1本地部署实战,面向新手的专业攻略丨AI 指南》https://aizhinan.cc/204 中,我使用的电脑是没有显卡和显存的低配笔记本,只有16G内存。
我的笔记本具体硬件配置:
处理器 13th Gen Intel(R)Core(TM) i5-13500H 2.60 GHz
RAM(内存) 16.0GB(15.7 GB可用)
系统类型 64位操作系统,基于x64的处理器
前文教程中下载的模型为 1.5b 版本,文件大小为 1.1GB。试用后发现,选择的模型版本过于保守了。
因此刚才又下载了DeepSeek R1 8b版本,文件大小为4.9G,也可以正常运行、使用。
文末有编程测试,可以复制代码运行,完全没有问题。
可惜现在我在外地,所使用的手机上网卡流量不多了,不能继续下载参数更大的模型测试运行上限。
关于不同参数量的模型,对本地部署硬件最低配置的要求,请参考《DeepSeek R1、V3的1.5b/7b/32b/70b和671b模型,本地部署硬件要求对应表丨AI 指南》https://aizhinan.cc/217 一文。
以下是在Ollama中下载 DeepSeek R1 8b模型,以及在Chatbox中切换模型的过程:
1,下载DeepSeek R1 8B模型:
还是在命令提示符窗口,或者终端(Windows PowerShell)窗口中执行下载/运行命令ollama run deepseek-r1:8b
,如下图所示:

简单对话测试,模型已正常运行。
2,在Chatbox中切换为DeepSeek R1 8B模型
Chatbox是AI对话客户端,关于Chatbox的下载、配置方法见《图文教程丨Chatbox官网、GitHub下载网址,配置DeepSeek的使用方法丨AI 指南》https://aizhinan.cc/212 一文。
现在需要切换DeepSeek模型为新下载的 DeepSeek R1 8B,点击左侧栏中「设置」,在「模型」选项卡中的「模型」下拉菜单中,选择「DeepSeek-r1:8b」,菜单中会显示所有安装的模型版本,如下图所示:

测试本地部署的DeepSeek R1 8B新模型的编程能力:
如下图所示,添加了一个新「搭档」,先问候一下:

再测试一下DeepSeek在本地电脑的编辑能力,输入:编写一个 p5.js 脚本,制作一个简易计算器,可以进行加减乘除运算。
DeepSeek经过大篇的思考分析,写出代码,最后进行详细的代码解释:

复制下面代码,可以在https://www.runoob.com/try/try.php?filename=tryhtml5_video_bear网址中测试,完全没有问题:
<!DOCTYPE html>
<html>
<head>
<title>Simple Calculator</title>
<script src="<https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js>"></script>
<style>
div {
font-family: Arial, sans-serif;
display: inline-block;
margin: 20px;
}
.calculator {
background-color: #f0f0f0;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
</style>
</head>
<body>
<div class="calculator">
<h2>简易计算器</h2>
<input type="text" id="input1" placeholder="请输入第一个数值...">
<select id="operator">
<option value="+">加 (+)</option>
<option value="-">减 (-)</option>
<option value="*">乘 (*)</option>
<option value="/">除 (/)</option>
</select>
<input type="text" id="input2" placeholder="请输入第二个数值...">
<button onclick="calculate()">计算</button>
<p id="result"></p>
</div>
<script>
function calculate() {
const input1 = parseFloat(document.getElementById('input1').value);
const operator = document.getElementById('operator').value;
const input2 = parseFloat(document.getElementById('input2').value);
let result;
switch (operator) {
case '+':
result = input1 + input2;
break;
case '-':
result = input1 - input2;
break;
case '*':
result = input1 * input2;
break;
case '/':
if (input2 === 0) {
alert("除数不能为零!");
return;
}
result = input1 / input2;
break;
}
document.getElementById('result').textContent = `结果: ${result}`;
}
// 初始化 p5.js 并绘制键盘
function setup() {
const canvas = createCanvas(400, 300);
background(255);
// 创建数字键盘
for (let i = 0; i < 4; i++) {
for (let j = 0; j < 3; j++) {
key = '0123456789';
if (i === 2 && j === 1) key = '.';
if (i === 3 || j === 2) continue;
rect(
i * 100 + j * 25,
i * 100 + j * 25,
25, 25,
0, 0, '白色'
);
}
}
}
// 绘制键盘并处理点击事件
function draw() {
background(255);
fill('黑色');
textAlign(CENTER, CENTER);
textSize(20);
for (let i = 0; i < 4; i++) {
for (let j = 0; j < 3; j++) {
key = '0123456789';
if (i === 2 && j === 1) key = '.';
if (i === 3 || j === 2) continue;
text(key, i * 100 + j * 25, i * 100 + j * 25);
}
}
}
// 处理键盘点击事件
function keyTyped() {
const canvas = this.p5.canvas;
const rect = canvas.getBoundingClientRect();
const x = (event.clientX - rect.left) / 100;
const y = (event.clientY - rect.top) / 100;
for (let i = 0; i < 4; i++) {
for (let j = 0; j < 3; j++) {
key = '0123456789';
if (i === 2 && j === 1) key = '.';
if (i === 3 || j === 2) continue;
const x_pos = i * 100 + j * 25;
const y_pos = i * 100 + j * 25;
if (x > x_pos - 12.5 && x < x_pos + 12.5 &&
y > y_pos - 12.5 && y < y_pos + 12.5) {
const curKey = key;
document.getElementById(curKey).click();
return;
}
}
}
}
// 初始化并绘制
function init() {
setup();
textAlign(CENTER, CENTER);
textSize(20);
// 绑定键盘点击事件
canvas.canvas.addEventListener('mousedown', keyTyped);
}
</script>
</body>
</html>
经过测试表明,我这台没有显卡、没有显存的低配笔记本,可以在本地正常运行 DeepSeek R1 8B 模型,速度也可以接受。不过,在处理一些复杂问题时,会有几秒钟的延迟。
更多相关文章:
《专题丨DeepSeek使用教程》https://aizhinan.cc/tag/deepseek-tutorial
《专题丨人工智能技术和应用案例教程》https://aizhinan.cc/ai-tutorial
《专题丨AI人工智能领域最新前沿资讯、未来发展趋势展望》https://aizhinan.cc/ai-news
禁止转载丨原文链接:https://aizhinan.cc/219