Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| RakutenAI-7B-chat.Q2_K.gguf | Q2_K | 2.6GB |
| RakutenAI-7B-chat.IQ3_XS.gguf | IQ3_XS | 2.89GB |
| RakutenAI-7B-chat.IQ3_S.gguf | IQ3_S | 3.04GB |
| RakutenAI-7B-chat.Q3_K_S.gguf | Q3_K_S | 3.02GB |
| RakutenAI-7B-chat.IQ3_M.gguf | IQ3_M | 3.14GB |
| RakutenAI-7B-chat.Q3_K.gguf | Q3_K | 3.35GB |
| RakutenAI-7B-chat.Q3_K_M.gguf | Q3_K_M | 3.35GB |
| RakutenAI-7B-chat.Q3_K_L.gguf | Q3_K_L | 3.64GB |
| RakutenAI-7B-chat.IQ4_XS.gguf | IQ4_XS | 3.76GB |
| RakutenAI-7B-chat.Q4_0.gguf | Q4_0 | 3.91GB |
| RakutenAI-7B-chat.IQ4_NL.gguf | IQ4_NL | 3.95GB |
| RakutenAI-7B-chat.Q4_K_S.gguf | Q4_K_S | 3.94GB |
| RakutenAI-7B-chat.Q4_K.gguf | Q4_K | 4.15GB |
| RakutenAI-7B-chat.Q4_K_M.gguf | Q4_K_M | 4.15GB |
| RakutenAI-7B-chat.Q4_1.gguf | Q4_1 | 4.33GB |
| RakutenAI-7B-chat.Q5_0.gguf | Q5_0 | 4.75GB |
| RakutenAI-7B-chat.Q5_K_S.gguf | Q5_K_S | 4.75GB |
| RakutenAI-7B-chat.Q5_K.gguf | Q5_K | 4.87GB |
| RakutenAI-7B-chat.Q5_K_M.gguf | Q5_K_M | 4.87GB |
| RakutenAI-7B-chat.Q5_1.gguf | Q5_1 | 5.16GB |
| RakutenAI-7B-chat.Q6_K.gguf | Q6_K | 5.63GB |
| RakutenAI-7B-chat.Q8_0.gguf | Q8_0 | 7.3GB |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_path = "Rakuten/RakutenAI-7B-chat"
4tokenizer = AutoTokenizer.from_pretrained(model_path)
5model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype="auto", device_map="auto")
6model.eval()
7
8requests = [
9 "「馬が合う」はどう言う意味ですか",
10 "How to make an authentic Spanish Omelette?",
11]
12
13system_message = "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: {user_input} ASSISTANT:"
14
15for req in requests:
16 input_req = system_message.format(user_input=req)
17 input_ids = tokenizer.encode(input_req, return_tensors="pt").to(device=model.device)
18 tokens = model.generate(
19 input_ids,
20 max_new_tokens=1024,
21 do_sample=True,
22 pad_token_id=tokenizer.eos_token_id,
23 )
24 out = tokenizer.decode(tokens[0][len(input_ids[0]):], skip_special_tokens=True)
25 print("USER:\n" + req)
26 print("ASSISTANT:\n" + out)
27 print()
28 print()train part of the following datasets (CC by-SA License) for instruction-tuned and chat-tuned models:
@misc{rakutengroup2024rakutenai7b,
title={RakutenAI-7B: Extending Large Language Models for Japanese},
author={{Rakuten Group, Inc.} and Aaron Levine and Connie Huang and Chenguang Wang and Eduardo Batista and Ewa Szymanska and Hongyi Ding and Hou Wei Chou and Jean-François Pessiot and Johanes Effendi and Justin Chiu and Kai Torben Ohlhus and Karan Chopra and Keiji Shinzato and Koji Murakami and Lee Xiong and Lei Chen and Maki Kubota and Maksim Tkachenko and Miroku Lee and Naoki Takahashi and Prathyusha Jwalapuram and Ryutaro Tatsushima and Saurabh Jain and Sunil Kumar Yadav and Ting Cai and Wei-Te Chen and Yandi Xia and Yuki Nakayama and Yutaka Higashiyama},
year={2024},
eprint={2403.15484},
archivePrefix={arXiv},
primaryClass={cs.CL}
}