# Automating LLM Fine-Tuning with Fireworks Agent
**作者**: elvis
**日期**: 2026-05-20T15:02:48.000Z
**来源**: [https://x.com/omarsar0/status/2057114824467792189](https://x.com/omarsar0/status/2057114824467792189)
---

## From Context Window to Weights
Andrej Karpathy (@karpathy) recently described the personal LLM Wiki as a kind of pre-AGI memory aid, a curated repo of notes about papers, tools, and ideas you read into context when you want a model to reason over them.

In his viral post, Karpathy flagged the obvious next move: "As the repo grows, the natural desire is to also think about synthetic data generation + finetuning to have your LLM 'know' the data in its weights instead of just context windows."
Building LLM Knowledge Bases or LLM Wikis is already possible with agents like Claude Code or Codex, but this approach can quickly get inefficient and expensive as you try to scale them. Fine-tuning LLMs to maintain your knowledge bases is often a more efficient path forward.
This post takes that next step by putting the wiki's output style into the weights. In under ten minutes of GPU time and a couple of cents of compute, a small open-weight model writes summaries of new papers in the exact format the wiki uses, with no system-prompt gymnastics, no few-shot exemplars, and no router logic. Once deployed, the summary comes back in a single fast call, fast enough to use inline inside a larger agent loop rather than as a batch job. The harder version (parametric knowledge injection of the wiki's contents) is the natural follow-up to Karpathy's framing, and I treat it as future work at the end.
The interesting part is not the model itself, but that one @FireworksAI_HQ Agent session did the entire pipeline (dataset inspection, hyperparameter sweep, full training, deployment, and a working inference endpoint). Fireworks Agent is the autonomous orchestration layer for fine-tuning runs, where you give it a natural-language goal, and it plans, executes, and surfaces decision gates back to you. The whole flow can be driven from a coding agent you already use (Claude Code, Codex, or similar), which is how I ran it.
The bigger picture this points to is self-improving LLMs and agents. Once training is a callable step inside an agent loop, the same coding agent that drives your workflow can also kick off fine-tuning runs to bake recurring patterns (a wiki's voice, a coding style, a triage policy) into the model itself, closing the loop between using a model and improving it.
The rest of this post is the full walkthrough.

All resources from this run are available in a companion repo, including the training and validation splits (train.jsonl, val.jsonl, wiki-sft-2026.jsonl), the data-build scripts (parse_2026.py, fetch_abstracts.py, build_jsonl.py), the pilot-agent.md slash command, the smoke-test script (test_new_deployment.py), and the baseline-vs-fine-tuned comparison code (before_after.py). Grab it at github.com/dair-ai/wiki-sft, clone it, point it at your own corpus, and reproduce the run end to end.
## Why Output Style Is the Right First SFT Target
For a personal wiki, the high-leverage thing is consistency. Readers recognize a summary by its shape, which is a one-paragraph lede that names the authors' affiliation and the core contribution, followed by three to five bulleted takeaways with bolded short labels. A capable base model can be coaxed into this format with a careful system prompt, but the failure modes are familiar. It reverts to title-case headers, drops the affiliation line, varies bullet count, and sneaks in marketing language.
Supervised fine-tuning (SFT) fixes this at the parameter level. Once the format is in the weights, every generation conforms by default, and the system prompt collapses to a single sentence (or drops out entirely). The cost stays small when the dataset stays small, and a clean stylistic dataset of 50 to 100 examples is usually enough to get started.
## Handing the Work to an Agent
Most fine-tuning tutorials walk you through ten distinct steps. You format your data, upload it, choose a base model, decide on LoRA rank and learning rate, launch a job, parse logs, pick a winner, retrain on full data, deploy, and smoke test. Each step is its own surface to mess up, and you end up playing the role of a tuning agent yourself.
Fireworks Agent inverts this. The interface is firectl session create -n "<your instruction>", where firectl is the Fireworks CLI. After that, you watch events stream and respond to gates when the agent surfaces a decision, such as the proposed plan or the hyperparameter (HP) sweep results.
Fireworks also ships a Claude Code slash command (or you can format it as an agent skill), pilot-agent.md (previously known as Pilot Agent), that wraps the firectl commands and handles event streaming, gate detection, and resume-from-last-timestamp logic.
## Full Walkthrough
Step 0: Setup
Install the Fireworks CLI and confirm your account.
```
brew install fw-ai/firectl/firectl
firectl signin
firectl account get
```

In the Fireworks dashboard, create a service account that has the permissions Training Agent needs (the role that lets it launch training jobs and deployments on your behalf), then generate an API key tied to that service account. Also, create a separate user-level API key for inference and deployment inspection. Drop both into a .env file next to the project.
```
PI_API_KEY=<service-account key for Training Agent>
FIREWORKS_API_KEY=<user-level key>
```
Step 1: Build the Dataset
The training data I use consists of chat-format records derived from the DAIR.AI Top AI Papers of the Week wiki, drawn from the top 5 papers per week in 2026 and paired with their arXiv abstracts. Three small Python scripts handle the pipeline, namely parse_2026.py (wiki to structured entries), fetch_abstracts.py (arXiv abstract lookup), and build_jsonl.py (chat-format assembly). The chat schema is the standard Fireworks shape:
```
{
"messages": [
{"role": "system", "content": "You write concise, structured summaries of AI research papers in the style of DAIR.AI's Top AI Papers of the Week. Open with a one-paragraph lede that names the authors' affiliation and the core contribution, then follow with three to five bulleted takeaways. Each bullet begins with a bolded short label, a colon, then a crisp explanation. Keep the tone analytical, specific, and free of hype."},
{"role": "user", "content": "Paper: <title>\n\nAbstract:\n<abstract>\n\nWrite a Top AI Papers of the Week style summary."},
{"role": "assistant", "content": "<cleaned wiki summary>"}
]
}
```
The final outputs are train.jsonl and val.jsonl (plus the combined wiki-sft-2026.jsonl for reference), with about 90 percent of records reserved for training and 10 percent for validation.
Step 2: Upload the Dataset to Fireworks
```
source .env && firectl dataset create wiki-sft-2026 \
--display-name "Wiki SFT 2026 (top 5 papers/week)" \
train.jsonl \
--api-key $FIREWORKS_API_KEY
```
Confirm the dataset is `READY`:
```
firectl dataset list --api-key $FIREWORKS_API_KEY
```
The dataset path you will pass to the Fireworks Agent looks like accounts/<your-account>/datasets/wiki-sft-2026.
Step 3: Kick Off the Fireworks Agent
This is the entire user-facing config for the run, just one instruction.
```
source .env && firectl session create \
--api-key $PI_API_KEY \
-n "Run end-to-end supervised fine-tuning on qwen3-8b using dataset accounts/<your-account>/datasets/wiki-sft-2026 and deploy the trained model to a working inference endpoint that I can call via the Fireworks chat completions API. Use validation loss for evaluation. The full flow including deployment must complete automatically."
```
The session returns an ID like 1777224532-7ddb. Stream the events:
```
firectl session events <session-id> --api-key $PI_API_KEY --wait
```
The --wait flag is important; without it, the command dumps existing events and exits. The Claude Code slash command handles this for you.
Step 4: Approve the Plan and Promote the Winner
The agent surfaces two gates. The first is a plan with a cost estimate and three HP configs to sweep in parallel, with validation loss as the evaluator, which you approve to resume streaming.

```
firectl session update <session-id> --api-key $PI_API_KEY -n "Approved, proceed."
```
The HP sweep then runs three SFT jobs in parallel and returns a ranked table, after which the agent surfaces a second gate with the winning config. In my run, the top three configs landed very close to each other on eval loss, which tells you the task is not particularly HP-sensitive at this dataset size, so approving full training is the obvious next step.
```
firectl session update <session-id> --api-key $PI_API_KEY -n "yes, proceed with 5-epoch full training on the winning config, then deploy and smoke test as planned"
```
Full training takes about eight minutes of GPU time and costs a few cents.

Step 5: Verify the Deployment
Deployment is where ad-hoc fine-tuning workflows usually go sideways, picking the wrong accelerator, missing a compatible shape, or stalling on capacity. The agent handles the recovery itself, so the session lands at status succeeded with a READY scale-to-zero deployment. Confirm the deployment with the following command:
```
firectl deployment get <deployment-name> --api-key $FIREWORKS_API_KEY
```
Step 6: Call the Model
Inference uses the standard Fireworks chat completions endpoint, with a deployment-pinned model ID so requests route to your custom deployment:
```
import os, json, urllib.request
API_KEY = os.environ["FIREWORKS_API_KEY"]
MODEL = "accounts/<your-account>/models/<your-trained-model>"
DEPLOYMENT = "accounts/<your-account>/deployments/<your-deployment>"
PINNED = f"{MODEL}#{DEPLOYMENT}"
SYSTEM = (
"You write concise, structured summaries of AI research papers in the "
"style of DAIR.AI's Top AI Papers of the Week. Open with a one-paragraph "
"lede that names the authors' affiliation and the core contribution, then "
"follow with three to five bulleted takeaways. Each bullet begins with a "
"bolded short label, a colon, then a crisp explanation. Keep the tone "
"analytical, specific, and free of hype."
)
def call(messages):
body = json.dumps({
"model": PINNED, "messages": messages,
"temperature": 0.0, "max_tokens": 2500,
}).encode()
req = urllib.request.Request(
"https://api.fireworks.ai/inference/v1/chat/completions",
data=body,
headers={"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"},
method="POST",
)
with urllib.request.urlopen(req, timeout=300) as resp:
return json.loads(resp.read())["choices"][0]["message"]["content"]
abstract = "..." # any new paper abstract
out = call([
{"role": "system", "content": SYSTEM},
{"role": "user", "content": f"Paper: <title>\n\nAbstract:\n{abstract}\n\nWrite a Top AI Papers of the Week style summary."},
])
print(out)
```
Once warm, calls return fast enough to use as an inline step inside an agent rather than a batch job.
## Why This Workflow Pays Off
I tested the fine-tuned model on a few papers that sit outside the training set, sending the same system prompt and abstract to both the baseline qwen3-8b and the fine-tuned model. The fine-tuned model produces affiliation-led ledes that name the researchers' lab, followed by three to five bullets with bolded short-label prefixes (Method:, Performance Gains:, Scalability:), and an analytical, non-promotional tone. For instance, on Chain-of-Thought, it opened with "Researchers at Stanford University demonstrate that chain-of-thought prompting significantly enhances large language models' reasoning capabilities..." That is the wiki's voice, baked into the weights and produced in a single fast call.
The practical payoff is that you no longer need a large, inefficient LLM or agent to write the summaries for your LLM Wiki. A smaller fine-tuned model can do it effectively, efficiently, and cheaply. Getting the style and tone right matters for this use case, and no amount of tuning a skill or system prompt can replace what a properly fine-tuned LLM gives you.
Two more things make this useful beyond a one-off experiment. First, training becomes a tool, not a project, with one CLI command, cents of compute, and a real callable endpoint at the end, while the agent handles the boring failure modes. Second, you own the resulting model. The weights live in your account, deployed on infrastructure you control, and the idle cost is zero. At this price and friction, reaching for SFT becomes a reasonable answer to a much wider set of style and format problems.
## What's Next, Knowledge in the Weights
I intentionally stopped at style transfer because it is the cleanest first SFT target on a small dataset. The harder version Karpathy described (your wiki's contents in the weights) is the natural follow-up, with synthetic data generation, more training records, and knowledge-recall evaluators in the loop.
The pattern generalizes beyond a personal papers wiki. Any structured knowledge surface (an internal docs wiki, a product manual, a research vault) is a candidate for the same two-step recipe, where you SFT on style first and layer knowledge injection on top. A model that has internalized both the voice and the substance of a corpus is what makes a personalized agent on top of it genuinely useful.
Fireworks Agent is currently in private preview and will be generally available soon. If you are thinking about applying this workflow to your own corpus and want to request access or talk it through with the Fireworks team, reach out at fireworks.ai/contact-training.
## 相关链接
- [elvis](https://x.com/omarsar0)
- [@omarsar0](https://x.com/omarsar0)
- [23K](https://x.com/omarsar0/status/2057114824467792189/analytics)
- [@karpathy](https://x.com/@karpathy)
- [post](https://x.com/karpathy/status/2039805659525644595?s=20)
- [@FireworksAI_HQ](https://x.com/@FireworksAI_HQ)
- [Fireworks Agent](https://docs.fireworks.ai/fine-tuning/agent/introduction)
- [train.jsonl](https://github.com/dair-ai/wiki-sft/blob/main/train.jsonl)
- [val.jsonl](https://github.com/dair-ai/wiki-sft/blob/main/val.jsonl)
- [wiki-sft-2026.jsonl](https://github.com/dair-ai/wiki-sft/blob/main/wiki-sft-2026.jsonl)
- [parse_2026.py](https://github.com/dair-ai/wiki-sft/blob/main/parse_2026.py)
- [fetch_abstracts.py](https://github.com/dair-ai/wiki-sft/blob/main/fetch_abstracts.py)
- [build_jsonl.py](https://github.com/dair-ai/wiki-sft/blob/main/build_jsonl.py)
- [pilot-agent.md](https://github.com/dair-ai/wiki-sft/blob/main/pilot-agent.md)
- [test_new_deployment.py](https://github.com/dair-ai/wiki-sft/blob/main/test_new_deployment.py)
- [before_after.py](https://github.com/dair-ai/wiki-sft/blob/main/before_after.py)
- [github.com/dair-ai/wiki-sft](https://github.com/dair-ai/wiki-sft)
- [DAIR.AI Top AI Papers of the Week](https://github.com/dair-ai/AI-Papers-of-the-Week)
- [fireworks.ai/contact-training](https://fireworks.ai/contact-training)
- [Upgrade to Premium](https://x.com/i/premium_sign_up)
- [11:02 PM · May 20, 2026](https://x.com/omarsar0/status/2057114824467792189)
- [23.1K Views](https://x.com/omarsar0/status/2057114824467792189/analytics)
---
*导出时间: 2026/5/21 16:12:49*
---
## 中文翻译
# 使用 Fireworks Agent 自动化 LLM 微调
**作者**: elvis
**日期**: 2026-05-20T15:02:48.000Z
**来源**: [https://x.com/omarsar0/status/2057114824467792189](https://x.com/omarsar0/status/2057114824467792189)
---

## 从上下文窗口到权重
Andrej Karpathy (@karpathy) 最近将个人 LLM Wiki 描述为一种前 AGI 时代的记忆辅助工具,这是一个精心策划的笔记仓库,包含了关于论文、工具和想法的笔记,当你希望模型对其进行推理时,可以将这些笔记读入上下文中。

在他那条疯传的帖子中,Karpathy 指出了显而易见的下一步:“随着仓库的增长,自然而然会想到通过合成数据生成 + 微调,让你的 LLM 在其权重‘知道’这些数据,而不仅仅是在上下文窗口中。”
使用像 Claude Code 或 Codex 这样的代理来构建 LLM 知识库或 LLM Wiki 已经成为可能,但当你试图扩大规模时,这种方法很快就会变得低效且昂贵。微调 LLM 以维护你的知识库通常是更高效的前进道路。
这篇文章迈出了那一步,将 Wiki 的输出风格植入到了模型权重中。在不到十分钟的 GPU 时间和仅需几美分的计算成本下,一个小型开源权重模型就能以 Wiki 使用的确切格式撰写新论文的摘要,无需繁琐的系统提示词调整,无需少样本示例,也不需要路由逻辑。一旦部署,摘要会在一次快速调用中返回,速度快到可以直接在更大的代理循环中内联使用,而不是作为批处理任务。更困难的版本(Wiki 内容的参数化知识注入)是 Karpathy 设想的自然延续,我将其作为文末的未来工作。
有趣的部分不是模型本身,而是通过一个 @FireworksAI_HQ Agent 会话完成了整个流程(数据集检查、超参数扫描、完整训练、部署和可用的推理端点)。Fireworks Agent 是用于微调运行的自主编排层,你只需给它一个自然语言目标,它就会进行规划、执行,并将决策节点反馈给你。整个流程可以由你已经在使用的编码代理(Claude Code、Codex 或类似工具)驱动,这也是我运行它的方式。
这指向的更宏大图景是自我改进的 LLM 和代理。一旦训练成为代理循环中可调用的步骤,驱动你工作流的同一个编码代理也可以启动微调运行,将循环模式(Wiki 的语调、代码风格、分类策略)烘焙到模型本身中,从而在使用模型和改进模型之间形成闭环。
这篇文章的其余部分是完整的演练。

本次运行的所有资源都可以在一个配套仓库中找到,包括训练和验证划分(train.jsonl, val.jsonl, wiki-sft-2026.jsonl)、数据构建脚本(parse_2026.py, fetch_abstracts.py, build_jsonl.py)、pilot-agent.md 斜杠命令、冒烟测试脚本以及基线与微调模型的对比代码。请在 github.com/dair-ai/wiki-sft 获取,克隆它,将其指向你自己的语料库,并端到端地复现该运行。
## 为什么输出风格是正确的首个 SFT 目标
对于个人 Wiki 来说,高杠杆作用在于一致性。读者通过形状来识别摘要,即一段包含作者所属机构和核心贡献的导语,后面跟着三到五个带有加粗简短标签的要点摘要。一个有能力的基座模型可以通过精心设计的系统提示词诱导出这种格式,但失败模式也很常见。它会恢复为标题式大写标题,漏掉机构行,改变要点数量,并混入营销语言。
监督微调(SFT)在参数层面修复了这个问题。一旦格式进入权重,每次生成都会默认符合规范,系统提示词也会缩减为一句话(或者完全省略)。当数据集保持较小时,成本也保持在低位,通常 50 到 100 个示例的简洁风格数据集就足以开始。
## 将工作交给代理
大多数微调教程会引导你完成十个不同的步骤。你需要格式化数据、上传数据、选择基座模型、决定 LoRA 秩和学习率、启动任务、解析日志、选择优胜者、在全量数据上重新训练、部署并进行冒烟测试。每一步都有可能出错,你最终不得不扮演一个调优代理的角色。
Fireworks Agent 颠覆了这一过程。其接口是 `firectl session create -n "<your instruction>"`,其中 `firectl` 是 Fireworks CLI。在此之后,你只需观察事件流,并在代理提出决策节点(例如建议的计划或超参数扫描结果)时进行响应。
Fireworks 还提供了一个 Claude Code 斜杠命令(或者你可以将其格式化为代理技能),即 `pilot-agent.md`(以前称为 Pilot Agent),它封装了 `firectl` 命令并处理事件流、节点检测和从最后时间戳恢复的逻辑。
## 完整演练
步骤 0:设置
安装 Fireworks CLI 并确认你的账户。
```bash
brew install fw-ai/firectl/firectl
firectl signin
firectl account get
```

在 Fireworks 控制台中,创建一个服务账户,该账户拥有 Training Agent 所需的权限(即代表你启动训练任务和部署的角色),然后生成一个绑定到该服务账户的 API 密钥。此外,还要创建一个单独的用户级 API 密钥用于推理和部署检查。将两者放入项目旁边的 `.env` 文件中。
```bash
PI_API_KEY=<service-account key for Training Agent>
FIREWORKS_API_KEY=<user-level key>
```
步骤 1:构建数据集
我使用的训练数据包含源自 DAIR.AI 每周顶级 AI 论文 Wiki 的聊天格式记录,取自 2026 年每周前 5 篇论文,并配对它们的 arXiv 摘要。三个小型 Python 脚本处理整个流程,即 `parse_2026.py`(Wiki 到结构化条目)、`fetch_abstracts.py`(arXiv 摘要查找)和 `build_jsonl.py`(聊天格式组装)。聊天模式是标准的 Fireworks 形状:
```json
{
"messages": [
{"role": "system", "content": "You write concise, structured summaries of AI research papers in the style of DAIR.AI's Top AI Papers of the Week. Open with a one-paragraph lede that names the authors' affiliation and the core contribution, then follow with three to five bulleted takeaways. Each bullet begins with a bolded short label, a colon, then a crisp explanation. Keep the tone analytical, specific, and free of hype."},
{"role": "user", "content": "Paper: <title>\n\nAbstract:\n<abstract>\n\nWrite a Top AI Papers of the Week style summary."},
{"role": "assistant", "content": "<cleaned wiki summary>"}
]
}
```
最终输出是 `train.jsonl` 和 `val.jsonl`(加上合并的 `wiki-sft-2026.jsonl` 供参考),其中约 90% 的记录用于训练,10% 用于验证。
步骤 2:将数据集上传到 Fireworks
```bash
source .env && firectl dataset create wiki-sft-2026 \
--display-name "Wiki SFT 2026 (top 5 papers/week)" \
train.jsonl \
--api-key $FIREWORKS_API_KEY
```
确认数据集状态为 `READY`:
```bash
firectl dataset list --api-key $FIREWORKS_API_KEY
```
你将传递给 Fireworks Agent 的数据集路径类似于 `accounts/<your-account>/datasets/wiki-sft-2026`。
步骤 3:启动 Fireworks Agent
这是面向用户的全部配置,仅仅一条指令。
```bash
source .env && firectl session create \
--api-key $PI_API_KEY \
-n "Run end-to-end supervised fine-tuning on qwen3-8b using dataset accounts/<your-account>/datasets/wiki-sft-2026 and deploy the trained model to a working inference endpoint that I can call via the Fireworks chat completions API. Use validation loss for evaluation. The full flow including deployment must complete automatically."
```
会话会返回一个 ID,例如 `1777224532-7ddb`。流式传输事件:
```bash
firectl session events <session-id> --api-key $PI_API_KEY --wait
```
`--wait` 标志很重要;没有它,命令会转储现有事件然后退出。Claude Code 斜杠命令会为你处理这个问题。
步骤 4:批准计划并提升优胜者
代理会提出两个决策节点。第一个是包含成本估算和三个并行扫描的超参数配置的计划,以验证损失作为评估器,你需要批准它以恢复流式传输。

```bash
firectl session update <session-id> --api-key $PI_API_KEY -n "Approved, proceed."
```
然后,超参数扫描会并行运行三个 SFT 任务并返回一个排名表,之后代理会提出带有获胜配置的第二个决策节点。在我的运行中,前三名配置在评估损失上非常接近,这告诉你在这个数据集规模下任务对超参数并不特别敏感,因此批准全量训练是显而易见的下一步。
```bash
firectl session update <session-id> --api-key $PI_API_KEY -n "yes, proceed with 5-epoch full training on the winning config, then deploy and smoke test as planned"
```
全量训练大约需要八分钟的 GPU 时间,成本仅需几美分。

步骤 5:验证部署
部署通常是临时微调工作流程出问题的地方,比如选择了错误的加速器、缺少兼容的形状或容量停滞。代理会自行处理恢复,因此会话会以 `succeeded` 状态结束,并产生一个 `READY` 的缩放至零部署。使用以下命令确认部署:
```bash
firectl deployment get <deployment-name> --api-key $FIREWORKS_API_KEY
```
步骤 6:调用模型
推理使用标准的 Fireworks 聊天补全端点,使用部署固定的模型 ID,以便请求路由到你的自定义部署:
```python
import os, json, urllib.request
API_KEY = os.environ["FIREWORKS_API_KEY"]
MODEL = "accounts/<your-account>/models/<your-trained-model>"
DEPLOYMENT = "accounts/<your-account>/deployments/<your-deployment>"
PINNED = f"{MODEL}#{DEPLOYMENT}"
SYSTEM = (
"You write concise, structured summaries of AI research papers in the "
"style of DAIR.AI's Top AI Papers of the Week. Open with a one-paragraph "
"lede that names the authors' affiliation and the core contribution, then "
"follow with three to five bulleted takeaways. Each bullet begins with a "
"bolded short label, a colon, then a crisp explanation. Keep the tone "
"analytical, specific, and free of hype."
)
def call(messages):
body = json.dumps({
"model": PINNED, "messages": messages,
"temperature": 0.0, "max_tokens": 2500,
}).encode()
req = urllib.request.Request(
"https://api.fireworks.ai/inference/v1/chat/completions",
data=body,
headers={"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"},
method="POST",
)
with urllib.request.urlopen(req, timeout=300) as resp:
return json.loads(resp.read())["choices"][0]["message"]["content"]
abstract = "..." # any new paper abstract
out = call([
{"role": "system", "content": SYSTEM},
{"role": "user", "content": f"Paper: <title>\n\nAbstract:\n{abstract}\n\nWrite a Top AI Papers of the Week style summary."},
])
print(out)
```
一旦预热,调用返回的速度足够快,可以作为代理中的内联步骤使用,而不是批处理任务。
## 为什么这种工作流程是值得的
我在几篇位于训练集之外的论文上测试了微调后的模型,向基座 `qwen3-8b` 和微调模型发送了相同的系统提示词和摘要。微调模型生成的导语以机构开头,指明了研究人员的实验室,随后是三到五个带有加粗简短标签前缀(例如 Method:、Performance Gains:、Scalability:)的要点,以及分析性、非宣传性的语调。例如,在思维链论文上,它以“斯坦福大学的研究人员表明,思维链提示显著增强了大型语言模型的推理能力……”开头。这就是 Wiki 的语调,被烘焙进了权重中,并在一次快速调用中产生。
实际的好处在于,你不再需要一个庞大、低效的 LLM 或代理来为你的 LLM Wiki 撰写摘要。一个较小的微调模型可以有效、高效且廉价地完成这项工作。对于这个用例,正确的风格和语调至关重要,任何程度的技能或系统提示词调整都无法替代一个经过适当微调的 LLM 所带来的效果。
还有两件事使其不仅仅是一次性实验而有用的。首先,训练成为了一种工具,而不是一个项目,只需一条 CLI 命令、几美分的计算成本,最后得到一个真正可调用的端点,而代理会处理那些枯燥的失败模式。其次,你拥有生成的模型。权重存在于你的账户中,部署在你控制的基础设施上,空闲成本为零。以这种价格和摩擦力,使用 SFT 成为解决更广泛的一类风格和格式问题的合理答案。
## 下一步是什么,权重中的知识
我有意止步于风格迁移,因为这是在小数据集上最干净的首个 SFT 目标。Karpathy 描述的更困难的版本(你的 Wiki 内容在权重中)是自然的延续,需要在循环中包含合成数据生成、更多训练记录和知识召回评估器。
这种模式不仅仅适用于个人论文 Wiki。任何结构化知识表面(内部文档 Wiki、产品手册、研究库)都是同样的两步配方(先在风格上进行 SFT,然后在其之上分层知识注入)的候选者。一个同时内化了语料库的声音和实质的模型,是使构建在其上的个性化代理真正有用的关键。
Fireworks Agent 目前处于私密预览阶段,即将公开发布。如果你正在考虑将此工作流程应用于你自己的语料库,并希望请求访问权限或与 Fireworks 团队讨论,请访问 fireworks.ai/contact-training 联系。
## 相关链接
- [elvis](https://x.com/omarsar0)
- [@omarsar0](https://x.com/omarsar0)
- [23K](https://x.com/omarsar0/status/2057114824467792189/analytics)
- [@karpathy](https://x.com/@karpathy)
- [post](https://x.com/karpathy/status/2039805659525644595?s=20)
- [@FireworksAI_HQ](https://x.com/@FireworksAI_HQ)
- [Fireworks Agent](https://docs.fireworks.ai/fine-tuning/agent/introduction)
- [train.jsonl](https://github.com/dair-ai/wiki-sft/blob/main/train.jsonl)
- [val.jsonl](https://github.com/dair-ai/wiki-sft/blob/main/val.jsonl)
- [wiki-sft-2026.jsonl](https://github.com/dair-ai/wiki-sft/blob/main/wiki-sft-2026.jsonl)
- [parse_2026.py](https://github.com/dair-ai/wiki-sft/blob/main/parse_2026.py)
- [fetch_abstracts.py](https://github.com/dair-ai/wiki-sft/blob/main/fetch_abstracts.py)
- [build_jsonl.py](https://github.com/dair-ai/wiki-sft/blob/main/build_jsonl.py)
- [pilot-agent.md](https://github.com/dair-ai/wiki-sft/blob/main/pilot-agent.md)
- [test_new_deployment.py](https://github.com/dair-ai/wiki-sft/blob/main/test_new_deployment.py)
- [before_after.py](https://github.com/dair-ai/wiki-sft/blob/main/before_after.py)
- [github.com/dair-ai/wiki-sft](https://github.com/dair-ai/wiki-sft)
- [DAIR.AI Top AI Papers of the Week](https://github.com/dair-ai/AI-Papers-of-the-Week)
- [fireworks.ai/contact-training](https://fireworks.ai/contact-training)
- [Upgrade to Premium](https://x.com/i/premium_sign_up)
- [11:02 PM · May 20, 2026](https://x.com/omarsar0/status/2057114824467792189)
- [23.1K Views](https://x.com/omarsar0/status/2057114824467792189/analytics)
---
*导出时间: 2026/5/21 16:12:49*