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