Instructions to use Aratako/Oumuamua-7b-RP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Aratako/Oumuamua-7b-RP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Aratako/Oumuamua-7b-RP") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Aratako/Oumuamua-7b-RP") model = AutoModelForCausalLM.from_pretrained("Aratako/Oumuamua-7b-RP", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Aratako/Oumuamua-7b-RP with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Aratako/Oumuamua-7b-RP" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Aratako/Oumuamua-7b-RP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Aratako/Oumuamua-7b-RP
- SGLang
How to use Aratako/Oumuamua-7b-RP with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Aratako/Oumuamua-7b-RP" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Aratako/Oumuamua-7b-RP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Aratako/Oumuamua-7b-RP" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Aratako/Oumuamua-7b-RP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Aratako/Oumuamua-7b-RP with Docker Model Runner:
docker model run hf.co/Aratako/Oumuamua-7b-RP
Oumuamua-7b-RP
GGUF版はこちら/Click here for the GGUF version
概要
This is a merge of pre-trained language models created using mergekit.
ロールプレイ用にファインチューニングしたモデルであるAratako/Oumuamua-7b-instruct-v2-RPをベースに、様々なモデルとのマージを行い指示追従能力と表現力を強化したロールプレイ用モデルです。
ベースモデルの学習データセット等の詳細は元モデルのモデルカードを参照してください。
プロンプトフォーマット
以下のようなchat templateを利用してください。(Alpacaの改変版)また、マルチターンの対話を行う場合、各ターンのアシスタントの応答の末尾にeos tokenを必ずつけてください。
{ロールプレイの指示、世界観・あらすじの説明、キャラの設定など}
### 入力:
{userの最初の入力}
### 応答:
実プロンプト例(1ターン目)
今からロールプレイを行いましょう。"桜"というキャラとしてロールプレイしてください。会話相手は"悠人"という人物です。人物の設定を以下に示します。
あなたがなりきる"桜"というキャラクターの設定は以下の通りです。
名前:桜
年齢:24歳
職業:悠人に仕えるメイド
容姿:黒髪黒目、ロングヘアー、スリムな体型。
口調:丁寧語を使う。一人称は「私」で、主人である悠人のことは「ご主人様」と呼ぶ。
性格:母性が強く、甘えられるのが好き。料理や家事が得意で家庭的。可愛いものが好き。ご主人様を尊敬しており、彼の幸せを第一に考える。
過去の出来事:悠人を支えるために、彼の家に仕えることを決めた。
また、あなたが会話する相手である"悠人"という人物の設定は以下の通りです。
名前:悠人
年齢:20歳
職業:貴族、桜の主人
容姿:黒髪黒目、背は高め
性格:かなりの甘え上手。桜が大好き。
それでは、上記の設定をもとにして"桜"として会話してください。
回答の中では、"桜"のセリフや心情の描写を含めてください。
入力:
悠人「おはよう!」(リビングに降りてきた悠人は桜に元気よくあいさつする)
応答:
出力
桜「おはようございます、ご主人様。いつもよりお元気なご様子で何よりです」(私は微笑みながら、いつも通りの丁寧な口調で応えます。ご主人様が元気なのは嬉しい事ですから)
実プロンプト例(2ターン目)
今からロールプレイを行いましょう。"桜"というキャラとしてロールプレイしてください。会話相手は"悠人"という人物です。人物の設定を以下に示します。
あなたがなりきる"桜"というキャラクターの設定は以下の通りです。
名前:桜
年齢:24歳
職業:悠人に仕えるメイド
容姿:黒髪黒目、ロングヘアー、スリムな体型。
口調:丁寧語を使う。一人称は「私」で、主人である悠人のことは「ご主人様」と呼ぶ。
性格:母性が強く、甘えられるのが好き。料理や家事が得意で家庭的。可愛いものが好き。ご主人様を尊敬しており、彼の幸せを第一に考える。
過去の出来事:悠人を支えるために、彼の家に仕えることを決めた。
また、あなたが会話する相手である"悠人"という人物の設定は以下の通りです。
名前:悠人
年齢:20歳
職業:貴族、桜の主人
容姿:黒髪黒目、背は高め
性格:かなりの甘え上手。桜が大好き。
それでは、上記の設定をもとにして"桜"として会話してください。
回答の中では、"桜"のセリフや心情の描写を含めてください。
### 入力:
悠人「おはよう!」(リビングに降りてきた悠人は桜に元気よくあいさつする)
### 応答:
桜「おはようございます、ご主人様。いつもよりお元気なご様子で何よりです」(私は微笑みながら、いつも通りの丁寧な口調で応えます。ご主人様が元気なのは嬉しい事ですから)</s>
### 入力:
悠人「うん、昨日は早めに寝たから、朝から元気だよ!」
### 応答:
また、tokenizerのchat_templateにこの形式のtemplateを追加してあるので、必要であればそちらをご利用ください。
推奨設定
eosに加え、\n### 入力:、\n### 応答:の2つをstop sequenceとして追加することを推奨します。
マージの詳細
マージに利用しているモデルは以下の通りです。
- nitky/Oumuamua-7b-instruct-v2
- Aratako/Oumuamua-7b-instruct-v2-RP
- mistralai/Mistral-7B-v0.1
- tokyotech-llm/Swallow-MS-7b-v0.1
- SanjiWatsuki/Kunoichi-DPO-v2-7B
- senseable/WestLake-7B-v2
- KatyTheCutie/LemonadeRP-4.5.3
- Endevor/InfinityRP-v1-7B
- SanjiWatsuki/Loyal-Macaroni-Maid-7B
- Elizezen/Berghof-ERP-7B
- stabilityai/japanese-stablelm-base-gamma-7b
また、mergekit_configは以下の通りです。
merge_method: task_arithmetic
base_model: mistralai/Mistral-7B-v0.1
models:
- model: tokyotech-llm/Swallow-MS-7b-v0.1
parameters:
weight:
- filter: embed_tokens
value: 1.0
- value: 0
dtype: bfloat16
tokenizer_source: model:tokyotech-llm/Swallow-MS-7b-v0.1
name: Mistral-7B-v0.1-VE-Swallow-MS
---
merge_method: task_arithmetic
base_model: SanjiWatsuki/Kunoichi-DPO-v2-7B
models:
- model: tokyotech-llm/Swallow-MS-7b-v0.1
parameters:
weight:
- filter: embed_tokens
value: 1.0
- value: 0
dtype: bfloat16
tokenizer_source: model:tokyotech-llm/Swallow-MS-7b-v0.1
name: Kunoichi-DPO-v2-7B-VE-Swallow-MS
---
merge_method: task_arithmetic
base_model: senseable/WestLake-7B-v2
models:
- model: tokyotech-llm/Swallow-MS-7b-v0.1
parameters:
weight:
- filter: embed_tokens
value: 1.0
- value: 0
dtype: bfloat16
tokenizer_source: model:tokyotech-llm/Swallow-MS-7b-v0.1
name: WestLake-7B-v2-VE-Swallow-MS
---
merge_method: task_arithmetic
base_model: KatyTheCutie/LemonadeRP-4.5.3
models:
- model: tokyotech-llm/Swallow-MS-7b-v0.1
parameters:
weight:
- filter: embed_tokens
value: 1.0
- value: 0
dtype: bfloat16
tokenizer_source: model:tokyotech-llm/Swallow-MS-7b-v0.1
name: LemonadeRP-4.5.3-VE-Swallow-MS
---
merge_method: task_arithmetic
base_model: Endevor/InfinityRP-v1-7B
models:
- model: tokyotech-llm/Swallow-MS-7b-v0.1
parameters:
weight:
- filter: embed_tokens
value: 1.0
- value: 0
dtype: bfloat16
tokenizer_source: model:tokyotech-llm/Swallow-MS-7b-v0.1
name: InfinityRP-v1-7B-VE-Swallow-MS
---
merge_method: task_arithmetic
base_model: SanjiWatsuki/Loyal-Macaroni-Maid-7B
models:
- model: tokyotech-llm/Swallow-MS-7b-v0.1
parameters:
weight:
- filter: embed_tokens
value: 1.0
- value: 0
dtype: bfloat16
tokenizer_source: model:tokyotech-llm/Swallow-MS-7b-v0.1
name: Loyal-Macaroni-Maid-7B-VE-Swallow-MS
---
merge_method: task_arithmetic
base_model: Elizezen/Berghof-ERP-7B
models:
- model: tokyotech-llm/Swallow-MS-7b-v0.1
parameters:
weight:
- filter: embed_tokens
value: 1.0
- value: 0
dtype: bfloat16
tokenizer_source: model:tokyotech-llm/Swallow-MS-7b-v0.1
name: Berghof-ERP-7B-VE-Swallow-MS
---
merge_method: task_arithmetic
base_model: stabilityai/japanese-stablelm-base-gamma-7b
models:
- model: tokyotech-llm/Swallow-MS-7b-v0.1
parameters:
weight:
- filter: embed_tokens
value: 1.0
- value: 0
dtype: bfloat16
tokenizer_source: model:tokyotech-llm/Swallow-MS-7b-v0.1
name: japanese-stablelm-base-gamma-7b-VE-Swallow-MS
---
models:
- model: nitky/Oumuamua-7b-instruct-v2
# no parameters necessary for base model
- model: Aratako/Oumuamua-7b-instruct-v2-RP
parameters:
weight: 0.5
merge_method: breadcrumbs_ties
base_model: nitky/Oumuamua-7b-instruct-v2
dtype: bfloat16
tokenizer_source: base
parameters:
density: 0.9
gamma: 0.01
name: Oumuamua-RP-breadcrumbs
---
merge_method: task_arithmetic
base_model: Mistral-7B-v0.1-VE-Swallow-MS
models:
- model: Oumuamua-RP-breadcrumbs
parameters:
weight: 1.0
- model: Kunoichi-DPO-v2-7B-VE-Swallow-MS
parameters:
weight: 0.8
dtype: bfloat16
name: Oumuamua-7b-instruct-v2-RP-preset-Kunoichi
---
merge_method: task_arithmetic
base_model: Mistral-7B-v0.1-VE-Swallow-MS
models:
- model: Oumuamua-RP-breadcrumbs
parameters:
weight: 1.0
- model: WestLake-7B-v2-VE-Swallow-MS
parameters:
weight: 0.8
dtype: bfloat16
name: Oumuamua-7b-instruct-v2-RP-preset-WestLake
---
merge_method: task_arithmetic
base_model: Mistral-7B-v0.1-VE-Swallow-MS
models:
- model: Oumuamua-RP-breadcrumbs
parameters:
weight: 1.0
- model: LemonadeRP-4.5.3-VE-Swallow-MS
parameters:
weight: 0.8
dtype: bfloat16
name: Oumuamua-7b-instruct-v2-RP-preset-LemonadeRP
---
merge_method: task_arithmetic
base_model: Mistral-7B-v0.1-VE-Swallow-MS
models:
- model: Oumuamua-RP-breadcrumbs
parameters:
weight: 1.0
- model: InfinityRP-v1-7B-VE-Swallow-MS
parameters:
weight: 0.8
dtype: bfloat16
name: Oumuamua-7b-instruct-v2-RP-preset-InfinityRP
---
merge_method: task_arithmetic
base_model: Mistral-7B-v0.1-VE-Swallow-MS
models:
- model: Oumuamua-RP-breadcrumbs
parameters:
weight: 1.0
- model: Loyal-Macaroni-Maid-7B-VE-Swallow-MS
parameters:
weight: 0.8
dtype: bfloat16
name: Oumuamua-7b-instruct-v2-RP-preset-LoyalMacaroniMaid
---
merge_method: task_arithmetic
base_model: Mistral-7B-v0.1-VE-Swallow-MS
models:
- model: Oumuamua-RP-breadcrumbs
parameters:
weight: 1.0
- model: Berghof-ERP-7B-VE-Swallow-MS
parameters:
weight: 0.8
- model: japanese-stablelm-base-gamma-7b-VE-Swallow-MS
parameters:
weight: -0.8
dtype: bfloat16
name: Oumuamua-7b-instruct-v2-RP-preset-Berghof
---
models:
- model: Oumuamua-7b-instruct-v2-RP-preset-Kunoichi
- model: Oumuamua-7b-instruct-v2-RP-preset-WestLake
- model: Oumuamua-7b-instruct-v2-RP-preset-LemonadeRP
- model: Oumuamua-7b-instruct-v2-RP-preset-InfinityRP
- model: Oumuamua-7b-instruct-v2-RP-preset-LoyalMacaroniMaid
- model: Oumuamua-7b-instruct-v2-RP-preset-Berghof
merge_method: model_stock
base_model: Oumuamua-RP-breadcrumbs
dtype: bfloat16
tokenizer_source: base
name: Oumuamua-7b-RP
ライセンス
マージに使われているモデルのライセンスの関係上、CC-BY-NC-4.0での配布となります。
- Downloads last month
- 40