Upload folder using huggingface_hub
Browse files- README.md +27 -0
- added_tokens.json +4 -0
- config.json +84 -0
- special_tokens_map.json +27 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +62 -0
- weights.00.safetensors +3 -0
README.md
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
library_name: transformers
|
4 |
+
tags:
|
5 |
+
- openchat
|
6 |
+
- mistral
|
7 |
+
- C-RLFT
|
8 |
+
- mlx
|
9 |
+
base_model: mistralai/Mistral-7B-v0.1
|
10 |
+
pipeline_tag: text-generation
|
11 |
+
---
|
12 |
+
|
13 |
+
# mlx-community/openchat-3.5-0106-4bit-mlx
|
14 |
+
This model was converted to MLX format from [`openchat/openchat-3.5-0106`]().
|
15 |
+
Refer to the [original model card](https://huggingface.co/openchat/openchat-3.5-0106) for more details on the model.
|
16 |
+
## Use with mlx
|
17 |
+
|
18 |
+
```bash
|
19 |
+
pip install mlx-lm
|
20 |
+
```
|
21 |
+
|
22 |
+
```python
|
23 |
+
from mlx_lm import load, generate
|
24 |
+
|
25 |
+
model, tokenizer = load("mlx-community/openchat-3.5-0106-4bit-mlx")
|
26 |
+
response = generate(model, tokenizer, prompt="hello", verbose=True)
|
27 |
+
```
|
added_tokens.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"<|end_of_turn|>": 32000,
|
3 |
+
"<|pad_0|>": 32001
|
4 |
+
}
|
config.json
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"vocab_size": 32002,
|
3 |
+
"max_position_embeddings": 8192,
|
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": true,
|
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 |
+
"is_encoder_decoder": false,
|
26 |
+
"is_decoder": false,
|
27 |
+
"cross_attention_hidden_size": null,
|
28 |
+
"add_cross_attention": false,
|
29 |
+
"tie_encoder_decoder": false,
|
30 |
+
"max_length": 20,
|
31 |
+
"min_length": 0,
|
32 |
+
"do_sample": false,
|
33 |
+
"early_stopping": false,
|
34 |
+
"num_beams": 1,
|
35 |
+
"num_beam_groups": 1,
|
36 |
+
"diversity_penalty": 0.0,
|
37 |
+
"temperature": 1.0,
|
38 |
+
"top_k": 50,
|
39 |
+
"top_p": 1.0,
|
40 |
+
"typical_p": 1.0,
|
41 |
+
"repetition_penalty": 1.0,
|
42 |
+
"length_penalty": 1.0,
|
43 |
+
"no_repeat_ngram_size": 0,
|
44 |
+
"encoder_no_repeat_ngram_size": 0,
|
45 |
+
"bad_words_ids": null,
|
46 |
+
"num_return_sequences": 1,
|
47 |
+
"chunk_size_feed_forward": 0,
|
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": 32000,
|
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/def_init_/.cache/huggingface/hub/models--openchat--openchat-3.5-0106/snapshots/9619fb7d2a8e25fa6b0633c0f57f7f4aa79b45c4",
|
78 |
+
"transformers_version": "4.36.2",
|
79 |
+
"model_type": "mistral",
|
80 |
+
"quantization": {
|
81 |
+
"group_size": 64,
|
82 |
+
"bits": 4
|
83 |
+
}
|
84 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<|end_of_turn|>",
|
4 |
+
"<|pad_0|>"
|
5 |
+
],
|
6 |
+
"bos_token": {
|
7 |
+
"content": "<s>",
|
8 |
+
"lstrip": false,
|
9 |
+
"normalized": false,
|
10 |
+
"rstrip": false,
|
11 |
+
"single_word": false
|
12 |
+
},
|
13 |
+
"eos_token": {
|
14 |
+
"content": "<|end_of_turn|>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false
|
19 |
+
},
|
20 |
+
"unk_token": {
|
21 |
+
"content": "<unk>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": false,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false
|
26 |
+
}
|
27 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
|
3 |
+
size 493443
|
tokenizer_config.json
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"32000": {
|
30 |
+
"content": "<|end_of_turn|>",
|
31 |
+
"lstrip": false,
|
32 |
+
"normalized": false,
|
33 |
+
"rstrip": false,
|
34 |
+
"single_word": false,
|
35 |
+
"special": true
|
36 |
+
},
|
37 |
+
"32001": {
|
38 |
+
"content": "<|pad_0|>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false,
|
43 |
+
"special": true
|
44 |
+
}
|
45 |
+
},
|
46 |
+
"additional_special_tokens": [
|
47 |
+
"<|end_of_turn|>",
|
48 |
+
"<|pad_0|>"
|
49 |
+
],
|
50 |
+
"bos_token": "<s>",
|
51 |
+
"chat_template": "{{ bos_token }}{% for message in messages %}{{ 'GPT4 Correct ' + message['role'].title() + ': ' + message['content'] + '<|end_of_turn|>'}}{% endfor %}{% if add_generation_prompt %}{{ 'GPT4 Correct Assistant:' }}{% endif %}",
|
52 |
+
"clean_up_tokenization_spaces": false,
|
53 |
+
"eos_token": "<|end_of_turn|>",
|
54 |
+
"legacy": true,
|
55 |
+
"model_max_length": 1000000000000000019884624838656,
|
56 |
+
"pad_token": null,
|
57 |
+
"sp_model_kwargs": {},
|
58 |
+
"spaces_between_special_tokens": false,
|
59 |
+
"tokenizer_class": "LlamaTokenizer",
|
60 |
+
"unk_token": "<unk>",
|
61 |
+
"use_default_system_prompt": true
|
62 |
+
}
|
weights.00.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7e7e28defe2619ebb241c0600368e9fa0652250f087c38711fbdffd34c80199d
|
3 |
+
size 4450805719
|