YouJun3627 commited on
Commit
cd9d59f
1 Parent(s): 71c6aa2

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - zh
4
+ - en
5
+ license: apache-2.0
6
+ tags:
7
+ - mlx
8
+ pipeline_tag: text-generation
9
+ ---
10
+
11
+ # YouJun3627/Breeze-7B-Instruct-v0_1-4bit-mlx
12
+ This model was converted to MLX format from [`MediaTek-Research/Breeze-7B-Instruct-v0_1`]().
13
+ Refer to the [original model card](https://huggingface.co/MediaTek-Research/Breeze-7B-Instruct-v0_1) for more details on the model.
14
+ ## Use with mlx
15
+
16
+ ```bash
17
+ pip install mlx-lm
18
+ ```
19
+
20
+ ```python
21
+ from mlx_lm import load, generate
22
+
23
+ model, tokenizer = load("YouJun3627/Breeze-7B-Instruct-v0_1-4bit-mlx")
24
+ response = generate(model, tokenizer, prompt="hello", verbose=True)
25
+ ```
config.json ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "vocab_size": 61952,
3
+ "max_position_embeddings": 32768,
4
+ "hidden_size": 4096,
5
+ "intermediate_size": 14336,
6
+ "num_hidden_layers": 32,
7
+ "num_attention_heads": 32,
8
+ "sliding_window": 4096,
9
+ "num_key_value_heads": 8,
10
+ "hidden_act": "silu",
11
+ "initializer_range": 0.02,
12
+ "rms_norm_eps": 1e-05,
13
+ "use_cache": false,
14
+ "rope_theta": 10000.0,
15
+ "attention_dropout": 0.0,
16
+ "return_dict": true,
17
+ "output_hidden_states": false,
18
+ "output_attentions": false,
19
+ "torchscript": false,
20
+ "torch_dtype": "bfloat16",
21
+ "use_bfloat16": false,
22
+ "tf_legacy_loss": false,
23
+ "pruned_heads": {},
24
+ "tie_word_embeddings": false,
25
+ "chunk_size_feed_forward": 0,
26
+ "is_encoder_decoder": false,
27
+ "is_decoder": false,
28
+ "cross_attention_hidden_size": null,
29
+ "add_cross_attention": false,
30
+ "tie_encoder_decoder": false,
31
+ "max_length": 20,
32
+ "min_length": 0,
33
+ "do_sample": false,
34
+ "early_stopping": false,
35
+ "num_beams": 1,
36
+ "num_beam_groups": 1,
37
+ "diversity_penalty": 0.0,
38
+ "temperature": 1.0,
39
+ "top_k": 50,
40
+ "top_p": 1.0,
41
+ "typical_p": 1.0,
42
+ "repetition_penalty": 1.0,
43
+ "length_penalty": 1.0,
44
+ "no_repeat_ngram_size": 0,
45
+ "encoder_no_repeat_ngram_size": 0,
46
+ "bad_words_ids": null,
47
+ "num_return_sequences": 1,
48
+ "output_scores": false,
49
+ "return_dict_in_generate": false,
50
+ "forced_bos_token_id": null,
51
+ "forced_eos_token_id": null,
52
+ "remove_invalid_values": false,
53
+ "exponential_decay_length_penalty": null,
54
+ "suppress_tokens": null,
55
+ "begin_suppress_tokens": null,
56
+ "architectures": [
57
+ "MistralForCausalLM"
58
+ ],
59
+ "finetuning_task": null,
60
+ "id2label": {
61
+ "0": "LABEL_0",
62
+ "1": "LABEL_1"
63
+ },
64
+ "label2id": {
65
+ "LABEL_0": 0,
66
+ "LABEL_1": 1
67
+ },
68
+ "tokenizer_class": null,
69
+ "prefix": null,
70
+ "bos_token_id": 1,
71
+ "pad_token_id": null,
72
+ "eos_token_id": 2,
73
+ "sep_token_id": null,
74
+ "decoder_start_token_id": null,
75
+ "task_specific_params": null,
76
+ "problem_type": null,
77
+ "_name_or_path": "/Users/eugene/.cache/huggingface/hub/models--MediaTek-Research--Breeze-7B-Instruct-v0_1/snapshots/232eee4a67d8a60b39c4528a88dbaf3ad44b6232",
78
+ "transformers_version": "4.37.2",
79
+ "model_type": "mistral",
80
+ "pretraining_tp": 1,
81
+ "quantization": {
82
+ "group_size": 64,
83
+ "bits": 4
84
+ }
85
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28692fe1f3a1f8eb5132aa7892d0134ef2bab72d2fd59d0a03242a6fab688c0c
3
+ size 4576733294
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "61873": {
30
+ "content": "<EOD>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "61874": {
38
+ "content": "<PAD>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ }
45
+ },
46
+ "bos_token": "<s>",
47
+ "chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'].strip() %}{% else %}{% set loop_messages = messages %}{% set system_message = 'You are a helpful AI assistant built by MediaTek Research. The user you are helping speaks Traditional Chinese and comes from Taiwan.' %}{% endif %}{{ bos_token }}{{ system_message }} {% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/... or system/user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ '[INST] ' + message['content'] + ' [/INST] ' }}{% elif message['role'] == 'assistant' %}{{ message['content'] + ' ' }}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}",
48
+ "clean_up_tokenization_spaces": false,
49
+ "eos_token": "</s>",
50
+ "legacy": true,
51
+ "model_max_length": 1000000000000000019884624838656,
52
+ "pad_token": "</s>",
53
+ "padding_side": "right",
54
+ "sp_model_kwargs": {},
55
+ "spaces_between_special_tokens": false,
56
+ "split_special_tokens": false,
57
+ "tokenizer_class": "LlamaTokenizer",
58
+ "unk_token": "<unk>",
59
+ "use_default_system_prompt": false
60
+ }