munish0838 commited on
Commit
7e11f18
·
verified ·
1 Parent(s): 98dc6c1

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +78 -0
README.md ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - ja
5
+ base_model: DataPilot/ArrowPro-7B-KillerWhale
6
+ pipeline_tag: text-generation
7
+ ---
8
+
9
+ # QuantFactory/ArrowPro-7B-KillerWhale-GGUF
10
+ This is quantized version of [DataPilot/ArrowPro-7B-KillerWhale](https://huggingface.co/DataPilot/ArrowPro-7B-KillerWhale) created using llama.cpp
11
+
12
+ ## Model Description
13
+
14
+ ArrowPro-7B-KillerWhaleはMistral系のNTQAI/chatntq-ja-7b-v1.0をベースにAItuber、AIアシスタントの魂となるようにChat性能、および高いプロンプトインジェクション耐性を重視して作られました。
15
+
16
+
17
+
18
+ ## How to use
19
+ ```python
20
+ import torch
21
+ from transformers import AutoTokenizer, AutoModelForCausalLM
22
+
23
+ tokenizer = AutoTokenizer.from_pretrained("DataPilot/ArrowPro-7B-KillerWhale")
24
+ model = AutoModelForCausalLM.from_pretrained(
25
+ "DataPilot/ArrowPro-7B-KillerWhale",
26
+ torch_dtype="auto",
27
+ )
28
+ model.eval()
29
+
30
+ if torch.cuda.is_available():
31
+ model = model.to("cuda")
32
+
33
+ def build_prompt(user_query):
34
+ sys_msg = "あなたは日本語を話す優秀なアシスタントです。回答には必ず日本語で答えてください。"
35
+ template = """[INST] <<SYS>>
36
+ {}
37
+ <</SYS>>
38
+
39
+ {}[/INST]"""
40
+ return template.format(sys_msg,user_query)
41
+
42
+ # Infer with prompt without any additional input
43
+ user_inputs = {
44
+ "user_query": "まどマギで一番かわいいキャラはだれ?",
45
+ }
46
+ prompt = build_prompt(**user_inputs)
47
+
48
+ input_ids = tokenizer.encode(
49
+ prompt,
50
+ add_special_tokens=True,
51
+ return_tensors="pt"
52
+ )
53
+
54
+ tokens = model.generate(
55
+ input_ids.to(device=model.device),
56
+ max_new_tokens=500,
57
+ temperature=1,
58
+ top_p=0.95,
59
+ do_sample=True,
60
+ )
61
+
62
+ out = tokenizer.decode(tokens[0][input_ids.shape[1]:], skip_special_tokens=True).strip()
63
+ print(out)
64
+ ```
65
+ ## ベンチマーク方法
66
+
67
+ LLaMa3が不安定のため、今回のスコアはGemini環境で新モデルのベンチマーク3回分の平均点からクジラのベンチマーク3回分の平均点を割って出した倍率をクジラのスコアである3.8にかけて出したものとなります。
68
+
69
+
70
+ ## 謝辞
71
+
72
+ 助言を与えてくださったすべての皆様に感謝します。
73
+ また、元モデルの開発者の皆様にも感謝を申し上げます。
74
+ このモデルを作成するために計算資源を貸してくれた[witness](https://x.com/i_witnessed_it)氏と[Meta Data Lab](https://x.com/Metadatalab)に感謝を申し上げます
75
+
76
+ ## お願い
77
+
78
+ このモデルを利用する際は他人に迷惑をかけないように最大限留意してください。