kajyuuen commited on
Commit
4b237f0
1 Parent(s): 66e909c

Upload 4 files

Browse files
Files changed (4) hide show
  1. README.md +49 -0
  2. config.json +31 -0
  3. model.safetensors +3 -0
  4. pytorch_model.bin +3 -0
README.md ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ inference: false
4
+ language: ja
5
+ ---
6
+
7
+ # japanese-large-lm-3.6b-instruction-sft-8bit-1g-actorder_True
8
+
9
+ This repository provides a 3.6B parameters Japanese language **quantized** model, fine-tuned and trained by [LINE Corporation](https://linecorp.com/ja/).
10
+
11
+ ## For Japanese
12
+
13
+ 詳細な説明や実験に関しては「[【インターンレポート】量子化による大規模言語モデル軽量化の効果測定](https://engineering.linecorp.com/ja/blog/quantization-lightweighting-llms)」をご覧ください。
14
+
15
+ ## How to use
16
+
17
+ ```python
18
+ import torch
19
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
20
+
21
+ tokenizer = AutoTokenizer.from_pretrained("line-corporation/japanese-large-lm-3.6b-instruction-sft", use_fast=False)
22
+ model = AutoModelForCausalLM.from_pretrained("line-corporation/japanese-large-lm-3.6b-instruction-sft-8bit-1g-actorder_True")
23
+
24
+ generator = pipeline("text-generation", model=model, tokenizer=tokenizer, device=0)
25
+
26
+ input_text = """四国の県名を全て列挙してください。"""
27
+ text = generator(
28
+ f"ユーザー: {input_text}\nシステム: ",
29
+ max_length = 256,
30
+ do_sample = True,
31
+ temperature = 0.7,
32
+ top_p = 0.9,
33
+ top_k = 0,
34
+ repetition_penalty = 1.1,
35
+ num_beams = 1,
36
+ pad_token_id = tokenizer.pad_token_id,
37
+ num_return_sequences = 1,
38
+ )
39
+ print(text) # [{'generated_text': 'ユーザー: 四国の県名を全て列挙してください。\nシステム: 高知県、徳島県、香川県、愛媛県'}]
40
+ ```
41
+
42
+ ## Tokenization
43
+
44
+ We use a sentencepiece tokenizer with a unigram language model and byte-fallback.
45
+ We **do not** apply pre-tokenization with Japanese tokenizer.
46
+ Thus, a user may directly feed raw sentences into the tokenizer.
47
+
48
+ ## License
49
+ [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "line-corporation/japanese-large-lm-3.6b-instruction-sft",
3
+ "architectures": [
4
+ "GPTNeoXForCausalLM"
5
+ ],
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 2,
8
+ "classifier_dropout": 0.1,
9
+ "end_token_id": 2,
10
+ "eos_token_id": 2,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout": 0.0,
13
+ "hidden_size": 3072,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 12288,
16
+ "layer_norm_eps": 1e-05,
17
+ "max_position_embeddings": 2048,
18
+ "model_type": "gpt_neox",
19
+ "num_attention_heads": 32,
20
+ "num_hidden_layers": 30,
21
+ "pad_token_id": 2,
22
+ "rope_scaling": null,
23
+ "rotary_emb_base": 10000,
24
+ "rotary_pct": 1.0,
25
+ "tie_word_embeddings": true,
26
+ "torch_dtype": "float16",
27
+ "transformers_version": "4.33.0",
28
+ "use_cache": true,
29
+ "use_parallel_residual": false,
30
+ "vocab_size": 51200
31
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0240ed6d586e4023a0c17cb10eb950f47d09997df6e65ad2115aec4eacc6ab0c
3
+ size 2799337472
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7fd742cd759d45f0db6d24e62e2a83753b2de1066ad08da9a66bb9c9333f37ed
3
+ size 3719717070