<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>大模型微调 &#8211; mylogs.cn</title>
	<atom:link href="https://mylogs.cn/tag/%e5%a4%a7%e6%a8%a1%e5%9e%8b%e5%be%ae%e8%b0%83/feed/" rel="self" type="application/rss+xml" />
	<link>https://mylogs.cn</link>
	<description>发现、记录、分享</description>
	<lastBuildDate>Tue, 04 Aug 2026 15:55:22 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>4GB 显卡微调 8B 模型，只要一行命令</title>
		<link>https://mylogs.cn/soup-finetune-8b-llm-on-4gb-laptop-gpu/</link>
					<comments>https://mylogs.cn/soup-finetune-8b-llm-on-4gb-laptop-gpu/#respond</comments>
		
		<dc:creator><![CDATA[steve, zhang]]></dc:creator>
		<pubDate>Tue, 04 Aug 2026 15:55:07 +0000</pubDate>
				<category><![CDATA[科技]]></category>
		<category><![CDATA[AI工具]]></category>
		<category><![CDATA[LoRA]]></category>
		<category><![CDATA[大模型微调]]></category>
		<category><![CDATA[开源项目]]></category>
		<category><![CDATA[显存优化]]></category>
		<category><![CDATA[本地部署]]></category>
		<guid isPermaLink="false">https://mylogs.cn/soup-finetune-8b-llm-on-4gb-laptop-gpu/</guid>

					<description><![CDATA[你要是因为显卡只有 4GB 就放弃了本地微调大模型，这个开源项目值得看一眼。 它叫 Soup，最近登上 Hac [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">你要是因为显卡只有 4GB 就放弃了本地微调大模型，这个开源项目值得看一眼。</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6a7276076a5b6&quot;}" data-wp-interactive="core/image" data-wp-key="6a7276076a5b6" class="wp-block-image size-large aligncenter wp-lightbox-container"><img fetchpriority="high" decoding="async" width="1200" height="600" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://mylogs.cn/wp-content/uploads/2026/08/soup_header.webp" alt="4GB 显卡微调 8B 模型，只要一行命令" class="wp-image-3555" style="max-width:100%;height:auto;" srcset="https://mylogs.cn/wp-content/uploads/2026/08/soup_header.webp 1200w, https://mylogs.cn/wp-content/uploads/2026/08/soup_header-300x150.webp 300w, https://mylogs.cn/wp-content/uploads/2026/08/soup_header-1024x512.webp 1024w, https://mylogs.cn/wp-content/uploads/2026/08/soup_header-768x384.webp 768w" sizes="(max-width: 1200px) 100vw, 1200px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">图片来源：GitHub / Soup 项目页</figcaption></figure>





<p class="wp-block-paragraph">它叫 Soup，最近登上 Hacker News 首页，标题很直白：在 4GB 笔记本显卡上微调 80 亿参数模型。项目采用 Apache-2.0 开源协议，目前在 GitHub 上有 147 颗星、23 个分支，累计 605 次提交。</p>



<h2 class="wp-block-heading">一个配置文件，一条命令</h2>



<p class="wp-block-paragraph">Soup 想解决的是老问题。项目自述里写道，即便是有经验的团队，也要把 30% 到 50% 的时间花在跟基础设施较劲上，而不是改进模型。它的做法是把整套流程压成一个配置文件加一条命令：安装 `pip install &#8220;soup-cli[train]&#8221;`，然后 `soup init &#8211;template chat` 生成配置、`soup train` 开跑。批大小、显卡识别、量化全部自动处理，不需要远程登录服务器，也不需要云端资源。</p>



<p class="wp-block-paragraph">真正让它能在 4GB 显卡上跑起来的是「层流式加载」：冻结的基座模型不常驻显存，而是按解码层逐层喂给显卡，配合 4bit NF4 量化把模型体积压到约四分之一，80 亿参数模型就能塞进 4GB 显卡。</p>



<h2 class="wp-block-heading">新版本把偏好训练也拉了进来</h2>



<p class="wp-block-paragraph">最新的 v0.72.4 版本把这套机制扩展到了偏好对齐训练——也就是让模型学会「这个回答比那个好」的调优阶段。以往层流式加载只支持监督微调，现在直接偏好优化（DPO）以及 ORPO、SimPO、KTO 三种方法也能跑。</p>



<p class="wp-block-paragraph">其中 DPO 需要一个参考模型做对照，常规做法要再加载一份权重、内存直接翻倍，那样省显存的意义就没了。Soup 的处理是复用同一份流式基座、把适配器关掉，等于一份权重、一条数据流。在 RTX 3050 4GB 显卡上实测，流式 DPO 的显存峰值是监督微调峰值的 0.914 倍；而强行加载真正的第二份模型，同样测试下多吃 730MB，正好是一份权重的大小。</p>



<h2 class="wp-block-heading">难得的是把代价也写清楚了</h2>



<p class="wp-block-paragraph">这个项目最值得留意的地方，不是省显存，而是它把账算给你看。文档明确写出：参考模型省的是内存不是时间，DPO 每步读取层栈的次数是监督微调的 1.52 倍；GRPO 和 PPO 两种强化学习方法被有意排除在外，因为生成阶段每输出一个词都要重读所有层，流式加载省不出来。作者还标注训练结果与非流式版本逐位一致（差异为 0），并说明整个项目是在一台 4GB 笔记本上开发维护的，因此多显卡、更大模型和苹果芯片的支持都还没验证，相关功能都挂着明确的前置条件说明。该特性目前仍标注为测试版。</p>



<p class="wp-block-paragraph">官方给出的显存对照是：8GB 约能带 70 亿参数、16GB 约 140 亿、24GB 约 340 亿、48GB 约 700 亿。项目内置 100 多个现成配方，覆盖通义千问、Llama 3、Gemma 3、Mistral、DeepSeek R1/V3、Phi-4 等模型，模板涵盖对话、代码、工具调用、推理、视觉、长上下文等场景。</p>



<p class="wp-block-paragraph">我的判断是，这类工具的价值在于把「能不能跑」变成「值不值得跑」。手上这块小显卡，你打算拿它微调点什么？</p>



<p class="has-small-font-size wp-block-paragraph">来源：GitHub / Soup 项目页，Hacker News</p>

]]></content:encoded>
					
					<wfw:commentRss>https://mylogs.cn/soup-finetune-8b-llm-on-4gb-laptop-gpu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
