【LLM-小模型】TinyLlama:开源的小语言模型

2024年03月25日 由 alex 发表 106 0

简介

几个月前,微软开源了 Orca 小语言模型(SLM)。Orca SLM 令人印象深刻的地方在于,它能以简洁准确的答案进行复杂的推理。


为了实现这一目标,我们通过以下方式创建了细致入微的训练数据,向 LLM 提供错综复杂的提示,设计这些提示的目的是诱发策略性推理模式,从而产生更准确的结果。


此外,在训练阶段,较小的模型会接触到任务和 LLM 的后续输出。LLM 的输出数据定义了 LLM 是如何解决问题的。


但问题是,原始提示不会显示给 SLM。


这种 "删除提示 "的方法是一种将 Orca-2 变为谨慎推理器的技术,因为它不仅能学习如何执行特定的推理步骤,还能在更高的层面上制定如何完成特定任务的策略。


它不是天真地模仿强大的 LLM,而是将 LLM 用作行为库,从中明智地选择适合手头任务的方法。


请看下面给 Orca 安排的推理任务......Orca 确实擅长推理任务。


Solve the following problem by thinking step by step:
John and Mark are in a room with a ball, a basket and a box. 
John puts the ball in the box, then leaves for work. While John is away, 
Mark puts the ball in the basket, and then leaves for school. 
They both come back together later in the day, and they do not know what 
happened in the room after each of them left the room. 
Where do they think the ball is?


还有 Orca 的输出:


To solve this problem step by step, let's analyze the events that occurred while John and Mark were away:

John put the ball in the box before leaving for work.
While John was away, Mark came into the room and placed the ball in the basket.
Both John and Mark left the room without knowing what happened after they put the ball in its respective location.
They both returned to the room together later in the day.
Since neither John nor Mark saw any changes after they put the ball in the box and the basket, they would naturally assume that the ball is still in the location they left it in. In this case, John would think the ball is still in the box, and Mark would think the ball is still in the basket.
As a result, John thinks the ball is in the box, and Mark thinks the ball is in the basket.


返回到 TinyLlama

TinyLlama 是一个小巧的 1.1B 小语言模型 (SLM),在约 1 万亿个词库上进行了约 3 个历时的预训练。


尽管体积相对较小,但 TinyLlama 在一系列下游任务中表现出了不俗的性能。它的性能明显优于规模相当的现有开源语言模型。


19


TinyLlama 能够为移动设备上的最终用户应用提供便利,是探索与语言模型相关的无数创新概念的灵活平台。


如下图所示,我在 LM Studio 中加载了 TinlyLlama 的聊天版本。


此外,当我向 TinyLlama 提出一个相当复杂的推理问题时,它的回答虽然不如 Orca-2 那么好,但也相当令人印象深刻。


20


我们的目标是通过整合广泛的功能来增强 TinyLlama 的功能。这些增强功能将提高其在各种任务中的有效性和适应性。


21


结论

TinyLlama 模型的目的是作为一个多功能平台,在移动设备上实现终端用户应用,并测试与语言模型相关的各种创新想法。


它旨在提供一种轻量级解决方案,可轻松集成到各种应用和场景中,使开发人员能够在自然语言处理任务中探索和尝试不同的方法和功能。


此外,TinyLlama 还将根据开发和使用过程中获得的见解不断改进其功能和性能,以提高其在不同任务和应用中的实用性和通用性。

文章来源:https://medium.com/@cobusgreyling/tinyllama-is-an-open-source-small-language-model-f4a4a45e9605
欢迎关注ATYUN官方公众号
商务合作及内容投稿请联系邮箱:bd@atyun.com
评论 登录
热门职位
Maluuba
20000~40000/月
Cisco
25000~30000/月 深圳市
PilotAILabs
30000~60000/年 深圳市
写评论取消
回复取消