{"id":10021557,"date":"2026-11-12T09:28:43","date_gmt":"2026-11-12T01:28:43","guid":{"rendered":"https:\/\/itmax.cn\/?p=10021557"},"modified":"2026-11-12T09:28:57","modified_gmt":"2026-11-12T01:28:57","slug":"axolotl-20261112","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10021557","title":{"rendered":"\u540c\u4e00\u5957\u8d85\u53c2\uff0c\u5fae\u8c03\u5206\u6570\u5dee\u4e86 18 \u4e2a\u70b9\uff5cAxolotl \u6211\u8fd8\u6ca1\u8dd1\u8bad\u7ec3\uff0c\u5148\u628a\u8fd9\u672c\u8d26\u7ffb\u4e86"},"content":{"rendered":"<figure style=\"margin:2em 0;text-align:center;\"><img decoding=\"async\" src=\"https:\/\/itmax.cn\/wp-content\/uploads\/2026\/11\/axolotl-cover.png\" alt=\"Axolotl \u5c01\u9762\uff1aYAML \u5373\u8bad\u7ec3\u811a\u672c\u7684\u5f00\u6e90\u5fae\u8c03\u6846\u67b6\uff0c12,686 star\uff0cv0.21.1 \u7248\u672c\uff0c\u8fd1\u56db\u5468 124 \u6b21\u63d0\u4ea4\" style=\"max-width:100%;height:auto;border-radius:8px;\" \/><figcaption style=\"font-size:0.85em;color:#666;margin-top:0.5em;\">Axolotl\uff1a<code>12,686<\/code> star\uff0cv<code>0.21.1<\/code> \u4e8e 10 \u6708 27 \u65e5\u53d1\u5e03\uff0c\u8fd1\u56db\u5468 <code>124<\/code> \u6b21\u63d0\u4ea4\uff08\u56fe\u6e90\uff1a\u81ea\u7ed8\u5c01\u9762\uff09<\/figcaption><\/figure>\n<p>\u524d\u9635\u5b50\u5e2e\u670b\u53cb\u8c03\u4e00\u4e2a 7B \u6a21\u578b\uff0c\u4ed6\u7684\u8bc9\u6c42\u7279\u522b\u6734\u7d20\uff1a\u51e0\u5343\u6761\u5ba2\u670d\u95ee\u7b54\uff0c\u60f3\u8ba9\u6a21\u578b\u5b66\u4f1a\u7528\u4ed6\u4eec\u7684\u884c\u8bdd\u56de\u8bdd\u3002\u811a\u672c\u662f\u4ece\u7f51\u4e0a\u6284\u7684 PyTorch \u8bad\u7ec3\u5faa\u73af\uff0c\u8dd1\u4e86\u4e09\u5929\uff0c\u4e2d\u9014\u6539\u4e00\u6b21 batch size \u5c31 OOM\uff0c\u60f3\u4ece\u5355\u5361\u6362\u5230\u4e24\u5f20\u5361\uff0cDeepSpeed \u7684\u914d\u7f6e\u53c8\u5f97\u91cd\u5199\u4e00\u904d\u3002\u6700\u8981\u547d\u7684\u662f\u5b9e\u9a8c\u8bb0\u5f55\u2014\u2014\u54ea\u4e2a checkpoint \u5bf9\u5e94\u54ea\u6b21\u6539\u52a8\uff0c\u5168\u9760\u6587\u4ef6\u5939\u540d\u91cc\u624b\u6572\u7684\u65f6\u95f4\u6233\u3002\u6211\u770b\u7740\u4ed6\u684c\u9762\u4e0a\u90a3\u4e2a\u53eb <code>final_v2_really_final<\/code> \u7684\u76ee\u5f55\uff0c\u5c31\u60f3\u8d77\u81ea\u5df1\u5f53\u5e74\u4e5f\u8fd9\u4e48\u5e72\u8fc7\u3002<\/p>\n<p>\u540e\u6765\u6211\u628a\u8fd9\u4e8b\u8bb0\u5728\u5fc3\u91cc\uff0c\u5f00\u59cb\u7559\u610f\u73b0\u6210\u7684\u5fae\u8c03\u6846\u67b6\u3002GitHub \u4e0a\u641c&#8221;fine-tuning&#8221;\uff0cstar \u6392\u524d\u9762\u7684\u662f unsloth \u548c LlamaFactory\uff0c\u8fd9\u4e24\u4e2a\u540d\u5b57\u4eba\u4eba\u90fd\u542c\u8fc7\uff1b\u518d\u5f80\u4e0b\u7ffb\uff0c\u6709\u4e2a\u9879\u76ee\u8ba9\u6211\u505c\u4e86\u4e0b\u6765\uff1aaxolotl\uff0c\u7f8e\u897f\u8788\uff0c\u4e00\u79cd\u6c38\u8fdc\u957f\u4e0d\u5927\u7684\u877e\u8788\u300212,686 \u4e2a star\uff0cApache-2.0\uff0c\u6700\u8fd1\u4e00\u6b21\u63d0\u4ea4\u5c31\u5728\u4eca\u5929\uff0c\u6700\u65b0\u7248 v0.21.1 \u662f 10 \u6708 27 \u65e5\u53d1\u7684\u3002\u5b83\u8d70\u7684\u662f\u4e00\u6761\u5f88\u786c\u6838\u7684\u8def\u7ebf\uff1a<strong>\u6574\u4e2a\u8bad\u7ec3\u8fc7\u7a0b\u5199\u8fdb\u4e00\u4e2a YAML \u6587\u4ef6<\/strong>\uff0c\u4ece\u6570\u636e\u9884\u5904\u7406\u5230\u8bad\u7ec3\u5230\u63a8\u7406\u5230\u5408\u5e76\u6743\u91cd\uff0c\u5168\u90e8\u7528\u540c\u4e00\u4efd\u914d\u7f6e\u9a71\u52a8\u3002<\/p>\n<p>\u8bf4\u5b9e\u8bdd\uff0c\u4e00\u5f00\u59cb\u6211\u662f\u4e0d\u4fe1\u7684\u3002\u5fae\u8c03\u8fd9\u4e48\u590d\u6742\u7684\u6d3b\uff0c\u4e00\u4e2a YAML \u80fd\u88c5\u4e0b\u591a\u5c11\u4e1c\u897f\uff1f\u4e8e\u662f\u82b1\u4e86\u4e24\u4e2a\u665a\u4e0a\uff0c\u6211\u628a\u5b83\u7684 README\u3001\u5b98\u65b9\u5b89\u88c5\u6587\u6863\u3001\u793a\u4f8b\u914d\u7f6e\u9010\u884c\u5bf9\u4e86\u4e00\u904d\uff0c\u53c8\u628a\u5b83 248 \u4e2a open issue \u91cc\u8bc4\u8bba\u6700\u591a\u7684\u90a3\u6279\u7ffb\u4e86\u4e2a\u904d\u3002\u7ed3\u8bba\u5148\u653e\u8fd9\u91cc\uff1a\u8fd9\u4e2a\u4e1c\u897f\u7684\u8bbe\u8ba1\u601d\u8def\u6211\u662f\u771f\u559c\u6b22\uff0c\u4f46\u6c34\u6bd4\u6211\u60f3\u7684\u6df1\uff0c\u6709\u51e0\u4e2a\u5751\u503c\u5f97\u5728\u52a8\u624b\u4e4b\u524d\u5148\u77e5\u9053\u3002<\/p>\n<h2 id=\"yaml\">\u4e00\u4efd YAML\uff0c\u4ece\u6570\u636e\u7ba1\u5230\u4e0a\u7ebf<\/h2>\n<p>Axolotl \u6700\u6838\u5fc3\u7684\u4e3b\u5f20\u662f\uff1a\u914d\u7f6e\u6587\u4ef6\u5c31\u662f\u8bad\u7ec3\u7684\u5168\u90e8\u3002\u6211\u628a\u5b98\u65b9 <code>examples\/llama-3\/lora-1b.yml<\/code> \u8fd9\u4e2a\u793a\u4f8b\u7ffb\u51fa\u6765\u9010\u884c\u770b\uff0c\u6574\u4e2a\u6587\u4ef6\u4e0d\u5230\u4e00\u767e\u884c\uff1a<\/p>\n<pre><code class=\"language-yaml\">base_model: NousResearch\/Llama-3.2-1B\n\ndatasets:\n  - path: teknium\/GPT4-LLM-Cleaned\n    type: alpaca\n\nval_set_size: 0.1\noutput_dir: .\/outputs\/lora-out\n\nadapter: lora\nsequence_len: 2048\nsample_packing: true\n\nlora_r: 16\nlora_alpha: 32\nlora_dropout: 0.05\nlora_target_modules:\n  - gate_proj\n  - down_proj\n  - up_proj\n  - q_proj\n  - v_proj\n  - k_proj\n  - o_proj\n\ngradient_accumulation_steps: 2\nmicro_batch_size: 2\nnum_epochs: 1\noptimizer: adamw_8bit\nlearning_rate: 0.0002\nbf16: auto\n<\/code><\/pre>\n<p>\u8fd9\u4efd\u914d\u7f6e\u597d\u5728\u54ea\uff1f\u5b83\u628a\u4e00\u6b21\u5b9e\u9a8c\u7684\u6240\u6709\u53d8\u91cf\u90fd\u9489\u6b7b\u5728\u4e00\u4e2a\u6587\u4ef6\u91cc\uff1a\u57fa\u5ea7\u6a21\u578b\u3001\u6570\u636e\u96c6\u3001LoRA \u7684\u79e9\u548c\u76ee\u6807\u5c42\u3001\u5b66\u4e60\u7387\u3001batch \u8bbe\u7f6e\uff0c\u4e00\u4e2a\u4e0d\u6f0f\u3002\u60f3\u590d\u73b0\uff0c\u628a YAML \u53d1\u7ed9\u540c\u4e8b\u5c31\u884c\uff1b\u60f3\u5bf9\u6bd4\uff0c\u6539\u4e00\u884c\u5b58\u4e00\u4efd\u3002\u5bf9\u6bd4\u6211\u670b\u53cb\u90a3\u4e2a&#8221;\u6587\u4ef6\u5939\u540d\u9760\u624b\u6572&#8221;\u7684\u65b9\u6848\uff0c\u8fd9\u5c31\u662f\u628a\u5de5\u7a0b\u4e60\u60ef\u5f3a\u884c\u89c4\u8303\u4e86\u3002\u800c\u4e14\u8bad\u7ec3\u3001\u63a8\u7406\u3001\u5408\u5e76\u6743\u91cd\u7528\u7684\u662f<strong>\u540c\u4e00\u4efd YAML<\/strong>\u2014\u2014<code>axolotl train<\/code>\u3001<code>axolotl inference<\/code>\u3001<code>axolotl merge-lora<\/code> \u4e09\u4e2a\u547d\u4ee4\u5403\u540c\u4e00\u4e2a\u914d\u7f6e\uff0c\u4e0d\u5b58\u5728&#8221;\u8bad\u7ec3\u65f6\u7528 A \u6a21\u677f\u3001\u4e0a\u7ebf\u65f6\u7528 B \u6a21\u677f&#8221;\u8fd9\u79cd\u7ecf\u5178\u4e8b\u6545\u3002<\/p>\n<p>\u4ece LoRA \u6362\u6210 QLoRA \u662f\u4ec0\u4e48\u4f53\u9a8c\uff1f\u6539\u4e24\u884c\uff1a<code>load_in_8bit: true<\/code> \u6362\u6210 <code>load_in_4bit: true<\/code>\uff0c<code>adapter: lora<\/code> \u6362\u6210 <code>adapter: qlora<\/code>\u3002\u6362\u6210\u5168\u53c2\u6570\u5fae\u8c03\uff1f\u628a\u8fd9\u4e24\u884c\u5220\u6389\u3002\u8fd9\u662f\u6211\u89c1\u8fc7\u7684\u6240\u6709\u5fae\u8c03\u5de5\u5177\u91cc\u5207\u6362\u6210\u672c\u6700\u4f4e\u7684\u3002<\/p>\n<p>\u6570\u636e\u683c\u5f0f\u8fd9\u4e00\u5757\u4e5f\u5f97\u5355\u72ec\u5938\u3002<code>type: alpaca<\/code> \u4e4b\u5916\uff0c<code>chat_template<\/code> \u662f\u6211\u4e2a\u4eba\u6700\u770b\u91cd\u7684\u4e00\u4e2a\u7c7b\u578b\uff1a\u4f60\u6309 messages \u683c\u5f0f\u7ec4\u7ec7\u6570\u636e\uff0c\u6846\u67b6\u81ea\u52a8\u5957\u7528\u57fa\u5ea7\u6a21\u578b\u81ea\u5e26\u7684\u5bf9\u8bdd\u6a21\u677f\uff0c\u8fd8\u80fd\u7528 <code>roles_to_train<\/code> \u6307\u5b9a\u53ea\u5bf9 assistant \u56de\u590d\u7b97 loss\u3001\u7528\u6237\u63d0\u95ee\u4e0d\u7b97\u3002\u8fd9\u4e2a\u529f\u80fd\u770b\u7740\u4e0d\u8d77\u773c\uff0c\u5b9e\u9645\u4e0a\u662f\u5f88\u591a&#8221;\u7ec3\u5b8c\u6a21\u578b\u8bf4\u8bdd\u4e0d\u50cf\u4eba&#8221;\u4e8b\u6545\u7684\u89e3\u836f\u2014\u2014loss \u7b97\u5230\u7528\u6237\u63d0\u95ee\u4e0a\uff0c\u6a21\u578b\u5c31\u4f1a\u5b66\u7740\u62a2\u7b54\u3002ShareGPT\u3001\u9884\u8bad\u7ec3\u7eaf\u6587\u672c\u4e5f\u90fd\u6709\u73b0\u6210\u7c7b\u578b\uff0c\u672c\u5730\u6587\u4ef6\u3001Hugging Face \u4ed3\u5e93\u3001S3\/Azure\/GCP \u7684\u4e91\u5b58\u50a8\u90fd\u80fd\u76f4\u63a5\u5f53\u6570\u636e\u6e90\u3002<\/p>\n<p>\u6a21\u578b\u8986\u76d6\u4e0a\u8fd8\u6709\u4e00\u5757\u5bb9\u6613\u88ab\u5ffd\u7565\uff1a\u591a\u6a21\u6001\u3002Qwen2-VL\/Qwen3-VL\u3001InternVL 3.5\u3001Gemma 3n\u3001GLM-4.6V \u8fd9\u4e9b\u89c6\u89c9\u8bed\u8a00\u6a21\u578b\uff0c\u52a0\u4e0a Voxtral \u8fd9\u7c7b\u97f3\u9891\u6a21\u578b\uff0c\u56fe\u50cf\u3001\u89c6\u9891\u3001\u8bed\u97f3\u6570\u636e\u90fd\u80fd\u8fdb\u8bad\u7ec3\u7ba1\u7ebf\u30022026 \u5e74 9 \u6708\u90a3\u8f6e\u66f4\u65b0\u91cc\u8fd8\u4e13\u95e8\u52a0\u4e86 VLM \u7684\u6837\u672c\u6253\u5305\u652f\u6301\u2014\u2014\u591a\u6a21\u6001\u8bad\u7ec3\u7684\u6570\u636e\u541e\u5410\u4e00\u76f4\u662f\u77ed\u677f\uff0c\u8fd9\u79cd\u5e95\u5c42\u4f18\u5316\u6bd4&#8221;\u53c8\u652f\u6301\u4e86\u4e00\u4e2a\u65b0\u6a21\u578b&#8221;\u66f4\u80fd\u8bf4\u660e\u9879\u76ee\u5728\u5f80\u6df1\u5904\u8d70\u3002<\/p>\n<p>\u65b9\u6cd5\u8986\u76d6\u9762\u4e5f\u5f97\u8bf4\u4e00\u4e0b\u3002SFT\u3001LoRA\u3001QLoRA \u4e4b\u5916\uff0c\u504f\u597d\u4f18\u5316\u90a3\u4e00\u5957\uff08DPO\u3001IPO\u3001KTO\u3001ORPO\uff09\u90fd\u6709\u73b0\u6210\u914d\u7f6e\uff0cGRPO \u8fd9\u79cd\u5f3a\u5316\u5b66\u4e60\u65b9\u6cd5\u4e5f\u5728\uff0c\u751a\u81f3\u5956\u52b1\u5efa\u6a21\u548c\u8fc7\u7a0b\u5956\u52b1\u5efa\u6a21\u90fd\u5360\u4e86\u72ec\u7acb\u7ae0\u8282\u30022026 \u5e74\u7684\u66f4\u65b0\u8bb0\u5f55\u76f8\u5f53\u5bc6\u96c6\uff1aMistral Large 4\u3001Qwen3.6\u3001GLM \u7cfb\u5217\u3001Gemma 4 \u8fd9\u4e9b\u65b0\u6a21\u578b\uff0c\u57fa\u672c\u90fd\u662f\u53d1\u5e03\u540e\u51e0\u5929\u5230\u51e0\u5468\u5185\u5c31\u6709\u652f\u6301\uff1bGGUF \u5bfc\u51fa\u4e5f\u8fdb\u4e86 <code>axolotl export<\/code>\uff0c\u7ec3\u5b8c\u76f4\u63a5\u8f6c\u7ed9 llama.cpp \u6216 Ollama \u7528\u3002<\/p>\n<p>\u54ea\u4e9b\u662f\u771f\u672c\u4e8b\u3001\u54ea\u4e9b\u8fd8\u5ae9\uff1f\u6211\u7684\u5224\u65ad\u662f\uff1aLoRA\/QLoRA\/DPO \u8fd9\u4e9b\u4e3b\u5e72\u8def\u7ebf\u4e45\u7ecf\u8003\u9a8c\uff0cexamples \u76ee\u5f55\u4e0b\u6bcf\u4e2a\u6a21\u578b\u5bb6\u65cf\u90fd\u6709\u73b0\u6210\u914d\u7f6e\uff0c\u95ed\u773c\u6284\u5c31\u884c\uff1b\u591a\u5361\u5e76\u884c\uff08FSDP2\u3001DeepSpeed\u3001\u4e13\u5bb6\u5e76\u884c\u3001\u4e0a\u4e0b\u6587\u5e76\u884c\uff09\u662f\u5b83\u771f\u6b63\u62c9\u5f00\u5dee\u8ddd\u7684\u5730\u65b9\uff0c\u5b98\u65b9\u6587\u6863\u91cc\u90a3\u5f20 N \u7ef4\u5e76\u884c\u7684\u7ec4\u5408\u77e9\u9635\uff0c\u5176\u4ed6\u51e0\u4e2a\u6846\u67b6\u6ca1\u4e00\u4e2a\u5199\u5f97\u8fd9\u4e48\u5168\uff1b\u800c GRPO \u8fd9\u7c7b\u65b0\u4e1c\u897f\u8981\u7559\u4e2a\u5fc3\u773c\u2014\u2014open issue \u91cc\u6709\u7528\u6237\u53cd\u9988 GRPO \u8bad\u7ec3\u65f6\u9519\u8bef\u5730\u8d70\u4e86 DPO \u7684\u6570\u636e\u5904\u7406\u903b\u8f91\uff08issue #2986\uff0c22 \u6761\u8ba8\u8bba\u8fd8\u5f00\u7740\uff09\uff0cNVFP4 \u91cf\u5316\u8bad\u7ec3\u66f4\u662f\u524d\u6cbf\u5230\u8fde\u76f8\u5173\u8d44\u6599\u90fd\u5c11\u3002<\/p>\n<p>\u6027\u80fd\u4f18\u5316\u8fd9\u4e2a\u5c42\u9762\u7684\u4e1c\u897f\u5b83\u4e5f\u5168\u7ed9\u6536\u7f16\u4e86\uff1a\u6837\u672c\u6253\u5305\uff08sample packing\uff09\u628a\u591a\u6761\u77ed\u6837\u672c\u62fc\u8fdb\u4e00\u6761\u5e8f\u5217\uff0c\u7701\u6389\u65e0\u610f\u4e49\u7684 padding \u8ba1\u7b97\uff0c\u8fd9\u5728\u6307\u4ee4\u6570\u636e\u666e\u904d\u504f\u77ed\u7684\u73b0\u5b9e\u91cc\u662f\u767d\u6361\u7684\u52a0\u901f\uff1bFlashAttention 2\/3\/4\u3001SageAttention\u3001Liger Kernel\u3001Cut Cross Entropy \u8fd9\u4e9b\u663e\u5b58\u4e0e\u901f\u5ea6\u4f18\u5316\uff0c\u5168\u90e8\u662f YAML \u91cc\u4e00\u884c\u5f00\u5173\u7684\u4e8b\u3002\u793a\u4f8b\u914d\u7f6e\u91cc\u8fd8\u6709\u4e2a\u7ec6\u8282\u6211\u633a\u559c\u6b22\uff1a<code>loss_watchdog_threshold: 5.0<\/code>\u2014\u2014loss \u98d9\u8fc7\u9608\u503c\u8fde\u7740\u51e0\u6b65\u4e0d\u56de\u843d\u5c31\u81ea\u52a8\u7ec8\u6b62\uff0c\u66ff\u4f60\u5b88\u4f4f\u534a\u591c\u70e7\u5361\u7684 wallet\u3002\u53e6\u5916\u5b83\u9ed8\u8ba4\u5f00\u4e86\u9065\u6d4b\uff0c\u6536\u96c6\u7cfb\u7edf\u4fe1\u606f\u548c\u9519\u8bef\u7387\uff0c\u5b98\u65b9\u58f0\u660e\u4e0d\u542b\u4e2a\u4eba\u6570\u636e\u548c\u6587\u4ef6\u8def\u5f84\uff0c\u4ecb\u610f\u7684\u8bdd\u8bbe <code>AXOLOTL_DO_NOT_TRACK=1<\/code> \u5173\u6389\u3002<\/p>\n<h2 id=\"_1\">\u4ee3\u4ef7\u85cf\u5728\u4f9d\u8d56\u94fe\u91cc<\/h2>\n<p>\u6709\u4e00\u8bf4\u4e00\uff0c\u8fd9\u79cd&#8221;\u5305\u529e\u4e00\u5207&#8221;\u7684\u8bbe\u8ba1\u662f\u6709\u4ee3\u4ef7\u7684\uff0c\u800c\u4e14\u4ee3\u4ef7\u4e0d\u5c0f\u3002<\/p>\n<p>Axolotl \u5e95\u4e0b\u57ab\u7740 Transformers\u3001PEFT\u3001TRL\u3001bitsandbytes\u3001DeepSpeed\u3001FlashAttention \u4e00\u6574\u5957\u5e93\uff0c\u5b83\u81ea\u5df1\u505a\u7684\u662f\u7ec4\u88c5\u548c\u80f6\u6c34\u3002\u597d\u5904\u662f\u6bcf\u6b21\u4e0a\u6e38\u51fa\u65b0\u4f18\u5316\u5b83\u90fd\u80fd\u5f88\u5feb\u63a5\u4e0a\uff1b\u574f\u5904\u662f\u51fa\u95ee\u9898\u65f6\u8c03\u7528\u6808\u6df1\u4e0d\u89c1\u5e95\u3002\u6709\u7b2c\u4e09\u65b9\u4f5c\u8005\u5728\u535a\u5ba2\u91cc\u4e13\u95e8\u5199\u8fd9\u4e8b\uff1a\u8c03\u8bd5\u590d\u6742\u7684\u591a\u5361\u95ee\u9898\u65f6\uff0c\u8981\u5728\u597d\u51e0\u5c42\u5c01\u88c5\u91cc\u7ffb\u4f9d\u8d56\u94fe\uff0c\u62a5\u9519\u4fe1\u606f\u8fd8\u5e38\u5e38\u6307\u5411\u4f60\u6839\u672c\u6ca1\u78b0\u8fc7\u7684\u5e93\u3002\u53e6\u4e00\u4f4d\u957f\u671f\u7528\u6237\u7684\u53cd\u9988\u66f4\u76f4\u63a5\u2014\u2014YAML \u91cc\u4e00\u4e2a\u7f29\u8fdb\u5199\u9519\u3001\u4e00\u4e2a\u53c2\u6570\u540d\u62fc\u9519\uff0c\u8e66\u51fa\u6765\u7684\u62a5\u9519\u7ecf\u5e38\u83ab\u540d\u5176\u5999\uff0c\u65b0\u624b\u5f88\u5bb9\u6613\u5361\u6b7b\u5728\u7b2c\u4e00\u6b65\u3002<\/p>\n<p>\u8fd8\u6709\u4e00\u5c42\u4ee3\u4ef7\u662f\u7075\u6d3b\u6027\u3002\u914d\u7f6e\u9a71\u52a8\u610f\u5473\u7740&#8221;\u6846\u67b6\u60f3\u5230\u7684\u90fd\u80fd\u914d\uff0c\u6846\u67b6\u6ca1\u60f3\u5230\u7684\u90fd\u96be\u914d&#8221;\u3002\u60f3\u81ea\u5b9a\u4e49 loss \u51fd\u6570\u3001\u60f3\u8bd5\u4e00\u4e2a\u8bba\u6587\u91cc\u521a\u51fa\u7684\u8bad\u7ec3\u6280\u5de7\uff1f\u8981\u4e48\u7b49\u5b83\u51fa\u63d2\u4ef6\u673a\u5236\uff0c\u8981\u4e48\u81ea\u5df1 fork \u6539\u6e90\u7801\u3002\u5982\u679c\u4f60\u662f\u505a\u8bad\u7ec3\u65b9\u6cd5\u7814\u7a76\u3001\u9700\u8981\u7cbe\u786e\u63a7\u5236\u6bcf\u4e00\u6b65\u68af\u5ea6\u66f4\u65b0\u7684\u90a3\u79cd\u4eba\uff0c\u8fd9\u4e2a\u6846\u67b6\u7684\u5929\u82b1\u677f\u4f1a\u5f88\u5feb\u9876\u5230\u2014\u2014\u90a3\u79cd\u573a\u666f\u76f4\u63a5\u5199 PyTorch \u53cd\u800c\u75db\u5feb\u3002<\/p>\n<p>\u6240\u4ee5\u6211\u7ed9\u5b83\u7684\u5b9a\u4f4d\u5f88\u660e\u786e\uff1a\u8fd9\u662f\u7ed9<strong>\u5de5\u7a0b\u5e08<\/strong>\u7528\u7684\u5de5\u5177\uff0c\u4e0d\u662f\u7ed9\u7814\u7a76\u5458\u7528\u7684\u3002\u4f60\u8981\u7684\u662f\u628a\u5df2\u77e5\u7684\u8bad\u7ec3\u65b9\u6cd5\u7a33\u5b9a\u8dd1\u8d77\u6765\u3001\u8dd1\u5f97\u591a\u3001\u8dd1\u5f97\u53ef\u590d\u73b0\uff0c\u5b83\u662f\u5bf9\u7684\u9009\u62e9\uff1b\u4f60\u8981\u7684\u662f\u53d1\u660e\u65b0\u65b9\u6cd5\uff0c\u5b83\u4e0d\u662f\u3002<\/p>\n<h2 id=\"_2\">\u5b89\u88c5\u8fd9\u4ef6\u4e8b\uff0c\u6211\u662f\u600e\u4e48\u8fc7\u7684<\/h2>\n<p>\u5148\u628a\u4e11\u8bdd\u8bf4\u5b8c\uff1a\u6211\u624b\u4e0a\u8fd9\u53f0 M2 \u82af\u7247\u7684 Mac\uff0c<strong>\u6839\u672c\u4e0d\u5728\u5b83\u7684\u8bad\u7ec3\u786c\u4ef6\u652f\u6301\u5217\u8868\u91cc<\/strong>\u3002\u5b98\u65b9\u8981\u6c42\u5199\u5f97\u6e05\u6e05\u695a\u695a\u2014\u2014NVIDIA GPU\uff08Ampere \u67b6\u6784\u8d77\u6b65\uff0c\u4e3a\u4e86 bf16 \u548c Flash Attention\uff09\u6216 AMD GPU\uff0cApple Silicon \u6ca1\u6709\u5b98\u65b9\u652f\u6301\u3002\u6240\u4ee5\u8fd9\u4e00\u8282\u6211\u6ca1\u6709&#8221;\u88c5\u5b8c\u8dd1\u901a&#8221;\u7684\u4e00\u624b\u4f53\u9a8c\uff0c\u4f46\u5b89\u88c5\u6587\u6863\u548c Docker \u955c\u50cf\u6211\u9010\u6bb5\u8bfb\u8fc7\uff0cWindows \u7528\u6237\u5b98\u65b9\u76f4\u63a5\u5efa\u8bae\u8d70 WSL2 \u6216 Docker\uff0cMac \u7684 macOS \u4e00\u8282\u53ea\u6709\u4e00\u884c <code>uv pip install -e '.'<\/code>\uff0c\u660e\u663e\u662f&#8221;\u80fd\u88c5\uff0c\u522b\u6307\u671b\u8bad\u7ec3&#8221;\u7684\u6001\u5ea6\u3002<\/p>\n<p>\u771f\u5b9e\u53ef\u884c\u7684\u5b89\u88c5\u8def\u7ebf\u6709\u4e09\u6761\uff0c\u6309\u7701\u5fc3\u7a0b\u5ea6\u6392\uff1a<\/p>\n<p><strong>\u7b2c\u4e00\u6761\uff0cDocker\uff0c\u6211\u6700\u63a8\u8350\u3002<\/strong> \u4e00\u884c\u547d\u4ee4\uff1a<\/p>\n<pre><code class=\"language-bash\">docker run --gpus '&quot;all&quot;' --ipc=host --rm -it axolotlai\/axolotl:main-latest\n<\/code><\/pre>\n<p>CUDA\u3001PyTorch\u3001FlashAttention \u7684\u7248\u672c\u5168\u7ed9\u4f60\u914d\u597d\u4e86\u3002\u6709\u7b2c\u4e09\u65b9\u4f5c\u8005\u539f\u8bdd\u662f&#8221;\u4e0d\u7528\u4ed6\u4eec\u63d0\u4f9b\u7684\u955c\u50cf\uff0c\u81ea\u5df1\u88c5\u5bf9 CUDA\u3001PyTorch \u548c\u5404\u79cd kernel \u7684\u7248\u672c\u662f\u573a\u5669\u68a6&#8221;\u3002\u771f\u4e0d\u662f\u5938\u5f20\uff0cbitsandbytes\u3001flash-attn \u8fd9\u7c7b\u5305\u8981\u8ddf CUDA \u7248\u672c\u9010\u4f4d\u5bf9\u9f50\uff0c\u624b\u5de5\u88c5\u7ffb\u8fc7\u8f66\u7684\u90fd\u61c2\u3002<\/p>\n<p><strong>\u7b2c\u4e8c\u6761\uff0cuv \u88c5\u3002<\/strong> \u5b98\u65b9\u73b0\u5728\u7684\u9996\u9009\u65b9\u6848\uff1a<\/p>\n<pre><code class=\"language-bash\">curl -LsSf https:\/\/astral.sh\/uv\/install.sh | sh\nexport UV_TORCH_BACKEND=cu130\nuv venv --python 3.12\nsource .venv\/bin\/activate\nuv pip install torch==2.14.0 torchvision\nuv pip install axolotl[deepspeed]\naxolotl fetch examples\n<\/code><\/pre>\n<p>Python \u8981\u6c42 3.12 \u4ee5\u4e0a\uff0cPyTorch 2.13 \u8d77\u6b65\u3002Blackwell \u67b6\u6784\u7684\u5361\uff08RTX 50 \u7cfb\u3001B100\/B200\uff09\u6ce8\u610f\u8981\u914d CUDA 13.0\uff0c12.8 \u7f16\u8bd1\u4e0d\u8fc7 <code>sm_103a<\/code>\uff0c\u8fd9\u70b9\u5b98\u65b9\u6587\u6863\u6709\u4e13\u95e8\u52a0\u7c97\u63d0\u9192\u3002<\/p>\n<p><strong>\u7b2c\u4e09\u6761\uff0c\u96f6\u786c\u4ef6\u95e8\u69db\uff0cColab\u3002<\/strong> \u5b98\u65b9\u4ed3\u5e93\u81ea\u5e26 Colab notebook\uff0c\u70b9\u5f00\u5c31\u80fd\u8dd1\uff0c\u62ff\u5b83\u9a8c\u8bc1\u6d41\u7a0b\u5b8c\u5168\u591f\u7528\u3002<\/p>\n<p>\u786c\u4ef6\u95e8\u69db\uff0c\u4e24\u6863\u3002<strong>\u5148\u58f0\u660e\uff1a\u5b98\u65b9\u53ea\u7ed9\u4e86 GPU \u67b6\u6784\u3001Python\u3001PyTorch \u4e09\u6761\u786c\u6027\u8981\u6c42\uff0c\u6ca1\u6709\u6574\u673a\u914d\u7f6e\u8868<\/strong>\u2014\u2014\u663e\u5b58\u3001\u5185\u5b58\u3001\u78c1\u76d8\u8fd9\u4e9b\u6570\u5b57\uff0c\u4e0b\u9762\u662f\u5b98\u65b9\u6587\u6863\u7ed3\u5408\u7b2c\u4e09\u65b9\u8d44\u6599\u7684\u63a8\u7b97\uff0c\u4e0d\u662f\u5b98\u65b9\u53e3\u5f84\u3002\u6700\u4f4e\u53ef\u7528\u6863\uff1a\u4e00\u5f20 24GB \u663e\u5b58\u7684\u5361\uff08RTX 3090\/4090 \u8fd9\u4e2a\u7ea7\u522b\uff09\uff0c\u8dd1 7B \u6a21\u578b\u7684 QLoRA\uff1b\u591a\u5bb6\u7b2c\u4e09\u65b9\u8d44\u6599\u7ed9\u7684\u5b9e\u6d4b\u6570\u636e\u662f 7B QLoRA \u5927\u7ea6\u5403 16GB \u663e\u5b58\uff0c24GB \u7559\u4e86\u4f59\u91cf\u3002\u7cfb\u7edf\u5185\u5b58 32GB \u8d77\u6bd4\u8f83\u7a33\u3002\u5efa\u8bae\u6863\uff1a\u8ba4\u771f\u6b63\u7ecf\u8dd1\u751f\u4ea7\u7ea7\u7684\u6d3b\uff0cA100\/H100 \u8d77\u6b65\uff0c\u591a\u5361\u573a\u666f\u5b83\u76f4\u63a5\u652f\u6301 FSDP2 \u548c DeepSpeed\uff0c70B \u6a21\u578b\u7684\u5168\u53c2\u6570\u5fae\u8c03\u4e5f\u625b\u5f97\u4f4f\u3002\u78c1\u76d8\u65b9\u9762\u5b98\u65b9\u6ca1\u5199\uff0c\u6211\u6309\u6a21\u578b\u6743\u91cd\u4f53\u79ef\u4f30\u7684\uff1a7B \u6a21\u578b fp16 \u6743\u91cd 15GB \u8d77\uff0c\u52a0\u4e0a checkpoint \u548c\u6570\u636e\u96c6\uff0c\u9884\u7559 200GB \u4e0d\u7b97\u5938\u5f20\u3002<\/p>\n<h2 id=\"_3\">\u7167\u7740\u5b98\u65b9\u6d41\u7a0b\u8d70\u4e00\u904d<\/h2>\n<p>\u5b8c\u6574\u7684\u6700\u5c0f\u793a\u4f8b\u5728\u5b98\u65b9 Getting Started \u91cc\u5199\u5f97\u5f88\u89c4\u6574\uff0c\u6211\u628a\u6bcf\u4e00\u6b65\u90fd\u6838\u8fc7\u4e86\uff08\u518d\u6b21\u58f0\u660e\uff1a\u6d41\u7a0b\u548c\u9884\u671f\u8f93\u51fa\u6765\u81ea\u5b98\u65b9\u6587\u6863\uff0c\u6211\u7684\u673a\u5668\u6ca1\u6709 N \u5361\uff0c\u6ca1\u6709\u771f\u8dd1\u8bad\u7ec3\uff09\u3002<\/p>\n<p>\u7b2c\u4e00\u6b65\uff0c\u62c9\u5b98\u65b9\u793a\u4f8b\u914d\u7f6e\uff1a<\/p>\n<pre><code class=\"language-bash\">axolotl fetch examples\n<\/code><\/pre>\n<p>\u7b2c\u4e8c\u6b65\uff0c\u76f4\u63a5\u5f00\u8bad\u3002\u5b98\u65b9\u7279\u610f\u9009\u4e86 1B \u53c2\u6570\u7684 Llama-3.2-1B\uff0c\u5c31\u662f\u4e3a\u4e86\u8ba9\u5927\u591a\u6570\u663e\u5361\u90fd\u80fd\u8dd1\uff1a<\/p>\n<pre><code class=\"language-bash\">axolotl train examples\/llama-3\/lora-1b.yml\n<\/code><\/pre>\n<p>\u8dd1\u8d77\u6765\u4e4b\u540e Axolotl \u4f1a\u6309\u987a\u5e8f\u505a\u4e94\u4ef6\u4e8b\uff1a\u4e0b\u8f7d\u57fa\u5ea7\u6a21\u578b\u3001\u6302 LoRA \u9002\u914d\u5c42\u3001\u52a0\u8f7d\u5e76\u9884\u5904\u7406 alpaca \u683c\u5f0f\u7684\u6570\u636e\u96c6\u3001\u8fdb\u5165\u8bad\u7ec3\u5faa\u73af\u3001\u4fdd\u5b58 adapter \u6743\u91cd\u3002\u65e5\u5fd7\u91cc\u80fd\u770b\u5230\u6bcf\u4e2a epoch \u7684 loss \u5f80\u4e0b\u8d70\uff0c<code>outputs\/lora-out<\/code> \u76ee\u5f55\u91cc\u843d checkpoint\u3002<\/p>\n<p>\u60f3\u6362\u6210\u81ea\u5df1\u7684\u6570\u636e\uff1f\u5b98\u65b9\u7ed9\u7684\u793a\u4f8b\u662f\u5efa\u4e00\u4e2a <code>my_training.yml<\/code>\uff1a<\/p>\n<pre><code class=\"language-yaml\">base_model: NousResearch\/Nous-Hermes-llama-1b-v1\nload_in_8bit: true\nadapter: lora\nmicro_batch_size: 2\nnum_epochs: 3\nlearning_rate: 0.0003\ndatasets:\n  - path: my_data.jsonl\n    type: alpaca\n<\/code><\/pre>\n<p>\u6570\u636e\u6587\u4ef6\u5c31\u662f\u6700\u6734\u7d20\u7684 alpaca JSONL\uff0c\u4e00\u884c\u4e00\u6761\uff1a<\/p>\n<pre><code class=\"language-json\">{&quot;instruction&quot;: &quot;Classify this text&quot;, &quot;input&quot;: &quot;I love this!&quot;, &quot;output&quot;: &quot;positive&quot;}\n{&quot;instruction&quot;: &quot;Classify this text&quot;, &quot;input&quot;: &quot;Not good at all&quot;, &quot;output&quot;: &quot;negative&quot;}\n<\/code><\/pre>\n<p>\u7136\u540e <code>axolotl train my_training.yml<\/code>\u3002\u7ec3\u5b8c\u60f3\u5bf9\u8bdd\u6d4b\u8bd5\uff1a<\/p>\n<pre><code class=\"language-bash\">axolotl inference my_training.yml --lora-model-dir=&quot;.\/outputs\/lora-out&quot;\n<\/code><\/pre>\n<p>\u52a0\u4e2a <code>--gradio<\/code> \u53c2\u6570\u8fd8\u80fd\u8d77\u4e00\u4e2a\u7f51\u9875\u754c\u9762\u3002\u60f3\u53d1\u5e03\uff1f<code>axolotl merge-lora<\/code> \u628a adapter \u5408\u56de\u57fa\u5ea7\uff0c<code>axolotl export<\/code> \u76f4\u63a5\u51fa GGUF\u3002\u6574\u6761\u94fe\u8def\u6ca1\u6709\u4e00\u4e2a\u73af\u8282\u9700\u8981\u5199\u4ee3\u7801\uff0c\u5168\u7a0b\u6539\u914d\u7f6e\u3002<\/p>\n<p>\u6570\u636e\u96c6\u5927\u7684\u8bdd\uff0c\u5b98\u65b9\u5efa\u8bae\u5148\u8dd1 <code>axolotl preprocess<\/code> \u5355\u72ec\u505a\u9884\u5904\u7406\u2014\u2014\u8fd9\u4e2a\u5efa\u8bae\u540e\u9762\u4f1a\u8bb2\u5230\u4e3a\u4ec0\u4e48\u91cd\u8981\u3002<\/p>\n<h2 id=\"_4\">\u522b\u4eba\u8e29\u8fc7\u7684\u5751\uff0c\u6211\u4e00\u6761\u6761\u770b\u4e86<\/h2>\n<p>Issue \u603b\u91cf 248 \u4e2a\uff0c\u5bf9\u8fd9\u4e2a\u4f53\u91cf\u7684\u9879\u76ee\u7b97\u514b\u5236\u3002\u4f46\u8bc4\u8bba\u6700\u591a\u7684\u90a3\u6279 issue \u66b4\u9732\u51fa\u7684\u95ee\u9898\uff0c\u4e2a\u4e2a\u90fd\u5728\u8981\u5bb3\u4e0a\u3002<\/p>\n<p><strong>\u6700\u624e\u773c\u7684\u4e00\u4e2a\uff1a\u5fae\u8c03\u8d28\u91cf\u7591\u4e91\u3002<\/strong> issue #3154\uff0c20 \u6761\u8ba8\u8bba\uff0c\u8fd8\u5f00\u7740\u3002\u6709\u7528\u6237\u7528\u5b8c\u5168\u76f8\u540c\u7684\u6570\u636e\u96c6\uff08tulu-3-sft-mixture\uff09\u548c\u76f8\u540c\u7684\u8d85\u53c2\u6570\uff0c\u5206\u522b\u5728 Axolotl \u548c LlamaFactory \u4e0a\u5fae\u8c03 Llama3.1-8B\uff0c\u7136\u540e\u7528 IFeval \u57fa\u51c6\u6253\u5206\uff1aLlamaFactory \u7684 prompt \u7ea7\u4e25\u683c\u51c6\u786e\u7387 0.6987\uff0cAxolotl \u53ea\u6709 0.5176\uff0c\u5dee\u4e86 18 \u4e2a\u70b9\u3002\u8fd9\u4f4d\u7528\u6237\u81ea\u5df1\u4e5f\u5f88\u610f\u5916\u3002\u8fd9\u4e2a issue \u76ee\u524d\u6ca1\u6709\u6743\u5a01\u7ed3\u8bba\u2014\u2014\u53ef\u80fd\u662f\u6570\u636e\u5904\u7406\u8def\u5f84\u5dee\u5f02\uff0c\u53ef\u80fd\u662f\u6a21\u677f\u7ec6\u8282\uff0c\u4e5f\u53ef\u80fd\u5c31\u662f\u914d\u7f6e\u6ca1\u5bf9\u9f50\u3002\u6211\u4e0d\u80fd\u62ff\u4e00\u4e2a\u7528\u6237\u7684\u62a5\u544a\u7ed9\u4e24\u4e2a\u6846\u67b6\u5224\u6b7b\u5211\uff0c\u4f46\u5b83\u81f3\u5c11\u8bf4\u660e\u4e00\u4ef6\u4e8b\uff1a<strong>\u8de8\u6846\u67b6\u8fc1\u79fb\u65f6\uff0c\u522b\u9ed8\u8ba4&#8221;\u540c\u8d85\u53c2\u540c\u7ed3\u679c&#8221;\uff0c\u62ff\u81ea\u5df1\u7684\u6570\u636e\u5404\u8dd1\u4e00\u904d\u57fa\u51c6\u786e\u8ba4\u3002<\/strong><\/p>\n<p><strong>\u957f\u5bf9\u8bdd\u6570\u636e\u5904\u7406\u6162\u3002<\/strong> issue #2396\uff1a\u591a\u8f6e\u957f\u5bf9\u8bdd\u6570\u636e\u96c6\u5728 tokenization \u9636\u6bb5\u6162\u5230\u4e0d\u53ef\u7528\u3002\u6570\u636e\u9884\u5904\u7406\u662f Axolotl \u7684\u8001\u75db\u70b9\uff0c\u8fd9\u4e5f\u662f\u5b98\u65b9\u53cd\u590d\u5efa\u8bae\u7528 <code>axolotl preprocess<\/code> \u5206\u79bb\u9884\u5904\u7406\u6b65\u9aa4\u7684\u539f\u56e0\u2014\u2014\u9884\u5904\u7406\u7ed3\u679c\u7f13\u5b58\u5728 <code>dataset_prepared_path<\/code> \u91cc\u3002<\/p>\n<p><strong>\u591a\u5361\u7ec4\u5408\u7684\u5751\u6700\u5bc6\u96c6\u3002<\/strong> FSDP \u914d QLoRA \u62a5 <code>CUDA error: invalid argument<\/code>\uff08#2409\uff09\uff1bDeepSpeed \u914d activation offloading \u4e4b\u540e\u4fdd\u5b58\u7684\u6743\u91cd key \u662f\u9519\u7684\uff08#3166\uff0c\u8fd9\u4e2a\u6700\u9634\uff0c\u8bad\u7ec3\u4e00\u5207\u6b63\u5e38\uff0c\u5b58\u4e0b\u6765\u7684\u6743\u91cd\u5374\u4e0d\u80fd\u7528\uff09\uff1bDeepSpeed ZeRO-1 \u65ad\u70b9\u7eed\u8bad\u5931\u8d25\uff08#2634\uff09\uff1b\u5f00\u548c\u4e0d\u5f00 flash_attention \u8bad\u7ec3 loss \u5bf9\u4e0d\u4e0a\uff08#1918\uff09\u3002\u5355\u5361 LoRA \u57fa\u672c\u4e0d\u78b0\u8fd9\u4e9b\uff0c\u4e00\u4e0a\u591a\u5361\u7ec4\u5408\u62f3\uff0c\u5751\u5c31\u5192\u5934\u4e86\u2014\u2014\u7b2c\u4e09\u65b9\u4f5c\u8005\u7684\u603b\u7ed3\u5f88\u5230\u4f4d\uff1a&#8221;\u5b83\u5728\u590d\u6742\u5ea6\u4e0a\u7ffb\u8f66&#8221;\u3002<\/p>\n<p><strong>\u4f7f\u7528\u5c42\u9762\u7684\u5751\u3002<\/strong> \u7ffb\u7b2c\u4e09\u65b9\u6587\u7ae0\u548c\u793e\u533a\u8ba8\u8bba\uff0c\u88ab\u53cd\u590d\u63d0\u5230\u7684\u662f\u8fd9\u51e0\u6761\uff1a\u8bad\u7ec3\u548c\u4e0a\u7ebf\u8981\u7528\u540c\u4e00\u4e2a\u5bf9\u8bdd\u6a21\u677f\uff0c\u4e0d\u7136\u8bad\u7ec3\u65f6\u5bf9\u7b54\u5982\u6d41\u3001\u4e0a\u7ebf\u540e\u8bed\u65e0\u4f26\u6b21\uff1b\u57fa\u5ea7\u6a21\u578b\u5e38\u5e38\u6ca1\u6709 pad token\uff0c\u6309\u793a\u4f8b\u914d\u7f6e\u628a <code>special_tokens<\/code> \u5199\u4e0a\uff1b\u6539\u4e86\u6570\u636e\u96c6\u4f46 <code>dataset_prepared_path<\/code> \u6ca1\u52a8\uff0c\u8bfb\u5230\u7684\u8fd8\u662f\u65e7\u7f13\u5b58\uff0c\u767d\u8bad\u4e00\u573a\u2014\u2014\u6700\u540e\u8fd9\u6761\u6211\u770b\u7740\u90fd\u89c9\u5f97\u75bc\u3002\u8fd8\u6709\u4e00\u6761\u6700\u5bb9\u6613\u88ab\u8f7b\u89c6\uff1a\u7248\u672c\u4e0d\u9501\u5b9a\u3002\u540c\u4e00\u4efd YAML\uff0c\u6846\u67b6\u6216\u4e0a\u6e38\u5e93\u5347\u7ea7\u540e\u9ed8\u8ba4\u503c\u4e00\u53d8\uff0c\u7ed3\u679c\u5c31\u6f02\u4e86\uff0c\u5b98\u65b9\u793a\u4f8b\u91cc\u90a3\u4e9b\u4e00\u773c\u770b\u8fc7\u53bb&#8221;\u591a\u4f59&#8221;\u7684\u663e\u5f0f\u914d\u7f6e\u9879\uff0c\u5f88\u591a\u5c31\u662f\u9632\u6b62\u8fd9\u79cd\u6f02\u79fb\u3002\u987a\u624b\u63d0\u4e00\u53e5\u663e\u5b58\u7684\u524d\u6cbf\u63a2\u7d22\uff1a\u4ed3\u5e93\u91cc\u6709\u4e2a 11 \u6761\u8ba8\u8bba\u7684\u63d0\u8bae\uff08#3787\uff09\uff0c\u601d\u8def\u662f\u628a\u91cf\u5316 MoE \u7684\u51bb\u7ed3\u4e13\u5bb6\u6309\u9700\u4ece CPU \u642c\u8fd0\uff0c\u53f7\u79f0 30B-A3B \u7684 QLoRA \u80fd\u538b\u8fdb 7GB \u663e\u5b58\u2014\u2014\u8fd8\u6ca1\u5408\u8fdb\u53bb\uff0c\u4f46\u65b9\u5411\u80fd\u770b\u51fa\u8fd9\u4e2a\u793e\u533a\u5728\u8ddf\u663e\u5b58\u6b7b\u78d5\u3002<\/p>\n<p>\u516c\u5f00\u7684\u4e2d\u6587\u793e\u533a\u8ba8\u8bba\u4e0d\u7b97\u591a\uff0cReddit \u548c Hacker News \u4e0a\u6709\u96f6\u661f\u4f7f\u7528\u5206\u4eab\uff0c\u8bc4\u4ef7\u4e24\u6781\uff1a\u5de5\u7a0b\u80cc\u666f\u7684\u4eba\u5938\u5b83&#8221;\u914d\u7f6e\u5373\u6587\u6863&#8221;\uff0c\u4e60\u60ef\u4ea4\u4e92\u5f0f\u73af\u5883\u7684\u4eba\u5acc\u5b83&#8221;\u4e00\u5207\u90fd\u662f\u7ec8\u7aef&#8221;\u3002\u8fd9\u4e2a\u5206\u5e03\u548c\u6211\u770b\u5b8c\u4ee3\u7801\u7ed3\u6784\u540e\u7684\u76f4\u89c9\u4e00\u81f4\u3002<\/p>\n<h2 id=\"_5\">\u6211\u6700\u540e\u7684\u5224\u65ad<\/h2>\n<p>\u503c\u4e0d\u503c\u5f97\u4e0a\u624b\uff0c\u53d6\u51b3\u4e8e\u4f60\u7ad9\u5728\u54ea\u3002<\/p>\n<p>\u4f60\u7684\u573a\u666f\u662f\u591a\u5361\u3001\u591a\u5b9e\u9a8c\u3001\u8981\u53ef\u590d\u73b0\u2014\u2014\u6bd4\u5982\u56e2\u961f\u91cc\u8981\u8dd1\u51e0\u5341\u7ec4\u5bf9\u6bd4\u5b9e\u9a8c\u3001\u6216\u8005\u8981\u7ed9 30B \u4ee5\u4e0a\u7684\u6a21\u578b\u505a\u5168\u53c2\u6570\u5fae\u8c03\u2014\u2014Axolotl \u5728\u5f00\u6e90\u91cc\u51e0\u4e4e\u6ca1\u6709\u5bf9\u624b\uff0c\u90a3\u5f20 N \u7ef4\u5e76\u884c\u7684\u7ec4\u5408\u77e9\u9635\u5c31\u662f\u62a4\u57ce\u6cb3\uff0cYAML \u5373\u5b9e\u9a8c\u8bb0\u5f55\u7684\u4e60\u60ef\u4e00\u65e6\u517b\u6210\u5c31\u56de\u4e0d\u53bb\u4e86\u3002\u53cd\u8fc7\u6765\uff0c\u4f60\u5c31\u662f\u4e00\u5f20 24GB \u5361\u60f3\u5feb\u70b9\u7ec3\u4e2a 7B \u7684 QLoRA\uff0c\u9009 <strong>unsloth<\/strong>\uff0c\u5355\u5361\u901f\u5ea6\u5b9e\u6d4b\u5feb\u4e24\u500d\u4ee5\u4e0a\uff08\u7b2c\u4e09\u65b9\u5728 4090 \u4e0a\u8dd1 7B QLoRA \u7684\u6570\u5b57\uff1aunsloth \u6bcf\u79d2 3,400 token \u5bf9 Axolotl \u7684 1,500\uff0c\u663e\u5b58 11GB \u5bf9 16GB\uff09\uff0c\u4ee3\u4ef7\u662f\u6a21\u578b\u8986\u76d6\u9762\u7a84\u3001\u591a\u5361\u652f\u6301\u534a\u6b8b\uff1b\u4f60\u60f3\u8981\u56fe\u5f62\u754c\u9762\u3001\u4e2d\u6587\u6587\u6863\u987a\u624b\u3001\u56e2\u961f\u91cc\u6709\u4eba\u4e0d\u5199\u4ee3\u7801\u4e5f\u8981\u70b9\u4e24\u4e0b\u5c31\u51fa\u6a21\u578b\uff0c\u9009 <strong>LlamaFactory<\/strong>\uff0cWeb UI \u5168\u6d41\u7a0b\u96f6\u4ee3\u7801\uff0c\u4f46\u5206\u5e03\u5f0f\u7684\u6df1\u5ea6\u548c\u914d\u7f6e\u7684\u7cbe\u7ec6\u5ea6\u4e0d\u5982 Axolotl\u3002\u4e09\u4e2a\u90fd\u662f Apache-2.0\uff0c\u5207\u6362\u6210\u672c\u4f4e\uff0c\u6700\u5fcc\u8bb3\u7684\u662f\u6ca1\u8bd5\u8fc7\u5c31\u4fe1\u4e86\u522b\u4eba\u7684\u7ed3\u8bba\u2014\u2014\u8fd8\u8bb0\u5f97 #3154 \u90a3\u4e2a 18 \u4e2a\u70b9\u7684\u5dee\u8ddd\u5417\u3002<\/p>\n<p>\u4e00\u53e5\u8bdd\u6536\u4e2a\u5c3e\uff1a\u987a\u624b\u53c8\u62c9\u4e86\u4e0b\u5b83\u7684\u4ed3\u5e93\uff0c\u73b0\u5728\u662f 12,686 \u4e2a star\uff0c\u6700\u65b0\u7248 v0.21.1 \u662f 10 \u6708 27 \u65e5\u53d1\u7684\uff0c\u6700\u8fd1\u56db\u5468 124 \u6b21\u63d0\u4ea4\uff0c\u7ef4\u62a4\u70ed\u5ea6\u4e00\u70b9\u6ca1\u964d\u6e29\u3002\u603b\u800c\u8a00\u4e4b\uff0c\u5982\u679c\u54ea\u5929\u6211\u771f\u80fd\u501f\u5230\u4e00\u5f20\u50cf\u6837\u7684 N \u5361\uff0c\u7b2c\u4e00\u4ef6\u4e8b\u5c31\u662f\u628a\u90a3\u4e2a 18 \u4e2a\u70b9\u7684\u5dee\u8ddd\u4eb2\u624b\u590d\u73b0\u4e00\u904d\u2014\u2014\u662f\u914d\u7f6e\u95ee\u9898\u8fd8\u662f\u771f\u6709\u8d28\u91cf\u9e3f\u6c9f\uff0c\u8dd1\u4e00\u6b21\u5c31\u77e5\u9053\u4e86\u3002\u6700\u540e\u8bf4\u53e5\u5b9e\u5728\u7684\uff0c\u5fae\u8c03\u8fd9\u4ef6\u4e8b\uff0c\u5de5\u5177\u53ea\u5360\u4e09\u6210\uff0c\u5269\u4e0b\u4e03\u6210\u5728\u4f60\u90a3\u4efd\u6570\u636e\u5e72\u4e0d\u5e72\u51c0\u3001\u6a21\u677f\u5bf9\u4e0d\u5bf9\u5f97\u4e0a\uff1bAxolotl \u80fd\u628a\u4e09\u6210\u505a\u5230\u6781\u81f4\uff0c\u4f46\u4e03\u6210\u8fd8\u5f97\u81ea\u5df1\u625b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Axolotl \u628a\u6574\u4e2a\u5fae\u8c03\u6d41\u7a0b\u538b\u8fdb\u4e00\u4efd YAML\uff0c\u8bad\u7ec3\u3001\u63a8\u7406\u3001\u5408\u5e76\u6743\u91cd\u540c\u6e90\u53ef\u590d\u73b0\uff0c\u591a\u5361\u5e76\u884c\u662f\u5b83\u771f\u6b63\u7684\u62a4\u57ce\u6cb3\u3002\u4f46\u8fd9\u6c34\u4e0d\u6d45\uff1a\u591a\u5361\u7ec4\u5408\u5751\u5bc6\u96c6\uff0c\u8fd8\u6709\u7528\u6237\u6d4b\u51fa\u540c\u8d85\u53c2\u6bd4 LlamaFactory \u4f4e 18 \u4e2a\u70b9\u7684\u60ac\u6848\u3002\u6211\u628a\u5b89\u88c5\u6587\u6863\u548c\u9ad8\u9891 issue \u7ffb\u5b8c\uff0c\u8d26\u5148\u66ff\u4f60\u7b97\u6e05\u3002<\/p>\n","protected":false},"author":1,"featured_media":10021556,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10021557","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/itmax.cn\/wp-content\/uploads\/2026\/11\/axolotl-cover.png","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10021557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10021557"}],"version-history":[{"count":1,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10021557\/revisions"}],"predecessor-version":[{"id":10021558,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10021557\/revisions\/10021558"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/media\/10021556"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10021557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10021557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10021557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}