vqstudio commited on
Commit
104324f
·
verified ·
1 Parent(s): fb8f98d

Add files using upload-large-folder tool

Browse files
README.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: speakleash/Bielik-4.5B-v3.0-Instruct
4
+ language:
5
+ - pl
6
+ library_name: mlx
7
+ tags:
8
+ - finetuned
9
+ - mlx
10
+ inference:
11
+ parameters:
12
+ temperature: 0.4
13
+ widget:
14
+ - messages:
15
+ - role: user
16
+ content: Co przedstawia polskie godło?
17
+ extra_gated_description: If you want to learn more about how you can use the model,
18
+ please refer to our <a href="https://bielik.ai/terms/">Terms of Use</a>.
19
+ pipeline_tag: text-generation
20
+ ---
21
+
22
+ # vqstudio/Bielik-4.5B-v3.0-Instruct-MLX-4bit
23
+
24
+ This model [vqstudio/Bielik-4.5B-v3.0-Instruct-MLX-4bit](https://huggingface.co/vqstudio/Bielik-4.5B-v3.0-Instruct-MLX-4bit) was
25
+ converted to MLX format from [speakleash/Bielik-4.5B-v3.0-Instruct](https://huggingface.co/speakleash/Bielik-4.5B-v3.0-Instruct)
26
+ using mlx-lm version **0.28.3**.
27
+
28
+ ## Use with mlx
29
+
30
+ ```bash
31
+ pip install mlx-lm
32
+ ```
33
+
34
+ ```python
35
+ from mlx_lm import load, generate
36
+
37
+ model, tokenizer = load("vqstudio/Bielik-4.5B-v3.0-Instruct-MLX-4bit")
38
+
39
+ prompt = "hello"
40
+
41
+ if tokenizer.chat_template is not None:
42
+ messages = [{"role": "user", "content": prompt}]
43
+ prompt = tokenizer.apply_chat_template(
44
+ messages, add_generation_prompt=True
45
+ )
46
+
47
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
48
+ ```
chat_template.jinja ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {{bos_token}}{% for message in messages %}{{'<|im_start|>' + message['role'] + '
2
+ ' + message['content'] + '<|im_end|>' + '
3
+ '}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
4
+ ' }}{% endif %}
config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": true,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "eos_token_id": [
9
+ 4,
10
+ 2
11
+ ],
12
+ "head_dim": 128,
13
+ "hidden_act": "silu",
14
+ "hidden_size": 2048,
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 11008,
17
+ "max_position_embeddings": 32768,
18
+ "mlp_bias": true,
19
+ "model_type": "llama",
20
+ "num_attention_heads": 16,
21
+ "num_hidden_layers": 60,
22
+ "num_key_value_heads": 2,
23
+ "pad_token_id": 2,
24
+ "pretraining_tp": 1,
25
+ "quantization": {
26
+ "group_size": 64,
27
+ "bits": 4,
28
+ "mode": "affine"
29
+ },
30
+ "quantization_config": {
31
+ "group_size": 64,
32
+ "bits": 4,
33
+ "mode": "affine"
34
+ },
35
+ "rms_norm_eps": 1e-06,
36
+ "rope_scaling": null,
37
+ "rope_theta": 1000000,
38
+ "tie_word_embeddings": false,
39
+ "torch_dtype": "bfloat16",
40
+ "transformers_version": "4.51.3",
41
+ "use_cache": true,
42
+ "vocab_size": 32000
43
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": [ 4, 2 ],
5
+ "pad_token_id": 2,
6
+ "transformers_version": "4.51.3"
7
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8039da728c8c3562e1b022eada7207fd914a7c4ec62e3ae92d607df9ddcdf91
3
+ size 2678991340
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,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<tool_call>",
6
+ "</tool_call>"
7
+ ],
8
+ "bos_token": {
9
+ "content": "<s>",
10
+ "lstrip": false,
11
+ "normalized": false,
12
+ "rstrip": false,
13
+ "single_word": false
14
+ },
15
+ "eos_token": {
16
+ "content": "<|im_end|>",
17
+ "lstrip": false,
18
+ "normalized": false,
19
+ "rstrip": false,
20
+ "single_word": false
21
+ },
22
+ "pad_token": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false
28
+ },
29
+ "unk_token": {
30
+ "content": "<unk>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false
35
+ }
36
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": null,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ },
30
+ "3": {
31
+ "content": "<|im_start|>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": true
37
+ },
38
+ "4": {
39
+ "content": "<|im_end|>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": false,
43
+ "single_word": false,
44
+ "special": true
45
+ },
46
+ "5": {
47
+ "content": "<tool_call>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": false,
51
+ "single_word": false,
52
+ "special": true
53
+ },
54
+ "6": {
55
+ "content": "</tool_call>",
56
+ "lstrip": false,
57
+ "normalized": false,
58
+ "rstrip": false,
59
+ "single_word": false,
60
+ "special": true
61
+ }
62
+ },
63
+ "additional_special_tokens": [
64
+ "<|im_start|>",
65
+ "<|im_end|>",
66
+ "<tool_call>",
67
+ "</tool_call>"
68
+ ],
69
+ "bos_token": "<s>",
70
+ "clean_up_tokenization_spaces": false,
71
+ "eos_token": "<|im_end|>",
72
+ "extra_special_tokens": {},
73
+ "legacy": true,
74
+ "model_max_length": 1000000000000000019884624838656,
75
+ "pad_token": "</s>",
76
+ "sp_model_kwargs": {},
77
+ "spaces_between_special_tokens": false,
78
+ "tokenizer_class": "LlamaTokenizerFast",
79
+ "unk_token": "<unk>",
80
+ "use_default_system_prompt": false
81
+ }