RichardErkhov commited on
Commit
8d55e76
·
verified ·
1 Parent(s): 4797488

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +195 -0
README.md ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ nekomata-7b-instruction - GGUF
11
+ - Model creator: https://huggingface.co/rinna/
12
+ - Original model: https://huggingface.co/rinna/nekomata-7b-instruction/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [nekomata-7b-instruction.Q2_K.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q2_K.gguf) | Q2_K | 2.84GB |
18
+ | [nekomata-7b-instruction.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.IQ3_XS.gguf) | IQ3_XS | 3.23GB |
19
+ | [nekomata-7b-instruction.IQ3_S.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.IQ3_S.gguf) | IQ3_S | 3.32GB |
20
+ | [nekomata-7b-instruction.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q3_K_S.gguf) | Q3_K_S | 3.32GB |
21
+ | [nekomata-7b-instruction.IQ3_M.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.IQ3_M.gguf) | IQ3_M | 3.61GB |
22
+ | [nekomata-7b-instruction.Q3_K.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q3_K.gguf) | Q3_K | 3.78GB |
23
+ | [nekomata-7b-instruction.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q3_K_M.gguf) | Q3_K_M | 3.78GB |
24
+ | [nekomata-7b-instruction.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q3_K_L.gguf) | Q3_K_L | 4.0GB |
25
+ | [nekomata-7b-instruction.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.IQ4_XS.gguf) | IQ4_XS | 4.02GB |
26
+ | [nekomata-7b-instruction.Q4_0.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q4_0.gguf) | Q4_0 | 4.2GB |
27
+ | [nekomata-7b-instruction.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.IQ4_NL.gguf) | IQ4_NL | 4.22GB |
28
+ | [nekomata-7b-instruction.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q4_K_S.gguf) | Q4_K_S | 4.22GB |
29
+ | [nekomata-7b-instruction.Q4_K.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q4_K.gguf) | Q4_K | 4.56GB |
30
+ | [nekomata-7b-instruction.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q4_K_M.gguf) | Q4_K_M | 4.56GB |
31
+ | [nekomata-7b-instruction.Q4_1.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q4_1.gguf) | Q4_1 | 4.62GB |
32
+ | [nekomata-7b-instruction.Q5_0.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q5_0.gguf) | Q5_0 | 5.03GB |
33
+ | [nekomata-7b-instruction.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q5_K_S.gguf) | Q5_K_S | 5.03GB |
34
+ | [nekomata-7b-instruction.Q5_K.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q5_K.gguf) | Q5_K | 5.32GB |
35
+ | [nekomata-7b-instruction.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q5_K_M.gguf) | Q5_K_M | 5.32GB |
36
+ | [nekomata-7b-instruction.Q5_1.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q5_1.gguf) | Q5_1 | 5.44GB |
37
+ | [nekomata-7b-instruction.Q6_K.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q6_K.gguf) | Q6_K | 5.91GB |
38
+ | [nekomata-7b-instruction.Q8_0.gguf](https://huggingface.co/RichardErkhov/rinna_-_nekomata-7b-instruction-gguf/blob/main/nekomata-7b-instruction.Q8_0.gguf) | Q8_0 | 7.65GB |
39
+
40
+
41
+
42
+
43
+ Original model description:
44
+ ---
45
+ thumbnail: https://github.com/rinnakk/japanese-pretrained-models/blob/master/rinna.png
46
+ datasets:
47
+ - databricks/databricks-dolly-15k
48
+ - kunishou/databricks-dolly-15k-ja
49
+ - izumi-lab/llm-japanese-dataset
50
+ language:
51
+ - ja
52
+ - en
53
+ tags:
54
+ - qwen
55
+ inference: false
56
+ license: other
57
+ license_name: tongyi-qianwen-license-agreement
58
+ license_link: https://github.com/QwenLM/Qwen/blob/main/Tongyi%20Qianwen%20LICENSE%20AGREEMENT
59
+ ---
60
+
61
+ # `rinna/nekomata-7b-instruction`
62
+
63
+ ![rinna-icon](./rinna.png)
64
+
65
+ # Overview
66
+ The model is the instruction-tuned version of [`rinna/nekomata-7b`](https://huggingface.co/rinna/nekomata-7b). It adopts the Alpaca input format.
67
+
68
+ * **Model architecture**
69
+
70
+ A 32-layer, 4096-hidden-size transformer-based language model. Please refer to the [Qwen paper](https://arxiv.org/abs/2309.16609) for architecture details.
71
+
72
+ * **Fine-tuning**
73
+
74
+ The fine-tuning data is the subset of the following datasets.
75
+ * [Databricks Dolly data](https://huggingface.co/datasets/databricks/databricks-dolly-15k)
76
+ * [Japanese Databricks Dolly data](https://huggingface.co/datasets/kunishou/databricks-dolly-15k-ja)
77
+ * [FLAN Instruction Tuning data](https://github.com/google-research/FLAN) and its Japanese translation
78
+ * [Izumi lab LLM Japanese dataset](https://github.com/masanorihirano/llm-japanese-dataset/tree/main)
79
+ * The following sections are used
80
+ * alt
81
+ * aozora-txt
82
+ * CourseraParallel
83
+ * ParaNatCom
84
+ * Tab-delimited_Bilingual_Sentence_Pairs
85
+ * tanaka-corpus
86
+ * wikinews
87
+ * wordnet
88
+ * yasashi-japanese
89
+ * The [remaining sections](https://github.com/masanorihirano/llm-japanese-dataset/tree/main/datasets-cc-by-sa) contain commonly used evaluation corpora so they are skipped to prevent data leak.
90
+
91
+ * **Contributors**
92
+
93
+ - [Tianyu Zhao](https://huggingface.co/tianyuz)
94
+ - [Kei Sawada](https://huggingface.co/keisawada)
95
+
96
+ ---
97
+
98
+ # Benchmarking
99
+ Please refer to [rinna's LM benchmark page](https://rinnakk.github.io/research/benchmarks/lm/index.html).
100
+
101
+ ---
102
+
103
+ # How to use the model
104
+
105
+ ~~~~python
106
+ import torch
107
+ from transformers import AutoTokenizer, AutoModelForCausalLM
108
+
109
+ tokenizer = AutoTokenizer.from_pretrained("rinna/nekomata-7b-instruction", trust_remote_code=True)
110
+
111
+ # Use GPU with bf16
112
+ # model = AutoModelForCausalLM.from_pretrained("rinna/nekomata-7b-instruction", device_map="auto", trust_remote_code=True, bf16=True)
113
+
114
+ # Use GPU with fp16
115
+ # model = AutoModelForCausalLM.from_pretrained("rinna/nekomata-7b-instruction", device_map="auto", trust_remote_code=True, fp16=True)
116
+
117
+ # Use CPU
118
+ # model = AutoModelForCausalLM.from_pretrained("rinna/nekomata-7b-instruction", device_map="cpu", trust_remote_code=True)
119
+
120
+ # Automatically select device and precision
121
+ model = AutoModelForCausalLM.from_pretrained("rinna/nekomata-7b-instruction", device_map="auto", trust_remote_code=True)
122
+
123
+ instruction = "次の日本語を英語に翻訳してください。"
124
+ input = "大規模言語モデル(だいきぼげんごモデル、英: large language model、LLM)は、多数のパラメータ(数千万から数十億)を持つ人工ニューラルネットワークで構成されるコンピュータ言語モデルで、膨大なラベルなしテキストを使用して自己教師あり学習または半教師あり学習によって訓練が行われる。"
125
+ prompt = f"""
126
+ 以下は、タスクを説明する指示と、文脈のある入力の組み合わせです。要求を適切に満たす応答を書きなさい。
127
+
128
+ ### 指示:
129
+ {instruction}
130
+
131
+ ### 入力:
132
+ {input}
133
+
134
+ ### 応答:
135
+ """
136
+ token_ids = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
137
+
138
+ with torch.no_grad():
139
+ output_ids = model.generate(
140
+ token_ids.to(model.device),
141
+ max_new_tokens=200,
142
+ do_sample=True,
143
+ temperature=0.5,
144
+ pad_token_id=tokenizer.pad_token_id,
145
+ bos_token_id=tokenizer.bos_token_id,
146
+ eos_token_id=tokenizer.eos_token_id
147
+ )
148
+
149
+ output = tokenizer.decode(output_ids.tolist()[0])
150
+ print(output)
151
+ """
152
+ 以下は、タスクを説明する指示と、文脈のある入力の組み合わせです。要求を適切に満たす応答を書きなさい。
153
+
154
+ ### 指示:
155
+ 次の日本語を英語に翻訳してください。
156
+
157
+ ### 入力:
158
+ 大規模言語モデル(だいきぼげんごモデル、英: large language model、LLM)は、多数のパラメータ(数千万から数十億)を持つ人工ニューラルネットワークで構成されるコンピュータ言語モデルで、膨大なラベルなしテキストを使 用して自己教師あり学習または半教師あり学習によって訓練が行われる。
159
+
160
+ ### 応答:
161
+ A large language model (LLM) is a computer language model composed of artificial neural networks with many parameters (from tens of millions to billions) trained by self-supervised learning or semi-supervised learning using a large amount of unlabeled text.<|endoftext|>
162
+ """
163
+ ~~~~
164
+
165
+ ---
166
+
167
+ # Tokenization
168
+ Please refer to [`rinna/nekomata-7b`](https://huggingface.co/rinna/nekomata-7b) for tokenization details.
169
+
170
+ ---
171
+
172
+ # How to cite
173
+ ```bibtex
174
+ @misc{rinna-nekomata-7b-instruction,
175
+ title = {rinna/nekomata-7b-instruction},
176
+ author = {Zhao, Tianyu and Sawada, Kei},
177
+ url = {https://huggingface.co/rinna/nekomata-7b-instruction}
178
+ }
179
+
180
+ @inproceedings{sawada2024release,
181
+ title = {Release of Pre-Trained Models for the {J}apanese Language},
182
+ author = {Sawada, Kei and Zhao, Tianyu and Shing, Makoto and Mitsui, Kentaro and Kaga, Akio and Hono, Yukiya and Wakatsuki, Toshiaki and Mitsuda, Koh},
183
+ booktitle = {Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)},
184
+ month = {5},
185
+ year = {2024},
186
+ pages = {13898--13905},
187
+ url = {https://aclanthology.org/2024.lrec-main.1213},
188
+ note = {\url{https://arxiv.org/abs/2404.01657}}
189
+ }
190
+ ```
191
+ ---
192
+
193
+ # License
194
+ [Tongyi Qianwen LICENSE AGREEMENT](https://github.com/QwenLM/Qwen/blob/main/Tongyi%20Qianwen%20LICENSE%20AGREEMENT)
195
+