aipib commited on
Commit
db29e4e
·
verified ·
1 Parent(s): d87f43c

Add files using upload-large-folder tool

Browse files
README.md ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ - ja
6
+ programming_language:
7
+ - C
8
+ - C++
9
+ - C#
10
+ - Go
11
+ - Java
12
+ - JavaScript
13
+ - Lua
14
+ - PHP
15
+ - Python
16
+ - Ruby
17
+ - Rust
18
+ - Scala
19
+ - TypeScript
20
+ pipeline_tag: text-generation
21
+ library_name: mlx
22
+ inference: false
23
+ base_model: llm-jp/llm-jp-3.1-8x13b-instruct4
24
+ tags:
25
+ - mlx
26
+ ---
27
+
28
+ # mlx-community/llm-jp-3.1-8x13b-instruct4-8bit
29
+
30
+ This model [mlx-community/llm-jp-3.1-8x13b-instruct4-8bit](https://huggingface.co/mlx-community/llm-jp-3.1-8x13b-instruct4-8bit) was
31
+ converted to MLX format from [llm-jp/llm-jp-3.1-8x13b-instruct4](https://huggingface.co/llm-jp/llm-jp-3.1-8x13b-instruct4)
32
+ using mlx-lm version **0.24.1**.
33
+
34
+ ## Use with mlx
35
+
36
+ ```bash
37
+ pip install mlx-lm
38
+ ```
39
+
40
+ ```python
41
+ from mlx_lm import load, generate
42
+
43
+ model, tokenizer = load("mlx-community/llm-jp-3.1-8x13b-instruct4-8bit")
44
+
45
+ prompt = "hello"
46
+
47
+ if tokenizer.chat_template is not None:
48
+ messages = [{"role": "user", "content": prompt}]
49
+ prompt = tokenizer.apply_chat_template(
50
+ messages, add_generation_prompt=True
51
+ )
52
+
53
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
54
+ ```
config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "MixtralForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "eos_token_id": 2,
9
+ "head_dim": 128,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 5120,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 13824,
14
+ "max_position_embeddings": 4096,
15
+ "mlp_bias": false,
16
+ "model_type": "mixtral",
17
+ "num_attention_heads": 40,
18
+ "num_experts_per_tok": 2,
19
+ "num_hidden_layers": 40,
20
+ "num_key_value_heads": 40,
21
+ "num_local_experts": 8,
22
+ "output_router_logits": false,
23
+ "quantization": {
24
+ "group_size": 64,
25
+ "bits": 8
26
+ },
27
+ "quantization_config": {
28
+ "group_size": 64,
29
+ "bits": 8
30
+ },
31
+ "rms_norm_eps": 1e-05,
32
+ "rope_theta": 10000,
33
+ "router_aux_loss_coef": 0.01,
34
+ "router_jitter_noise": 0.0,
35
+ "sliding_window": null,
36
+ "tie_word_embeddings": false,
37
+ "torch_dtype": "bfloat16",
38
+ "transformers_version": "4.47.0",
39
+ "use_cache": true,
40
+ "vocab_size": 99584
41
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "transformers_version": "4.47.0"
6
+ }
model-00001-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d01be6c15f9aafde0c23d7c3cebb43fa68ef61cc21865913b81b8194360834f8
3
+ size 5087494332
model-00002-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed8b36de36dfe1c4a8ac11ae8a83a87a1cfc8eb81f1e33df7f32bddc3c7a5fd6
3
+ size 5147398606
model-00003-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d376feac92613c403b9b624e05ab698784f7c8d273b96ad626e73ee80a6f142
3
+ size 5035921484
model-00004-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:542212659f62efe3faae0b560f3eb2f02e1bf4ec8c2bc7b065ecf0dec49a72ca
3
+ size 5147398686
model-00005-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2da92c3247a12c07bda9a944c07d85191e9a87b439b24e78554b4b47481c8e88
3
+ size 5147398689
model-00006-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b50ff0361d4bb2fce32346ecfa51af9aec9c399229f11e7212e3475e336e5372
3
+ size 5035921556
model-00007-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6408d40bf65c751075f34cd41df8fe0e029fc204ec1ad5c430037479ed75373
3
+ size 5147398693
model-00008-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d8d2ffab7fe28fa60e481b66bb5822f6ac814aace401debd0692040a55a7df5
3
+ size 5147398743
model-00009-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:01c39e59d1ad04fe629e1069c9d8ff4336e71165e66e235ad546759d6b3c6be5
3
+ size 5035921548
model-00010-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:32b2fc41f6c5455a1ea2638acf393986a2f84bf682d9ff90edaf463f900aca0d
3
+ size 5147398737
model-00011-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28f4fb4355ea483196f99d20741d67fbc0348e83259ef2a982e3de08b60b31de
3
+ size 5147398703
model-00012-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc563f21d0fa45b57c7ebd00b5093022904d112b51cb50b2aef3451db3324779
3
+ size 5035921576
model-00013-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48a8229b70c7b9cd13a8b66f84d7171450e35fe8a5c652920528a53f9ec19a8f
3
+ size 5147398723
model-00014-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84a4b2a0304338013b13637e8fdb2eca99732b4a6b612a70727a4215a9ffcdb7
3
+ size 5147398703
model-00015-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:277e906ba1b5897750a4f2fbeb66cef99e7aea9b3b4329f38c88899058db18e6
3
+ size 5035921578
model-00016-of-00016.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4ff196d20cab0e92254ffca5f0872aea73a20a3b4195548199ffde4e0eb06306
3
+ size 1143389197
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<CLS|LLM-jp>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<MASK|LLM-jp>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<PAD|LLM-jp>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "<SEP|LLM-jp>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "added_tokens_decoder": {
5
+ "0": {
6
+ "content": "<unk>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "1": {
14
+ "content": "<s>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "2": {
22
+ "content": "</s>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "3": {
30
+ "content": "<MASK|LLM-jp>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "4": {
38
+ "content": "<PAD|LLM-jp>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "5": {
46
+ "content": "<CLS|LLM-jp>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "6": {
54
+ "content": "<SEP|LLM-jp>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "7": {
62
+ "content": "<EOD|LLM-jp>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ }
69
+ },
70
+ "bos_token": "<s>",
71
+ "chat_template": "{{bos_token}}{% for message in messages %}{% if message['role'] == 'user' %}{{ '\\n\\n### 指示:\\n' + message['content'] }}{% elif message['role'] == 'system' %}{{ '以下は、タスクを説明する指示です。要求を適切に満たす応答を書きなさい。' }}{% elif message['role'] == 'assistant' %}{{ '\\n\\n### 応答:\\n' + message['content'] + eos_token }}{% endif %}{% if loop.last and add_generation_prompt %}{{ '\\n\\n### 応答:\\n' }}{% endif %}{% endfor %}",
72
+ "clean_up_tokenization_spaces": false,
73
+ "cls_token": "<CLS|LLM-jp>",
74
+ "eod_token": "</s>",
75
+ "eos_token": "</s>",
76
+ "extra_ids": 0,
77
+ "extra_special_tokens": {},
78
+ "mask_token": "<MASK|LLM-jp>",
79
+ "model_max_length": 1000000000000000019884624838656,
80
+ "pad_token": "<PAD|LLM-jp>",
81
+ "sep_token": "<SEP|LLM-jp>",
82
+ "sp_model_kwargs": {},
83
+ "tokenizer_class": "PreTrainedTokenizer",
84
+ "unk_token": "<unk>"
85
+ }