ynakashima commited on
Commit
e05a0c4
1 Parent(s): be06aed

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +113 -0
README.md ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-sa-4.0
3
+ datasets:
4
+ - mc4
5
+ - cc100
6
+ - oscar
7
+ - togethercomputer/RedPajama-Data-1T
8
+ language:
9
+ - ja
10
+ - en
11
+ library_name: transformers
12
+ base_model: meta-llama/Llama-2-70b-hf
13
+ pipeline_tag: text-generation
14
+ tags:
15
+ - llama
16
+ - llama-2
17
+ ---
18
+
19
+ # KARAKURI LM
20
+
21
+ KARAKURI LM is a pretrained language model that builds upon Llama 2.
22
+ Our model enhances Llama 2's capabilities by incorporating additional Japanese vocabulary and further pretraining on a mixture of Japanese and multilingual corpora.
23
+
24
+ KARAKURI LM Chat is a fine-tuned version of KARAKURI LM, which was trained on a mixture of publicly available and closed datasets using the [SteerLM](https://aclanthology.org/2023.findings-emnlp.754/) technique.
25
+ During fine-tuning, our model employed a continual learning approach.
26
+ Unlike the common practice of relying solely on structured conversational datasets, we also incorporated unstructured corpora, similar to what was used during its pretraining phase.
27
+
28
+ Despite the conversational datasets containing only 2.5% Japanese tokens, our model has shown remarkable performance.
29
+ It achieves the highest performance among Japanese open models on the [MT-Bench-jp](https://api.wandb.ai/links/wandb-japan/6ff86bp3) at the time of release.
30
+ Furthermore, it achieves performance comparable to Llama 2 70B Chat on the original English [MT-Bench](https://huggingface.co/spaces/lmsys/mt-bench).
31
+
32
+ You can find more details in our blog post (coming soon).
33
+ If you are curious about our model, give our [demo](https://lm.karakuri.cc/) a try.
34
+
35
+ ## Model Details
36
+
37
+ - **Developed by**: [KARAKURI Inc.](https://about.karakuri.ai/)
38
+ - **Model type**: Causal decoder-only transformer language model
39
+ - **Languages**: English and Japanese
40
+ - **Finetuned from**: [meta-llama/Llama-2-70b-hf](https://huggingface.co/meta-llama/Llama-2-70b-hf)
41
+ - **Contact**: For questions and comments about the model, please email `[email protected]`
42
+
43
+ ## Performance
44
+
45
+ At the time of release, KARAKURI LM 70B Chat v0.1 achieves the highest performance among Japanese open models on the [MT-Bench-jp](https://api.wandb.ai/links/wandb-japan/6ff86bp3):
46
+
47
+ | Model | Size | Alignment | MT-Bench-jp |
48
+ | :---------------------------------- | :-----: | :---------: | ----------: |
49
+ | GPT-4 | - | RLHF | 8.78 |
50
+ | GPT-3.5-Turbo | - | RLHF | 8.24 |
51
+ | Claude 2.1 | - | RLHF | 8.18 |
52
+ | Gemini Pro | - | RLHF | 7.17 |
53
+ | **KARAKURI LM 70B Chat v0.1** | **70B** | **SteerLM** | **6.43** |
54
+ | Qarasu-14B-Chat-Plus-Unleashed | 14B | SFT | 6.26 |
55
+ | Llama 2 70B Chat | 70B | RLHF | 5.23 |
56
+ | ELYZA-Japanese-Llama-2-13B | 13B | SFT | 5.05 |
57
+ | Japanese-StableLM-Instruct-Beta-70B | 70B | SFT | 5.03 |
58
+ | Swallow-70B-Instruct | 70B | SFT | 4.39 |
59
+
60
+ It also achieves performance comparable to Llama 2 70B Chat on the original English [MT-Bench](https://huggingface.co/spaces/lmsys/mt-bench):
61
+
62
+ | Model | Average | MT-Bench | MT-Bench-jp |
63
+ | :---------------------------- | -------: | -------: | ----------: |
64
+ | **KARAKURI LM 70B Chat v0.1** | **6.52** | **6.61** | **6.43** |
65
+ | Llama 2 70B Chat | 6.04 | 6.86 | 5.23 |
66
+
67
+ ## Use in 🤗 Transformers
68
+
69
+ You can run the model using the `pipeline()` function from 🤗 Transformers:
70
+
71
+ ```python
72
+ from transformers import pipeline
73
+
74
+ generator = pipeline("text-generation", model="karakuri-ai/karakuri-lm-70b-v0.1", device_map="auto", torch_dtype="auto")
75
+
76
+ prompt = """以下は人間とAIアシスタントとの会話です。
77
+
78
+ Human: こんにちは。
79
+ AI: こんにちは、私はAIアシスタントです。何かお手伝いできることはありますか?
80
+ Human: 週末に日帰りで東京に遊びに行こうと思っています。日帰りなので、短時間で回れるおすすめの観光プランを教えてください。
81
+ AI: """
82
+ outputs = generator(prompt, return_full_text=False, max_new_tokens=512)
83
+ outputs[0]["generated_text"]
84
+ ```
85
+
86
+ ## Training
87
+
88
+ ### Training Datasets
89
+
90
+ - [mC4](https://huggingface.co/datasets/mc4)
91
+ - [CC100](https://huggingface.co/datasets/cc100)
92
+ - [OSCAR](https://huggingface.co/datasets/oscar)
93
+ - [RedPajama](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T)
94
+ - Our internal Japanese corpora
95
+
96
+ ### Training Infrastructure
97
+
98
+ - **Hardware**: KARAKURI LM 70B was trained on 32 nodes of an Amazon EC2 trn1.32xlarge instance.
99
+ - **Software**: We use code based on [neuronx-nemo-megatron](https://github.com/aws-neuron/neuronx-nemo-megatron).
100
+
101
+ ## Acknowledgements
102
+
103
+ We gratefully acknowledge the support from AWS Japan through the [AWS LLM Development Support Program](https://aws.amazon.com/jp/local/llm-development-support-program/).
104
+
105
+ ## License
106
+
107
+ Llama 2 is licensed under the [LLAMA 2 Community License](https://ai.meta.com/llama/license/), Copyright © Meta Platforms, Inc. All Rights Reserved.
108
+
109
+ KARAKURI LM is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License ([CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)).
110
+ Under this license, you are free to share and adapt this model, even for commercial purposes, as long as you provide appropriate credit and distribute your contributions under the same license.
111
+
112
+ However, if you wish to use KARAKURI LM for commercial purposes, we require that you contact us directly, regardless of the terms of the CC BY-SA 4.0 license.
113
+ If you have any questions regarding the interpretation of its terms, please also feel free to contact us.