Selecting Large Language Model to Fine-tune via Rectified Scaling Law

828 篇文章

已下架不支持订阅

本文探讨了在资源有限的情况下,如何利用修正的缩放定律选择最佳的大型语言模型(LLM)进行微调。研究发现微调过程中的标度曲线存在‘预功率阶段’,这是现有标度定律未涵盖的。通过引入‘预先学习的数据大小’,提出的修正定律能更好地预测微调性能。由此,作者提出了一种新算法,以较低成本选择接近最优的LLM,提高了微调效率。

本文是LLM系列文章,针对《Selecting Large Language Model to Fine-tune via Rectified Scaling Law》的翻译。

摘要

LLM不断增长的生态系统在众多选择中选择最合适的预训练模型进行微调方面提出了挑战。在资源有限的情况下,对所有模型进行微调并在之后进行选择是不现实的。在这项工作中,我们将这种资源约束的选择任务公式化为预测微调性能,并说明其与缩放定律的自然联系。与预训练不同,我们发现微调标度曲线不仅包括众所周知的“功率阶段”,还包括以前未观察到的“预功率阶段”。我们还解释了为什么现有的标度定律在理论和经验上都未能捕捉到这种相变现象。为了解决这一问题,我们将“预先学习的数据大小”的概念引入到我们修正的缩放定律中,它克服了理论上的局限性,更适合实验结果。通过利用我们的定律,我们提出了一种新的LLM选择算法,该算法以数百倍的资源消耗来选择接近最优的模型,而其他方法可能提供负相关的选择。

1 引言

2 用于微调的LLM选择框架

3 微调的标度律分析

4 LLM选择

5 相关工作及展望

6 局限性

7 结论

本文主要关注两个领域:探索LLM微调的比例律和解决选择LLM进行有效微调的挑战。我们揭示了传统标度律的不足,并

已下架不支持订阅

### Chain-of-Thought Prompting Mechanism in Large Language Models In large language models, chain-of-thought prompting serves as a method to enhance reasoning capabilities by guiding the model through structured thought processes. This approach involves breaking down complex problems into simpler components and providing step-by-step guidance that mirrors human cognitive processing. The creation of these prompts typically includes selecting examples from training datasets where each example represents part of an overall problem-solving process[^2]. By decomposing tasks into multiple steps, this technique encourages deeper understanding and more accurate predictions compared to traditional methods. For instance, when faced with multi-hop question answering or logical deduction challenges, using such chains allows models not only to generate correct answers but also articulate intermediate thoughts leading up to those conclusions. Such transparency facilitates better interpretability while improving performance on various NLP benchmarks. ```python def create_chain_of_thought_prompt(task_description, examples): """ Creates a chain-of-thought prompt based on given task description and examples. Args: task_description (str): Description of the task at hand. examples (list): List containing tuples of input-output pairs used for demonstration purposes. Returns: str: Formatted string representing the final prompt including both instructions and sample cases. """ formatted_examples = "\n".join([f"Input: {ex[0]}, Output: {ex[1]}" for ex in examples]) return f""" Task: {task_description} Examples: {formatted_examples} Now try solving similar questions following above pattern. """ # Example usage examples = [ ("What color do you get mixing red and blue?", "Purple"), ("If it rains tomorrow, will we have our picnic?", "No") ] print(create_chain_of_thought_prompt("Solve logic puzzles", examples)) ```
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

UnknownBody

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值