Instructions to use Neo39982/Behemoth-R1-123B-v2-mlx-4Bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Neo39982/Behemoth-R1-123B-v2-mlx-4Bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir Behemoth-R1-123B-v2-mlx-4Bit Neo39982/Behemoth-R1-123B-v2-mlx-4Bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
Upload folder using huggingface_hub
Browse files- README.md +31 -0
- chat_template.jinja +1 -0
- config.json +36 -0
- model-00001-of-00014.safetensors +3 -0
- model-00002-of-00014.safetensors +3 -0
- model-00003-of-00014.safetensors +3 -0
- model-00004-of-00014.safetensors +3 -0
- model-00005-of-00014.safetensors +3 -0
- model-00006-of-00014.safetensors +3 -0
- model-00007-of-00014.safetensors +3 -0
- model-00008-of-00014.safetensors +3 -0
- model-00009-of-00014.safetensors +3 -0
- model-00010-of-00014.safetensors +3 -0
- model-00011-of-00014.safetensors +3 -0
- model-00012-of-00014.safetensors +3 -0
- model-00013-of-00014.safetensors +3 -0
- model-00014-of-00014.safetensors +3 -0
- model.safetensors.index.json +0 -0
- tokenizer.json +0 -0
- tokenizer_config.json +16 -0
README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: TheDrummer/Behemoth-R1-123B-v2
|
| 3 |
+
tags:
|
| 4 |
+
- mlx
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# Neo39982/Behemoth-R1-123B-v2-mlx-4Bit
|
| 8 |
+
|
| 9 |
+
The Model [Neo39982/Behemoth-R1-123B-v2-mlx-4Bit](https://huggingface.co/Neo39982/Behemoth-R1-123B-v2-mlx-4Bit) was converted to MLX format from [TheDrummer/Behemoth-R1-123B-v2](https://huggingface.co/TheDrummer/Behemoth-R1-123B-v2) using mlx-lm version **0.31.2**.
|
| 10 |
+
|
| 11 |
+
## Use with mlx
|
| 12 |
+
|
| 13 |
+
```bash
|
| 14 |
+
pip install mlx-lm
|
| 15 |
+
```
|
| 16 |
+
|
| 17 |
+
```python
|
| 18 |
+
from mlx_lm import load, generate
|
| 19 |
+
|
| 20 |
+
model, tokenizer = load("Neo39982/Behemoth-R1-123B-v2-mlx-4Bit")
|
| 21 |
+
|
| 22 |
+
prompt="hello"
|
| 23 |
+
|
| 24 |
+
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
|
| 25 |
+
messages = [{"role": "user", "content": prompt}]
|
| 26 |
+
prompt = tokenizer.apply_chat_template(
|
| 27 |
+
messages, tokenize=False, add_generation_prompt=True
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
| 31 |
+
```
|
chat_template.jinja
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{{ bos_token }}{% for message in messages %}{% if message['role'] == 'user' %}{{ '[INST] ' + message['content'] + '[/INST]' }}{% elif message['role'] == 'system' %}{{ '[SYSTEM_PROMPT] ' + message['content'] + '[/SYSTEM_PROMPT]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + message['content'] + eos_token }}{% else %}{{ raise_exception('Only user, system and assistant roles are supported!') }}{% endif %}{% endfor %}
|
config.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"MistralForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_dropout": 0.0,
|
| 6 |
+
"bos_token_id": 1,
|
| 7 |
+
"eos_token_id": 2,
|
| 8 |
+
"head_dim": 128,
|
| 9 |
+
"hidden_act": "silu",
|
| 10 |
+
"hidden_size": 12288,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 28672,
|
| 13 |
+
"max_position_embeddings": 131072,
|
| 14 |
+
"model_type": "mistral",
|
| 15 |
+
"num_attention_heads": 96,
|
| 16 |
+
"num_hidden_layers": 88,
|
| 17 |
+
"num_key_value_heads": 8,
|
| 18 |
+
"quantization": {
|
| 19 |
+
"group_size": 64,
|
| 20 |
+
"bits": 4,
|
| 21 |
+
"mode": "affine"
|
| 22 |
+
},
|
| 23 |
+
"quantization_config": {
|
| 24 |
+
"group_size": 64,
|
| 25 |
+
"bits": 4,
|
| 26 |
+
"mode": "affine"
|
| 27 |
+
},
|
| 28 |
+
"rms_norm_eps": 1e-05,
|
| 29 |
+
"rope_theta": 1000000.0,
|
| 30 |
+
"sliding_window": null,
|
| 31 |
+
"tie_word_embeddings": false,
|
| 32 |
+
"torch_dtype": "bfloat16",
|
| 33 |
+
"transformers_version": "4.55.2",
|
| 34 |
+
"use_cache": true,
|
| 35 |
+
"vocab_size": 32768
|
| 36 |
+
}
|
model-00001-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dc0183097eefae83012a31041b6a2a185d4dca51323511f1720abe2c43396305
|
| 3 |
+
size 5280417270
|
model-00002-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cd0746992a2e99acd0eef9edbf9922d530f3de415230638d95ad4ef431893107
|
| 3 |
+
size 5252155204
|
model-00003-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e2f72b12fb73634e4703578053a4a5bb27f05536e2814c5643ef92ff90fdbf17
|
| 3 |
+
size 5365401460
|
model-00004-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b6f42d46a268266a7e35863f511ad74902029c89dac45981c12727bdbd470a8e
|
| 3 |
+
size 5351245024
|
model-00005-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6efbda73ee14e1fae66131fd32f85ed64c3ab35e4685b049a03d56f2f1192e3d
|
| 3 |
+
size 5252105900
|
model-00006-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e6acf228ecb6b8215fb27ab7b346142c66e73e51f86a1af8d04156b72ad26b34
|
| 3 |
+
size 5252155303
|
model-00007-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:97f2ef2ad5991148c0a3e36191088b1268edd6b82835bc267a852fb5ede7ad45
|
| 3 |
+
size 5252155295
|
model-00008-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fdd66245d64fa3c4c1f8c34d88f836043e0a96b60ad936d2e96aa6513e75755d
|
| 3 |
+
size 5365401498
|
model-00009-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c0c6a570dc2cd7ead63231b0c09415189e0faf4689349653cc36e1a05c0eb5fe
|
| 3 |
+
size 5351245036
|
model-00010-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4b1ad0fd80bdcc17730bb974a3e66e5da059d738a6c1da3fad36a6e362b047cb
|
| 3 |
+
size 5252105932
|
model-00011-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:15c680b01cb5365370ccfbd7b3444a4079d811b7bfffb467530e7bdfaa2784ca
|
| 3 |
+
size 5252155279
|
model-00012-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5855852bd4624b6c713ddd1364a9b124907e7761d5ec2c81495739fa95b8b17d
|
| 3 |
+
size 5252155273
|
model-00013-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0949bb1c36450b0453559a6f62966647b91bdc01f393ed2912813d577a11b909
|
| 3 |
+
size 5266334648
|
model-00014-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:349771ad8a9c737f329bdfdc0f8058aedf86f1cff40a4465330dc27ef23d59ae
|
| 3 |
+
size 226492718
|
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_prefix_space": null,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"is_local": true,
|
| 8 |
+
"legacy": true,
|
| 9 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 10 |
+
"pad_token": null,
|
| 11 |
+
"sp_model_kwargs": {},
|
| 12 |
+
"spaces_between_special_tokens": false,
|
| 13 |
+
"tokenizer_class": "TokenizersBackend",
|
| 14 |
+
"unk_token": "<unk>",
|
| 15 |
+
"use_default_system_prompt": false
|
| 16 |
+
}
|