munish0838 commited on
Commit
5be0f9b
·
verified ·
1 Parent(s): 6de98f5

Create README.md

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