8c4956c7ba83076a372e638e7687f0b052984113fedd2819bb17fad5e40f26d2
Browse files- README.md +47 -0
- config.json +34 -0
- model-00014-of-00014.safetensors +3 -0
- model.safetensors.index.json +0 -0
- special_tokens_map.json +30 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +0 -0
README.md
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
license_name: mrl
|
4 |
+
language:
|
5 |
+
- en
|
6 |
+
tags:
|
7 |
+
- chat
|
8 |
+
- mlx
|
9 |
+
pipeline_tag: text-generation
|
10 |
+
library_name: transformers
|
11 |
+
datasets:
|
12 |
+
- anthracite-org/c2_logs_16k_mistral-large_v1.2
|
13 |
+
- anthracite-org/kalo-opus-instruct-22k-no-refusal
|
14 |
+
- lodrick-the-lafted/kalo-opus-instruct-3k-filtered
|
15 |
+
- anthracite-org/nopm_claude_writing_fixed
|
16 |
+
- anthracite-org/kalo_opus_misc_240827
|
17 |
+
- anthracite-org/kalo_misc_part2
|
18 |
+
base_model: anthracite-org/magnum-v4-123b
|
19 |
+
---
|
20 |
+
|
21 |
+
# mlx-community/magnum-v4-123b-4bit
|
22 |
+
|
23 |
+
The Model [mlx-community/magnum-v4-123b-4bit](https://huggingface.co/mlx-community/magnum-v4-123b-4bit) was
|
24 |
+
converted to MLX format from [anthracite-org/magnum-v4-123b](https://huggingface.co/anthracite-org/magnum-v4-123b)
|
25 |
+
using mlx-lm version **0.20.4**.
|
26 |
+
|
27 |
+
## Use with mlx
|
28 |
+
|
29 |
+
```bash
|
30 |
+
pip install mlx-lm
|
31 |
+
```
|
32 |
+
|
33 |
+
```python
|
34 |
+
from mlx_lm import load, generate
|
35 |
+
|
36 |
+
model, tokenizer = load("mlx-community/magnum-v4-123b-4bit")
|
37 |
+
|
38 |
+
prompt="hello"
|
39 |
+
|
40 |
+
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
|
41 |
+
messages = [{"role": "user", "content": prompt}]
|
42 |
+
prompt = tokenizer.apply_chat_template(
|
43 |
+
messages, tokenize=False, add_generation_prompt=True
|
44 |
+
)
|
45 |
+
|
46 |
+
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
47 |
+
```
|
config.json
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
},
|
22 |
+
"quantization_config": {
|
23 |
+
"group_size": 64,
|
24 |
+
"bits": 4
|
25 |
+
},
|
26 |
+
"rms_norm_eps": 1e-05,
|
27 |
+
"rope_theta": 1000000.0,
|
28 |
+
"sliding_window": null,
|
29 |
+
"tie_word_embeddings": false,
|
30 |
+
"torch_dtype": "bfloat16",
|
31 |
+
"transformers_version": "4.45.0.dev0",
|
32 |
+
"use_cache": false,
|
33 |
+
"vocab_size": 32768
|
34 |
+
}
|
model-00014-of-00014.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:45d3bf58940ceeca88ced1b1b63bd3b2046b018cdbbd75fa8a41c6bd5a777a4f
|
3 |
+
size 226492716
|
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,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.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:59f95e28944c062244741268596badc900df86c7f5ded05088d2da22a7379e06
|
3 |
+
size 587583
|
tokenizer_config.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|