tiny_mixtral_ja / README.md
if001's picture
fix
9681267
---
license: apache-2.0
language:
- en
- ja
datasets:
- izumi-lab/wikipedia-ja-20230720
- izumi-lab/wikipedia-en-20230720
- izumi-lab/open-text-books
- if001/aozorabunko-clean-sin
- if001/oscar_2023_filtered
tags:
- ja
- japanese
- mixtral
inference: false
---
275.86Mのmixtralを日本語データセットでpretrainingしたものです
## sample
```
from transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("if001/tiny_mixtral_ja")
tokenizer = AutoTokenizer.from_pretrained("if001/sentencepiece_ja", trust_remote_code=True)
prompt = "それは九月初旬のある蒸し暑い晩のことであった。私は、D坂の"
inputs = tokenizer(prompt, return_tensors="pt")
generate_ids = model.generate(
inputs.input_ids,
max_length=30,
top_k=30,
top_p=0.95,
temperature=0.6,
repetition_penalty=1.2,
do_sample=True,
)
tokenizer.decode(generate_ids[0], skip_special_tokens=True, clean_up_tokenization_spaces=False)
>> それは九月初旬のある蒸し暑い晩のことであった。私は、D坂の茶舗を後にして、その路地の角に横丁をあるいて居る、と云うと、丁度其処から、
```
## dataset
英語と日本語のデータセットを使用
```
total tokens: 8.64B
wikipedia_ja: 844.65M
wikipedia_en: 3.80B
open-text-books: 60.17M
oscar: 3.85B
aozorabunko: 92.97M
```
## tokenizer
```
all_special_ids: [1, 2, 3, 0, 4]
all_special_tokens: ['<BOS>', '<EOS>', '<UNK>', '<PAD>', '<MASK>']
```