Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| nekomata-14b.Q2_K.gguf | Q2_K | 5.41GB |
| nekomata-14b.IQ3_XS.gguf | IQ3_XS | 6.12GB |
| nekomata-14b.IQ3_S.gguf | IQ3_S | 6.31GB |
| nekomata-14b.Q3_K_S.gguf | Q3_K_S | 6.31GB |
| nekomata-14b.IQ3_M.gguf | IQ3_M | 6.87GB |
| nekomata-14b.Q3_K.gguf | Q3_K | 7.16GB |
| nekomata-14b.Q3_K_M.gguf | Q3_K_M | 7.16GB |
| nekomata-14b.Q3_K_L.gguf | Q3_K_L | 7.44GB |
| nekomata-14b.IQ4_XS.gguf | IQ4_XS | 7.37GB |
| nekomata-14b.Q4_0.gguf | Q4_0 | 7.62GB |
| nekomata-14b.IQ4_NL.gguf | IQ4_NL | 7.68GB |
| nekomata-14b.Q4_K_S.gguf | Q4_K_S | 7.96GB |
| nekomata-14b.Q4_K.gguf | Q4_K | 8.8GB |
| nekomata-14b.Q4_K_M.gguf | Q4_K_M | 8.8GB |
| nekomata-14b.Q4_1.gguf | Q4_1 | 8.4GB |
| nekomata-14b.Q5_0.gguf | Q5_0 | 9.18GB |
| nekomata-14b.Q5_K_S.gguf | Q5_K_S | 9.34GB |
| nekomata-14b.Q5_K.gguf | Q5_K | 10.14GB |
| nekomata-14b.Q5_K_M.gguf | Q5_K_M | 10.14GB |
| nekomata-14b.Q5_1.gguf | Q5_1 | 9.96GB |
| nekomata-14b.Q6_K.gguf | Q6_K | 11.46GB |
| nekomata-14b.Q8_0.gguf | Q8_0 | 14.03GB |
rinna/nekomata-14b
nekomata comes from the Japanese word 猫又/ねこまた/Nekomata, which is a kind of Japanese mythical creature (妖怪/ようかい/Youkai).nekomata-14B was trained on 16 nodes of Amazon EC2 trn1.32xlarge instance powered by AWS Trainium purpose-built ML accelerator chip. The pre-training job was completed within a timeframe of approximately 7 days.1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4tokenizer = AutoTokenizer.from_pretrained("rinna/nekomata-14b", trust_remote_code=True)
5
6# Use GPU with bf16
7# model = AutoModelForCausalLM.from_pretrained("rinna/nekomata-14b", device_map="auto", trust_remote_code=True, bf16=True)
8
9# Use GPU with fp16
10# model = AutoModelForCausalLM.from_pretrained("rinna/nekomata-14b", device_map="auto", trust_remote_code=True, fp16=True)
11
12# Use CPU
13# model = AutoModelForCausalLM.from_pretrained("rinna/nekomata-14b", device_map="cpu", trust_remote_code=True)
14
15# Automatically select device and precision
16model = AutoModelForCausalLM.from_pretrained("rinna/nekomata-14b", device_map="auto", trust_remote_code=True)
17
18text = "西田幾多郎は、"
19token_ids = tokenizer.encode(text, add_special_tokens=False, return_tensors="pt")
20
21with torch.no_grad():
22 output_ids = model.generate(
23 token_ids.to(model.device),
24 max_new_tokens=200,
25 min_new_tokens=200,
26 do_sample=True,
27 temperature=1.0,
28 top_p=0.95,
29 pad_token_id=tokenizer.pad_token_id,
30 bos_token_id=tokenizer.bos_token_id,
31 eos_token_id=tokenizer.eos_token_id
32 )
33
34output = tokenizer.decode(output_ids.tolist()[0])
35print(output)cl100k tiktoken tokenizer and has a vocabulary size of 151,936. The inclusive vocabulary helps the model to reach a better tokenization efficiency, especially for Japanese texts.Qwen tokenizer (as used in nekomata) and the llama-2 tokenizer (as used in youri) on different text collections and found that the Qwen tokenizer achieves a much better byte2token rate (i.e. the average number of tokens produced from 1 byte of text) as following. A lower byte2token rate indicates a better tokenization efficiency.| Tokenizer | Japanese | English | Multilingual |
|---|---|---|---|
| Qwen | 0.24 | 0.27 | 0.27 |
| llama-2 | 0.40 | 0.29 | 0.36 |
1@misc{rinna-nekomata-14b,
2 title = {rinna/nekomata-14b},
3 author = {Zhao, Tianyu and Kaga, Akio and Sawada, Kei},
4 url = {https://huggingface.co/rinna/nekomata-14b}
5}
6
7@inproceedings{sawada2024release,
8 title = {Release of Pre-Trained Models for the {J}apanese Language},
9 author = {Sawada, Kei and Zhao, Tianyu and Shing, Makoto and Mitsui, Kentaro and Kaga, Akio and Hono, Yukiya and Wakatsuki, Toshiaki and Mitsuda, Koh},
10 booktitle = {Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)},
11 month = {5},
12 year = {2024},
13 pages = {13898--13905},
14 url = {https://aclanthology.org/2024.lrec-main.1213},
15 note = {\url{https://arxiv.org/abs/2404.01657}}
16}