Text Generation
MLX
Safetensors
English
mellum
Mixture of Experts
code
conversational
8-bit precision
Instructions to use jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Download config.json from jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit: direct link, hf CLI and curl.
- Browser
- Download file 8.54 kB
-
https://huggingface.co/jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit/resolve/main/config.json
- Command line
-
hf download hf://jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit/config.json
-
curl -L -o config.json https://huggingface.co/jedisct1/Mellum2-12B-A2.5B-Instruct-mlx-8bit/resolve/main/config.json
8.54 kB
| { | |
| "architectures": [ | |
| "MellumForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 0, | |
| "dtype": "bfloat16", | |
| "eos_token_id": [ | |
| 0, | |
| 28 | |
| ], | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 2304, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 7168, | |
| "layer_types": [ | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention" | |
| ], | |
| "max_position_embeddings": 131072, | |
| "max_window_layers": 0, | |
| "mlp_layer_types": [ | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse" | |
| ], | |
| "model_type": "mellum", | |
| "moe_intermediate_size": 896, | |
| "norm_topk_prob": true, | |
| "num_attention_heads": 32, | |
| "num_experts": 64, | |
| "num_experts_per_tok": 8, | |
| "num_hidden_layers": 28, | |
| "num_key_value_heads": 4, | |
| "output_router_logits": false, | |
| "quantization": { | |
| "group_size": 64, | |
| "bits": 8, | |
| "mode": "affine", | |
| "model.layers.0.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.1.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.2.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.3.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.4.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.5.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.6.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.7.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.8.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.9.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.10.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.11.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.12.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.13.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.14.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.15.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.16.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.17.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.18.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.19.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.20.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.21.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.22.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.23.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.24.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.25.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.26.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.27.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| } | |
| }, | |
| "quantization_config": { | |
| "group_size": 64, | |
| "bits": 8, | |
| "mode": "affine", | |
| "model.layers.0.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.1.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.2.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.3.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.4.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.5.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.6.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.7.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.8.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.9.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.10.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.11.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.12.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.13.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.14.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.15.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.16.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.17.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.18.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.19.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.20.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.21.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.22.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.23.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.24.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.25.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.26.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| }, | |
| "model.layers.27.mlp.gate": { | |
| "group_size": 64, | |
| "bits": 8 | |
| } | |
| }, | |
| "rms_norm_eps": 1e-06, | |
| "rope_parameters": { | |
| "full_attention": { | |
| "rope_type": "yarn", | |
| "rope_theta": 500000.0, | |
| "factor": 16.0, | |
| "original_max_position_embeddings": 8192, | |
| "beta_fast": 32.0, | |
| "beta_slow": 1.0, | |
| "attention_factor": 1.2772588722239782 | |
| }, | |
| "sliding_attention": { | |
| "rope_type": "default", | |
| "rope_theta": 500000.0 | |
| } | |
| }, | |
| "router_aux_loss_coef": 0.001, | |
| "sliding_window": 1024, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "5.8.1", | |
| "use_cache": true, | |
| "vocab_size": 98304 | |
| } |