depasquale commited on
Commit
aec94ec
·
verified ·
1 Parent(s): 7bdfff5

Add files using upload-large-folder tool

Browse files
README.md ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: allenai/Olmo-3.1-32B-Think
4
+ language:
5
+ - en
6
+ datasets:
7
+ - allenai/Dolci-Think-RL
8
+ library_name: mlx
9
+ pipeline_tag: text-generation
10
+ tags:
11
+ - mlx
12
+ ---
13
+
14
+ # mlx-community/Olmo-3.1-32B-Think-4bit
15
+
16
+ This model [mlx-community/Olmo-3.1-32B-Think-4bit](https://huggingface.co/mlx-community/Olmo-3.1-32B-Think-4bit) was
17
+ converted to MLX format from [allenai/Olmo-3.1-32B-Think](https://huggingface.co/allenai/Olmo-3.1-32B-Think)
18
+ using mlx-lm version **0.29.2**.
19
+
20
+ ## Use with mlx
21
+
22
+ ```bash
23
+ pip install mlx-lm
24
+ ```
25
+
26
+ ```python
27
+ from mlx_lm import load, generate
28
+
29
+ model, tokenizer = load("mlx-community/Olmo-3.1-32B-Think-4bit")
30
+
31
+ prompt = "hello"
32
+
33
+ if tokenizer.chat_template is not None:
34
+ messages = [{"role": "user", "content": prompt}]
35
+ prompt = tokenizer.apply_chat_template(
36
+ messages, add_generation_prompt=True, return_dict=False,
37
+ )
38
+
39
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
40
+ ```
chat_template.jinja ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% set has_system = messages|selectattr('role', 'equalto', 'system')|list|length > 0 %}{% if not has_system %}{{ '<|im_start|>system
2
+ You are Olmo, a helpful AI assistant built by Ai2. Your date cutoff is December 2024, and your model weights are available at https://huggingface.co/allenai.<|im_end|>
3
+ ' }}{% endif %}{% for message in messages %}{% if message['role'] == 'system' %}{{ '<|im_start|>system
4
+ ' + message['content'] }}{% if message.get('functions', none) is not none %}{{ ' <functions>' + message['functions'] + '</functions><|im_end|>
5
+ ' }}{% else %}{{ ' You do not currently have access to any functions. <functions></functions><|im_end|>
6
+ ' }}{% endif %}{% elif message['role'] == 'user' %}{% if message.get('functions', none) is not none %}{{ '<|im_start|>user
7
+ ' + message['content'] + '
8
+ ' + '<functions>' + message['functions'] + '</functions><|im_end|>
9
+ ' }}{% else %}{{ '<|im_start|>user
10
+ ' + message['content'] + '<|im_end|>
11
+ ' }}{% endif %}{% elif message['role'] == 'assistant' %}{{ '<|im_start|>assistant
12
+ ' }}{% if message.get('content', none) is not none %}{{ message['content'] }}{% endif %}{% if message.get('function_calls', none) is not none %}{{ '<function_calls>' + message['function_calls'] + '</function_calls>' }}{% endif %}{% if not loop.last %}{{ '<|im_end|>' + '
13
+ ' }}{% else %}{{ eos_token }}{% endif %}{% elif message['role'] == 'environment' %}{{ '<|im_start|>environment
14
+ ' + message['content'] + '<|im_end|>
15
+ ' }}{% endif %}{% if loop.last and add_generation_prompt %}{{ '<|im_start|>assistant
16
+ <think>' }}{% endif %}{% endfor %}
config.json ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Olmo3ForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "dtype": "bfloat16",
8
+ "eos_token_id": 100257,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 5120,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 27648,
13
+ "layer_types": [
14
+ "sliding_attention",
15
+ "sliding_attention",
16
+ "sliding_attention",
17
+ "full_attention",
18
+ "sliding_attention",
19
+ "sliding_attention",
20
+ "sliding_attention",
21
+ "full_attention",
22
+ "sliding_attention",
23
+ "sliding_attention",
24
+ "sliding_attention",
25
+ "full_attention",
26
+ "sliding_attention",
27
+ "sliding_attention",
28
+ "sliding_attention",
29
+ "full_attention",
30
+ "sliding_attention",
31
+ "sliding_attention",
32
+ "sliding_attention",
33
+ "full_attention",
34
+ "sliding_attention",
35
+ "sliding_attention",
36
+ "sliding_attention",
37
+ "full_attention",
38
+ "sliding_attention",
39
+ "sliding_attention",
40
+ "sliding_attention",
41
+ "full_attention",
42
+ "sliding_attention",
43
+ "sliding_attention",
44
+ "sliding_attention",
45
+ "full_attention",
46
+ "sliding_attention",
47
+ "sliding_attention",
48
+ "sliding_attention",
49
+ "full_attention",
50
+ "sliding_attention",
51
+ "sliding_attention",
52
+ "sliding_attention",
53
+ "full_attention",
54
+ "sliding_attention",
55
+ "sliding_attention",
56
+ "sliding_attention",
57
+ "full_attention",
58
+ "sliding_attention",
59
+ "sliding_attention",
60
+ "sliding_attention",
61
+ "full_attention",
62
+ "sliding_attention",
63
+ "sliding_attention",
64
+ "sliding_attention",
65
+ "full_attention",
66
+ "sliding_attention",
67
+ "sliding_attention",
68
+ "sliding_attention",
69
+ "full_attention",
70
+ "sliding_attention",
71
+ "sliding_attention",
72
+ "sliding_attention",
73
+ "full_attention",
74
+ "sliding_attention",
75
+ "sliding_attention",
76
+ "sliding_attention",
77
+ "full_attention"
78
+ ],
79
+ "max_position_embeddings": 65536,
80
+ "model_type": "olmo3",
81
+ "num_attention_heads": 40,
82
+ "num_hidden_layers": 64,
83
+ "num_key_value_heads": 8,
84
+ "pad_token_id": 100277,
85
+ "quantization": {
86
+ "group_size": 64,
87
+ "bits": 4,
88
+ "mode": "affine"
89
+ },
90
+ "quantization_config": {
91
+ "group_size": 64,
92
+ "bits": 4,
93
+ "mode": "affine"
94
+ },
95
+ "rms_norm_eps": 1e-06,
96
+ "rope_scaling": {
97
+ "attention_factor": 1.2079441541679836,
98
+ "beta_fast": 32.0,
99
+ "beta_slow": 1.0,
100
+ "factor": 8.0,
101
+ "original_max_position_embeddings": 8192,
102
+ "rope_type": "yarn"
103
+ },
104
+ "rope_theta": 500000,
105
+ "sliding_window": 4096,
106
+ "tie_word_embeddings": false,
107
+ "transformers_version": "4.57.1",
108
+ "use_cache": false,
109
+ "vocab_size": 100278
110
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "do_sample": true,
4
+ "eos_token_id": 100257,
5
+ "pad_token_id": 100277,
6
+ "transformers_version": "4.57.1",
7
+ "temperature": 0.6,
8
+ "top_p": 0.95,
9
+ "max_new_tokens": 32768
10
+ }
model-00001-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9729ae2a4a6273a377634393d7158872ade05626d3adeebb02af75573a0d5f99
3
+ size 5341298988
model-00002-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5bf58beb4943e806a26b371e213973c359b36b005564450fcf81ec622a4b01b9
3
+ size 5366601614
model-00003-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8140e30c97635b3dc9accde3250443300ca349faaa573d8285cbe5b36addccea
3
+ size 5331246640
model-00004-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f86ab304df9046448328b146d1865f9035794b039f2bcc708c0079e744fa92d3
3
+ size 2093907822
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "additional_special_tokens": null,
5
+ "backend": "tokenizers",
6
+ "bos_token": "<|endoftext|>",
7
+ "clean_up_tokenization_spaces": false,
8
+ "eos_token": "<|endoftext|>",
9
+ "errors": "replace",
10
+ "is_local": true,
11
+ "model_max_length": 65536,
12
+ "model_specific_special_tokens": {},
13
+ "pad_token": "<|pad|>",
14
+ "tokenizer_class": "GPT2Tokenizer",
15
+ "unk_token": "<|endoftext|>"
16
+ }