Instructions to use decisionlens/mistral7b-mdmp-lora-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use decisionlens/mistral7b-mdmp-lora-mlx with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("decisionlens/mistral7b-mdmp-lora-mlx") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use decisionlens/mistral7b-mdmp-lora-mlx with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "decisionlens/mistral7b-mdmp-lora-mlx" --prompt "Once upon a time"
- Atomic Chat
mistral7b-mdmp-lora-mlx
Apple Silicon MLX LoRA adapter for MDMP staff-planning coaching โ public U.S. Army doctrine only, no proprietary algorithms or customer data.
This is not a drop-in for the Unsloth/PEFT adapter. Use decisionlens/mistral7b-mdmp-lora on NVIDIA GPUs. Adapters are not interchangeable.
Disclaimer: Unofficial educational tool. Not affiliated with the U.S. Army. Not a substitute for qualified staff planning or classified planning systems. Ground answers in FM 5-0 / ADP 5-0 and verify citations.
Model description
Parameter-efficient fine-tune (LoRA) of mlx-community/Mistral-7B-Instruct-v0.3-4bit via mlx-lm, trained on leak-reviewed instruction pairs from open MDMP doctrine summaries and fictional scenarios.
- Base model:
mlx-community/Mistral-7B-Instruct-v0.3-4bit - Method: 4-bit QLoRA via mlx-lm (Mac sidecar / mlx-v4)
- Training data: mdmp-staff-planning-pairs (324 reviewed pairs)
- GPU sibling: mistral7b-mdmp-lora (Unsloth / PEFT)
- GitHub: dlens/mdmp-assistant
Training hyperparameters
| Parameter | Value |
|---|---|
| LoRA rank | 16 |
| LoRA scale | 2.0 (mlx-lm multiplies the update by scale; PEFT equivalent is alpha/rank = 32/16) |
| LoRA dropout | 0.05 |
| Iters | 600 |
| Learning rate | 5e-5 (cosine decay, 20-step warmup) |
| Batch | 1 ร 4 grad accum |
| Max sequence length | 2048 |
| Layers | all (num_layers: -1) |
Target modules: self_attn.q_proj, k_proj, v_proj, o_proj, mlp.gate_proj, up_proj, down_proj.
Evaluation
Held-out golden set (20 questions, separate from training data). Score below is this uploaded artifact (eval/run_golden_mlx.py, 2026-09-01), not a copy of the Unsloth 14/20 result or an older Mac run.
| Run | Pass rate |
|---|---|
| Base MLX Mistral-7B-Instruct-v0.3-4bit | (see repo eval reports) |
| This adapter (mlx-v4, pre-publish) | 18/20 (90%) |
Eval script: eval/run_golden_mlx.py
Quick start (inference only, no training): hf-quick-start.md
Usage
git clone https://github.com/dlens/mdmp-assistant.git
cd mdmp-assistant
python -m venv .venv-mlx && source .venv-mlx/bin/activate
pip install -r requirements-mlx.txt huggingface_hub
hf download decisionlens/mistral7b-mdmp-lora-mlx --local-dir outputs/mlx-mistral7b-mdmp-lora-v4
python demo/ask.py --backend mlx
Or from Python:
from train.mlx_inference import load_mlx, generate_answer
model, tokenizer = load_mlx(
model_name="mlx-community/Mistral-7B-Instruct-v0.3-4bit",
adapter_path="outputs/mlx-mistral7b-mdmp-lora-v4",
)
print(generate_answer(model, tokenizer, "What MDMP step is war gaming?"))
Generation defaults (match golden eval): temperature=0.1, top_p=0.9, max_new_tokens=256.
Hardware: Apple Silicon. First run also downloads the 4-bit base weights from mlx-community.
Limitations
- Small golden eval set (n=20), English-only, U.S. MDMP framing
- Coaching assistant only โ not operational planning or classified scenarios
- Not interchangeable with the Unsloth adapter on Hugging Face
- Users must verify operationally consequential answers against authoritative doctrine
License
Apache 2.0 for this adapter and training data. Base model subject to the Mistral license.
Quantized
Model tree for decisionlens/mistral7b-mdmp-lora-mlx
Base model
mlx-community/Mistral-7B-Instruct-v0.3-4bit