Views
No views yet
[INST] <<SYS>>
あなたは日本語を話す優秀なアシスタントです。回答には必ず日本語で答えてください。また考える過程も出力してください。
<</SYS>>
まどマギで一番好きなキャラは? [/INST]まどマギで一番好きなキャラクターは、鹿目まどかです。彼女は物語の中心人物であり、優しくて芯の強い性格が魅力的です。また、彼女が魔法少女としての運命を受け入れ、他の魔法少女たちを救うために奔走する姿には感動します。彼女の最期の選択も、多くの人々の心に残る名シーンとなっています。min_p and Null preset with temperature=0.3 for Generation.<s>[INST] <<SYS>>\n{SYSTEM_PROMPT}\n<</SYS>>\n\n{USER_MESSAGE_1} [/INST] {BOT_MESSAGE_1}</s>[INST] {USER_MESSAGE_2} [/INST] <s> and </s> are special tokens used for the beginning of string (BOS) and end of string (EOS), respectively, while [INST] and [/INST] are considered regular strings.<s>[INST] <<SYS>>\nあなたは日本語を話す優秀なアシスタントです。回答には必ず日本語で答えてください。また考える過程も出力してください。\n<</SYS>>\n\n{instruction1}\n{input1} [/INST] {BOT_MESSAGE_1}</s>[INST] {instruction2}\n{input2} [/INST] 1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4model_name = "nitky/RP-7b-instruct"
5model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7
8device = "cuda"
9
10messages = [
11 {"role": "system", "content": "あなたは日本語を話す優秀なアシスタントです。回答には必ず日本語で答えてください。また考える過程も出力してください。"},
12 {"role": "user", "content": "まどマギで一番好きなキャラは?"}
13]
14
15encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt")
16
17model_inputs = encodeds.to(device)
18model.to(device)
19
20generated_ids = model.generate(model_inputs, max_new_tokens=256, do_sample=True, temperature=0.3)
21decoded = tokenizer.batch_decode(generated_ids)
22print(decoded[0])1merge_method: model_stock
2base_model: stabilityai/japanese-stablelm-base-gamma-7b
3models:
4 - model: Aratako/AntlerStar-RP
5 - model: Aratako/ArrowPro-7B-RobinHood-toxic
6 - model: Aratako/Ninja-v1-RP-expressive
7 - model: DataPilot/ArrowPro-7B-KUJIRA
8 - model: DataPilot/ArrowPro-7B-RobinHood
9 - model: DataPilot/ArrowPro-7B-KillerWhale
10 - model: Elizezen/Phos-7B-RP
11 - model: ohwi/japanese-stablelm-instruct-gamma-7b-dpo-uf-v1
12 - model: umiyuki/Umievo-itr012-Gleipnir-7B
13dtype: bfloat16
14tokenizer_source: model:stabilityai/japanese-stablelm-base-gamma-7b
15name: RP-7b-instruct