Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| youri-7b-instruction.Q2_K.gguf | Q2_K | 2.36GB |
| youri-7b-instruction.IQ3_XS.gguf | IQ3_XS | 2.6GB |
| youri-7b-instruction.IQ3_S.gguf | IQ3_S | 2.75GB |
| youri-7b-instruction.Q3_K_S.gguf | Q3_K_S | 2.75GB |
| youri-7b-instruction.IQ3_M.gguf | IQ3_M | 2.9GB |
| youri-7b-instruction.Q3_K.gguf | Q3_K | 3.07GB |
| youri-7b-instruction.Q3_K_M.gguf | Q3_K_M | 3.07GB |
| youri-7b-instruction.Q3_K_L.gguf | Q3_K_L | 3.35GB |
| youri-7b-instruction.IQ4_XS.gguf | IQ4_XS | 3.4GB |
| youri-7b-instruction.Q4_0.gguf | Q4_0 | 3.56GB |
| youri-7b-instruction.IQ4_NL.gguf | IQ4_NL | 3.58GB |
| youri-7b-instruction.Q4_K_S.gguf | Q4_K_S | 3.59GB |
| youri-7b-instruction.Q4_K.gguf | Q4_K | 3.8GB |
| youri-7b-instruction.Q4_K_M.gguf | Q4_K_M | 3.8GB |
| youri-7b-instruction.Q4_1.gguf | Q4_1 | 3.95GB |
| youri-7b-instruction.Q5_0.gguf | Q5_0 | 4.33GB |
| youri-7b-instruction.Q5_K_S.gguf | Q5_K_S | 4.33GB |
| youri-7b-instruction.Q5_K.gguf | Q5_K | 4.45GB |
| youri-7b-instruction.Q5_K_M.gguf | Q5_K_M | 4.45GB |
| youri-7b-instruction.Q5_1.gguf | Q5_1 | 4.72GB |
| youri-7b-instruction.Q6_K.gguf | Q6_K | 5.15GB |
| youri-7b-instruction.Q8_0.gguf | Q8_0 | 6.67GB |
rinna/youri-7b-instruction
rinna/youri-7b. It adopts the Alpaca input format.1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4tokenizer = AutoTokenizer.from_pretrained("rinna/youri-7b-instruction")
5model = AutoModelForCausalLM.from_pretrained("rinna/youri-7b-instruction")
6
7if torch.cuda.is_available():
8 model = model.to("cuda")
9
10instruction = "次の日本語を英語に翻訳してください。"
11input = "大規模言語モデル(だいきぼげんごモデル、英: large language model、LLM)は、多数のパラメータ(数千万から数十億)を持つ人工ニューラルネットワークで構成されるコンピュータ言語モデルで、膨大なラベルなしテキストを使用して自己教師あり学習または半教師あり学習によって訓練が行われる。"
12prompt = f"""
13以下は、タスクを説明する指示と、文脈のある入力の組み合わせです。要求を適切に満たす応答を書きなさい。
14
15### 指示:
16{instruction}
17
18### 入力:
19{input}
20
21### 応答:
22"""
23token_ids = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
24
25with torch.no_grad():
26 output_ids = model.generate(
27 token_ids.to(model.device),
28 max_new_tokens=200,
29 do_sample=True,
30 temperature=0.5,
31 pad_token_id=tokenizer.pad_token_id,
32 bos_token_id=tokenizer.bos_token_id,
33 eos_token_id=tokenizer.eos_token_id
34 )
35
36output = tokenizer.decode(output_ids.tolist()[0])
37print(output)
38"""
39以下は、タスクを説明する指示と、文脈のある入力の組み合わせです。要求を適切に満たす応答を書きなさい。
40
41### 指示:
42次の日本語を英語に翻訳してください。
43
44### 入力:
45大規模言語モデル(だいきぼげんごモデル、英: large language model、LLM)は、多数のパラメータ(数千万から数十億)を持つ人工ニューラルネットワークで構成されるコンピュータ言語モデルで、膨大なラベルなしテキストを使 用して自己教師あり学習または半教師あり学習によって訓練が行われる。
46
47### 応答:
48 Large language models (LLMs) are computer language models that are composed of artificial neural networks with millions to billions of parameters that are trained via self-supervised or semi-supervised learning using vast unlabeled text.</s>
49"""@misc{rinna-youri-7b-instruction,
title = {rinna/youri-7b-instruction},
author={Zhao, Tianyu and Sawada, Kei}
url = {https://huggingface.co/rinna/youri-7b-instruction},
}
@inproceedings{sawada2024release,
title = {Release of Pre-Trained Models for the {J}apanese Language},
author = {Sawada, Kei and Zhao, Tianyu and Shing, Makoto and Mitsui, Kentaro and Kaga, Akio and Hono, Yukiya and Wakatsuki, Toshiaki and Mitsuda, Koh},
booktitle = {Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)},
month = {5},
year = {2024},
url = {https://arxiv.org/abs/2404.01657},
}