kajyuuen commited on
Commit
ebdbfab
1 Parent(s): 533cae6

Upload 5 files

Browse files
Files changed (5) hide show
  1. README.md +49 -0
  2. config.json +31 -0
  3. model.safetensors +3 -0
  4. pytorch_model.bin +3 -0
  5. quantize_config.json +11 -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-4bit-128g-actorder_False
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-4bit-128g-actorder_False")
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:2a418523e898e651bdc8ab353d9ddef196a7eafbc567a63685467a209e403989
3
+ size 2399277296
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f96d0124f7d0ff32b21cabbc6cd414aafab488916a5ec436b6c543b4005e89fb
3
+ size 2084891970
quantize_config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bits": 4,
3
+ "group_size": 128,
4
+ "damp_percent": 0.01,
5
+ "desc_act": false,
6
+ "static_groups": false,
7
+ "sym": true,
8
+ "true_sequential": true,
9
+ "model_name_or_path": "quantized/line-corporation/japanese-large-lm-3.6b-instruction-sft/gptq-4bit-128g-actorder_False",
10
+ "model_file_base_name": "gptq_model-4bit-128g"
11
+ }