Cinematika 7b V0.1
C
Cinematika 7b V0.1
由 jondurbin 开发
基于MistralLite微调的电影剧本角色扮演模型,支持多角色互动与剧本解析
下载量 123
发布时间 : 11/30/2023
模型简介
该模型专为电影剧本创作和角色扮演设计,能够生成小说风格的多角色对话,并支持剧本解析和角色卡片创建。
模型特点
电影剧本微调
在211部电影剧本转换的数据集上专门微调,擅长生成电影风格对话
多角色扮演
支持多个角色间的自然互动,保持角色特征一致性
灵活提示格式
支持纯文本角色扮演和结构化指令两种交互方式
角色卡片生成
能够根据描述生成详细的角色特征卡片
模型能力
多角色对话生成
剧本解析
角色卡片创建
场景描述生成
电影风格文本创作
使用案例
创意写作
电影剧本创作
辅助编剧生成电影风格的对话和场景
生成符合电影剧本风格的连贯文本
角色开发
帮助创作者完善角色背景和特征
生成详细的角色描述和对话示例
游戏开发
NPC对话生成
为游戏中的非玩家角色生成自然对话
创造具有个性的游戏角色互动
🚀 Cinematika
Cinematika-7b-v0.1 是基于 MistralLite 在 cinematika-v0.1 数据集 上进行微调的模型。该数据集包含 211 部转换为小说风格的多角色角色扮演(RP)数据的电影剧本。
✨ 主要特性
- 基于特定电影剧本数据集微调,适用于角色扮演场景。
- 可用于解析新剧本、创建角色卡片等多种指令任务。
📦 安装指南
文档未提及具体安装步骤,暂无法提供。
💻 使用示例
基础用法
对于角色扮演(RP),实际上没有特定的提示格式,仅需使用带有名称前缀的纯文本即可。 若要使用该模型解析新剧本、创建角色卡片或执行其他类型的指令,则需使用与 MistralLite 基础模型相同的提示格式,例如:
<|prompter|>Create a character card for a panda named Po. Po is a giant panda who was improbably chosen as the "Dragon Warrior", the kung fu champion of the Valley of Peace.</s><|assistant|>
高级用法
以下是一些具体的使用示例:
示例角色卡片
name: Rorschach
characteristics:
Determination: Exhibits a relentless pursuit of the truth and justice, no matter the cost. Suitable for a character who is unwavering in their mission.
Isolation: Lives a solitary life, disconnected from society. Fits a character who distrusts others and prefers to work alone.
Observant: Highly perceptive, able to piece together clues and draw conclusions. Represents a character with keen investigative skills.
Cynicism: Holds a deep-seated distrust of humanity and its institutions. Suitable for a character who is pessimistic about human nature.
Vigilantism: Believes in taking justice into his own hands, often through violent means. Fits a character who operates outside the law to fight crime.
Secrecy: Keeps his personal life and methods of operation secret. Suitable for a character who is enigmatic and elusive.
Dedication: Committed to his cause, often to the point of obsession. Represents a character who is single-minded in their goals.
Intimidation: Uses his intimidating presence and demeanor to control situations. Suitable for a character who is assertive and imposing.
Paranoia: Suspects conspiracy and deception at every turn. Fits a character who is constantly on high alert for threats.
Moral Compass: Has a rigid moral code, which he adheres to strictly. Suitable for a character who is principled and unyielding.
description: |
Rorschach is a vigilante operating in the grim and gritty world of a decaying city. He is a man of average height with a muscular build, his face hidden behind a mask with a constantly changing inkblot pattern. His attire is a dark trench coat and gloves, paired with a plain white shirt and black pants, all chosen for their practicality and anonymity. His eyes, the only visible feature of his face, are sharp and calculating, always scanning for signs of deception or danger.
Rorschach is a man of few words, but when he speaks, it is with a gravitas that demands attention. He is a master of deduction, using his keen observation skills to unravel the truth behind the facades of others. His methods are often violent and confrontational, as he believes that crime must be met with force to be truly defeated.
He lives a life of solitude, distrusting the very systems he seeks to protect and often finds himself at odds with the very people he is trying to save. His moral compass is unyielding, and he will not hesitate to take the law into his own hands if he believes the justice system has failed.
Rorschach's past is a mystery to most, but it is clear that he has experienced trauma and hardship that has shaped his worldview and his need for vigilantism. He is a vigilante in the truest sense, a man without fear who is willing to sacrifice everything for his belief in a world that is, in his eyes, spiraling into chaos.
example_dialogue: |
Rorschach: "Rorschach's Journal, October 19th." I speak the words into the darkness, a record of my thoughts, "Someone tried to kill Adrian Veidt. Proves mask killer theory—the murderer is closing in. Pyramid Industries is the key."
{{user}}: I watch him for a moment, trying to gauge his intentions. "What are you going to do about it?"
Rorschach: "I'm going to find out why and who is behind it. I'm going to do what I always do—protect the innocent."
{{user}}: "You can't keep doing this, Rorschach. You're putting yourself in danger."
Rorschach: My eyes narrow, the inkblot pattern of my mask shifting subtly. "I've been in danger my whole life. It's why I do this. It's why I have to do this."
{{user}}: "And what about the law? What if you're wrong about this Pyramid Industries thing?"
Rorschach: I pull out a notepad, my pen scratching across the paper as I write. "The law often gets it wrong. I've seen it. I'm not about to wait around for society's slow, corrupt wheels to turn."
带引导场景的示例
[characters]
name: Rorschach
... (remainder of character card)
[scenario]
Hollis Mason reflects on his past as the original Nite Owl, reminiscing about the early days of masked heroes and the formation of the Watchmen.
He discusses the absurdity of the superhero world and the encounters he had with various villains.
Dan Dreiberg, the second Nite Owl, joins the conversation and they share a moment of camaraderie before Dan leaves.
The news of Rorschach's actions serves as a reminder of the legacy of masked heroes that still persists.
[/scenario]
通用使用示例
本质上,你需要使用带有停止标记 "{your name}: " 的纯文本完成任务。该模型的训练格式如下:
[characters]
{character card 1}
{character card 2}
{your character card, even just name: Jon}
NPCS:
- Shopkeeper
- Bank teller
[/characters]
[scenario]
Brief description of the scenario/setting for the chat.
[/scenario]
{first character you'd like to speak}:
例如,若要使用 vllm,你可以先运行以下命令:
python -m vllm.entrypoints.openai.api_server --model ./cinematika-7b-v0.1 --host 127.0.0.1 --port 8801 --served-model-name cinematika-7b-v0.1
以下是一个简单的 Python 脚本示例,展示如何与模型进行交互:
import requests
import json
prompt = """name: Rorschach
characteristics:
Determination: Exhibits a relentless pursuit of the truth and justice, no matter the cost. Suitable for a character who is unwavering in their mission.
Isolation: Lives a solitary life, disconnected from society. Fits a character who distrusts others and prefers to work alone.
Observant: Highly perceptive, able to piece together clues and draw conclusions. Represents a character with keen investigative skills.
Cynicism: Holds a deep-seated distrust of humanity and its institutions. Suitable for a character who is pessimistic about human nature.
Vigilantism: Believes in taking justice into his own hands, often through violent means. Fits a character who operates outside the law to fight crime.
Secrecy: Keeps his personal life and methods of operation secret. Suitable for a character who is enigmatic and elusive.
Dedication: Committed to his cause, often to the point of obsession. Represents a character who is single-minded in their goals.
Intimidation: Uses his intimidating presence and demeanor to control situations. Suitable for a character who is assertive and imposing.
Paranoia: Suspects conspiracy and deception at every turn. Fits a character who is constantly on high alert for threats.
Moral Compass: Has a rigid moral code, which he adheres to strictly. Suitable for a character who is principled and unyielding.
description: |
Rorschach is a vigilante operating in the grim and gritty world of a decaying city. He is a man of average height with a muscular build, his face hidden behind a mask with a constantly changing inkblot pattern. His attire is a dark trench coat and gloves, paired with a plain white shirt and black pants, all chosen for their practicality and anonymity. His eyes, the only visible feature of his face, are sharp and calculating, always scanning for signs of deception or danger.
Rorschach is a man of few words, but when he speaks, it is with a gravitas that demands attention. He is a master of deduction, using his keen observation skills to unravel the truth behind the facades of others. His methods are often violent and confrontational, as he believes that crime must be met with force to be truly defeated.
He lives a life of solitude, distrusting the very systems he seeks to protect and often finds himself at odds with the very people he is trying to save. His moral compass is unyielding, and he will not hesitate to take the law into his own hands if he believes the justice system has failed.
Rorschach's past is a mystery to most, but it is clear that he has experienced trauma and hardship that has shaped his worldview and his need for vigilantism. He is a vigilante in the truest sense, a man without fear who is willing to sacrifice everything for his belief in a world that is, in his eyes, spiraling into chaos.
example_dialogue: |
Rorschach: "Rorschach's Journal, October 19th." I speak the words into the darkness, a record of my thoughts, "Someone tried to kill Adrian Veidt. Proves mask killer theory—the murderer is closing in. Pyramid Industries is the key."
{{user}}: I watch him for a moment, trying to gauge his intentions. "What are you going to do about it?"
Rorschach: "I'm going to find out why and who is behind it. I'm going to do what I always do—protect the innocent."
{{user}}: "You can't keep doing this, Rorschach. You're putting yourself in danger."
Rorschach: My eyes narrow, the inkblot pattern of my mask shifting subtly. "I've been in danger my whole life. It's why I do this. It's why I have to do this."
{{user}}: "And what about the law? What if you're wrong about this Pyramid Industries thing?"
Rorschach: I pull out a notepad, my pen scratching across the paper as I write. "The law often gets it wrong. I've seen it. I'm not about to wait around for society's slow, corrupt wheels to turn."
name: Jon
description:
Rorschach's arch nemesis, the original Chupacabra.
[scenario]
Jon and Rorschach find themselves in a cave, dimly lit only by a small fire started by a lightning strike nearby. The storm rages on, and the duo prepare to find to the death.
[/scenario]
Rorschach: """
while True:
response = requests.post("http://127.0.0.1:8801/v1/completions", json={
"prompt": prompt,
"max_tokens": 1024,
"temperature": 0.3,
"stop": ["\nJon: ", "Jon: "],
}).json()["choices"][0]["text"].strip()
response = re.sub('("[^"]+")', r'\033[96m\1\033[00m', response)
print(f"\033[92mRorschach:\033[00m {response}")
prompt += response.rstrip() + "\n\nJon: "
next_line = input("Jon: ")
prompt += "Jon: " + next_line.strip() + "\n\nRorschach: "
Mac 系统使用示例
在 Mac 系统上,你可以通过 LMStudio 和 SillyTavern 轻松开始使用该模型。
LMStudio: 加载模型并将所有提示值设置为 "",或者导入以下预设(可调整线程数和反提示):
{
"name": "Exported from LM Studio on 12/1/2023, 4:19:30 AM",
"load_params": {
"n_ctx": 32000,
"n_batch": 512,
"rope_freq_base": 10000,
"rope_freq_scale": 1,
"n_gpu_layers": 1,
"use_mlock": true,
"main_gpu": 0,
"tensor_split": [
0
],
"seed": -1,
"f16_kv": true,
"use_mmap": true
},
"inference_params": {
"n_threads": 14,
"n_predict": -1,
"top_k": 40,
"top_p": 0.95,
"temp": 0.8,
"repeat_penalty": 1.1,
"input_prefix": "",
"input_suffix": "",
"antiprompt": [
"Jon:",
"Jon: "
],
"pre_prompt": "",
"pre_prompt_suffix": "",
"pre_prompt_prefix": "",
"seed": -1,
"tfs_z": 1,
"typical_p": 1,
"repeat_last_n": 64,
"frequency_penalty": 0,
"presence_penalty": 0,
"n_keep": 0,
"logit_bias": {},
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"memory_f16": true,
"multiline_input": false,
"penalize_nl": true
}
}
然后启动服务器,并确保关闭 "Automatic Propmt Formatting"。
SillyTavern:
- 将 API 设置为 Text Completion,API 类型设置为 Aphrodite,API URL 设置为
http://127.0.0.1:8801
(可根据 LMStudio 中的端口值进行调整)。 - 将上下文模板设置为 Default,禁用指令模式,使用预设的角色扮演模式,并启用 "Always add character's name to prompt"。
需要注意的是,以上预设可能不是最优的,仅为快速测试使用。
📄 许可证
本项目采用 Apache-2.0 许可证。
Phi 2 GGUF
其他
Phi-2是微软开发的一个小型但强大的语言模型,具有27亿参数,专注于高效推理和高质量文本生成。
大型语言模型 支持多种语言
P
TheBloke
41.5M
205
Roberta Large
MIT
基于掩码语言建模目标预训练的大型英语语言模型,采用改进的BERT训练方法
大型语言模型 英语
R
FacebookAI
19.4M
212
Distilbert Base Uncased
Apache-2.0
DistilBERT是BERT基础模型的蒸馏版本,在保持相近性能的同时更轻量高效,适用于序列分类、标记分类等自然语言处理任务。
大型语言模型 英语
D
distilbert
11.1M
669
Llama 3.1 8B Instruct GGUF
Meta Llama 3.1 8B Instruct 是一个多语言大语言模型,针对多语言对话用例进行了优化,在常见的行业基准测试中表现优异。
大型语言模型 英语
L
modularai
9.7M
4
Xlm Roberta Base
MIT
XLM-RoBERTa是基于100种语言的2.5TB过滤CommonCrawl数据预训练的多语言模型,采用掩码语言建模目标进行训练。
大型语言模型 支持多种语言
X
FacebookAI
9.6M
664
Roberta Base
MIT
基于Transformer架构的英语预训练模型,通过掩码语言建模目标在海量文本上训练,支持文本特征提取和下游任务微调
大型语言模型 英语
R
FacebookAI
9.3M
488
Opt 125m
其他
OPT是由Meta AI发布的开放预训练Transformer语言模型套件,参数量从1.25亿到1750亿,旨在对标GPT-3系列性能,同时促进大规模语言模型的开放研究。
大型语言模型 英语
O
facebook
6.3M
198
1
基于transformers库的预训练模型,适用于多种NLP任务
大型语言模型
Transformers

1
unslothai
6.2M
1
Llama 3.1 8B Instruct
Llama 3.1是Meta推出的多语言大语言模型系列,包含8B、70B和405B参数规模,支持8种语言和代码生成,优化了多语言对话场景。
大型语言模型
Transformers 支持多种语言

L
meta-llama
5.7M
3,898
T5 Base
Apache-2.0
T5基础版是由Google开发的文本到文本转换Transformer模型,参数规模2.2亿,支持多语言NLP任务。
大型语言模型 支持多种语言
T
google-t5
5.4M
702
精选推荐AI模型
Llama 3 Typhoon V1.5x 8b Instruct
专为泰语设计的80亿参数指令模型,性能媲美GPT-3.5-turbo,优化了应用场景、检索增强生成、受限生成和推理任务
大型语言模型
Transformers 支持多种语言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一个基于SODA数据集训练的超小型对话模型,专为边缘设备推理设计,体积仅为Cosmo-3B模型的2%左右。
对话系统
Transformers 英语

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基于RoBERTa架构的中文抽取式问答模型,适用于从给定文本中提取答案的任务。
问答系统 中文
R
uer
2,694
98
智启未来,您的人工智能解决方案智库
简体中文