模型简介
模型特点
模型能力
使用案例
🚀 Lucid - AI语言模型
Lucid 是 DreamGen 开发和使用的一系列 AI 语言模型,专注于角色扮演和故事写作能力。

🚀 快速开始
Lucid 模型是否适合你?我不确定。但我知道以下这些信息:
- 专注于角色扮演和故事写作:
- 适合各类作家和角色扮演爱好者:
- 对于想要提前详细设定一切的世界构建者,如情节、背景、写作风格、角色、地点、物品、设定等。
- 对于从宽泛提示开始,在故事或角色扮演展开过程中通过(OCC)指令塑造叙事的直觉型作家。
- 支持多角色角色扮演:
- 模型可以自动在不同角色间切换。
- 支持内联写作指令(OOC):
- 控制情节发展(如说明应该发生什么、角色应该做什么等)。
- 控制节奏等。
- 支持内联写作辅助:
- 规划下一个场景/下一章/故事。
- 推荐新角色等。
- 适合各类作家和角色扮演爱好者:
- 支持推理(可选)。
- 提供详细的 README.md 文档、示例和配置。
如果你感兴趣,请继续阅读!
✨ 主要特性
提示模板
Lucid 提示模板是 Llama 3 模板的扩展,具体扩展如下:
写作方面
- Lucid 提示模板新增了
writer
角色。 - 在故事写作时,
writer
消息头如下:<|start_header_id|>writer<|end_header_id|>
。 - 在角色扮演时,
writer
消息头根据消息是来自角色还是叙述者而有所不同:- 对于角色消息:
<|start_header_id|>writer character {{character_name}}<|end_header_id|>
,其中{{character_name}}
为实际角色名称。 - 对于叙述者消息:
<|start_header_id|>writer narrative<|end_header_id|>
。 - 模型经过训练以预测作者头,这意味着你可以让它一次性生成多条消息,并且它会自然地在角色和叙述之间切换。
- 对于角色消息:
需要注意的事项:
- 你可能会有这样的角色序列:
system
->writer character Jon
->writer character Amy
->user
->assistant
->writer narration
-> ... - 当为特定角色(如 Jon Doe)发送消息时,包括用户角色,应使用
writer character Jon Doe
。 - 当向模型提供一些(OOC)指令时,应使用
user
。
推理方面
- Lucid 提示模板为推理新增了 2 个标记:
<|reasoning_start|>
和<|reasoning_end|>
。 - 推理是可选的,你应在系统提示或用户提示中加入
Think deeply before answering.
(或类似内容)以启用它。
角色扮演与故事写作
快速总结:
system
用于为故事或角色扮演设定场景(如情节、背景、写作风格、角色描述等)。writer
用于故事或角色扮演的内容。user
用于(OOC)指令,如故事应如何发展等。assistant
用于提供写作辅助,如规划下一个场景、推荐新角色等。
需要注意的事项:
- 你可能会有这样的角色序列:
system
->writer character Jon
->writer character Amy
->user
->assistant
->writer narration
-> ... - 当为特定角色(如 Jon Doe)发送消息时,包括用户角色,应使用
writer character Jon Doe
。 - 当向模型提供一些(OOC)指令时,应使用
user
。
采样参数
本 README 中的示例使用了以下参数:
- 写作时温度为 0.8,辅助任务时温度为 0.6。
- 最小概率(Min P)为 0.05。
- DRY 乘数为 0.8,基数为 1.75。
- 所有其他采样器保持中立(无重复、存在或频率惩罚)。
SillyTavern 支持
SillyTavern 是一个很棒的本地前端,主要适用于 1:1 角色扮演,但也可用于故事写作。以下是两者的基本预设及一些示例。
角色扮演
从 这个主预设 开始。
- 观看 这个演示视频 以了解其实际效果(imgur 链接)。
- 使用
/sys
向模型发送(OOC)指令。 - 如果你想添加用户消息而不立即触发响应,可以使用
/send
。这在你想发送用户消息后再发送指令时很有用。
故事写作
警告:这适用于熟悉非传统 SillyTavern 体验且愿意创建或编辑自己卡片的高级用户。
虽然大多数人认为 SillyTavern 主要是一个 AI 角色/AI 角色扮演前端,但它在故事写作方面也出人意料地出色。
从 这个主预设 开始。
- 观看 这个演示视频 以了解其实际效果(imgur 链接)。
- 常规的
{{user}}
和{{char}}
消息都被视为故事的一部分(<|start_header_id|>writer<|end_header_id|>
)。 - 使用
/sys
向模型发送(OOC)指令。 - 使用
/continue
让模型继续写作。 - 要制作故事卡片:
DreamGen 网页应用(免费)
本 README 中的大多数截图来自 DreamGen 网页应用。它具有故事写作和角色扮演模式,你可以免费使用 Lucid 模型(有一些限制),包括 Lucid Base(基于 12B Nemo)和 Lucid Chonker(基于 70B Llama)。
DreamGen 的独特之处在于:
- 多角色场景作为一等公民支持。
- 故事写作和角色扮演模式。
- 原生支持内联指令。
- 原生支持内联写作辅助。
你可以免费使用 DreamGen,包括此模型和其他模型。
📦 安装指南
使用本地 API
你有几种在本地运行模型的选项,但请确保你的后端配置为不跳过输出中的特殊标记。
- kobold.cpp
- llama.cpp
确保在服务器命令中传递
--special
,以便服务器不会跳过输出中的特殊标记。 例如:llama-server --hf-repo dreamgen/lucid-v1-nemo-GGUF --hf-file lucid-v1-nemo-q8_0.gguf --special -c 8192
- exllamav2
- vLLM
使用 DreamGen API(免费)
如果你有 DreamGen 账户,可以通过 DreamGen API 使用 Lucid 模型。DreamGen API 不会存储或记录任何输入或输出。 (1) 创建 DreamGen 账户 前往 DreamGen 创建账户:
(2) 创建 DreamGen API 密钥 前往 API 密钥页面 创建 API 密钥。
(3) 连接到 API
选择 lucid-v1-medium/text
(对应基于 Mistral Nemo 12B 的模型)或 lucid-v1-extra-large/text
(对应基于 Llama 70B 的模型)。
💻 使用示例
基础用法
提示模板示例
<|start_header_id|>system<|end_header_id|>
You are a reliable, general-purpose AI assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>
Why is the sky blue?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
The sky appears blue due to a phenomenon called **Rayleigh scattering**, a type of light scattering caused by tiny particles in the atmosphere. Here's a simplified breakdown:
...
推理示例
<|start_header_id|>system<|end_header_id|>
You are a reliable, general-purpose AI assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>
Why is the sky blue?
Think deeply before answering.<|eot_id|><|start_header_id|>assistant<|end_header_id|>
<|reasoning_start|>Okay, so I need to figure out why the sky is blue. Let me start by recalling what I know...
...<|reasoning_end|>The sky appears blue due to a phenomenon called **Rayleigh scattering**. Here's a concise breakdown:
...
高级用法
控制响应长度示例
短响应:
## Writing Style
The story is written from a second-person perspective from the point of view of Yuki Kagami. All role-play messages are short, at most 20 words.
长响应:
## Writing Style
The story is written from a second-person perspective from the point of view of Yuki Kagami. Each message from Ryomen Sukuna is at least 100 words long.
控制情节发展示例
Write the next scene. It should be 100 words long. Ethan uses google to find some cryptozoologists. He goes over several candidates and decides to call one of them.
提供详细指令示例
Write the next scene:
- Sukuna presses against Yuki, pinning them against the temple wall.
- Yuki uses his power to disappear the wall, evading Sukuna.
- Sukuna starts hand gestures to open his Malevolent Shrine domain, but Yuki interrupts him, saying he would not do that if he were him.
写作辅助示例
<|start_header_id|>user<|end_header_id|>
Provide an outline for the next scene.<|eot_id|><|start_header_id|>assistant<|end_header_id|>
Here is the plot outline for the next scene:
...<|eot_id|>
🔧 技术细节
模型训练详情
该模型在 Mistral Nemo 12B(基础模型)上进行了(全参数)微调:
- 示例长度可达 32K 标记。
- 有效批量大小为 100 万标记。
- 优化器:AdamW(8 位)。
- 学习率:0.00000125。
- 权重衰减:0.05。
- 最大梯度范数:1.0。
📄 许可证
此 AI 模型仅许可用于个人非商业用途。你拥有并负责使用该模型生成的文本。
如果你有其他需求,请联系:x@dreamgen.com



