Mixed-precision MLX build of
MiniMaxAI/MiniMax-M2.7, prepared by
baa.ai.
1sampler_params = {
2 "temperature": 1.0,
3 "top_p": 0.95,
4 "top_k": 40,
5 "repetition_penalty": 1.1,
6 "max_tokens": 8192,
7}
1def strip_thinking(text: str) -> str:
2 if "</think>" in text:
3 return text.split("</think>", 1)[1].strip()
4 return text.strip()
1from mlx_lm import load, generate
2from mlx_lm.sample_utils import make_sampler, make_logits_processors
3
4model, tokenizer = load("baa-ai/MiniMax-M2.7-RAM-111GB-MLX")
5
6sampler = make_sampler(temp=1.0, top_p=0.95, top_k=40)
7logits_processors = make_logits_processors(repetition_penalty=1.1)
8
9prompt = tokenizer.apply_chat_template(
10 [{"role": "user", "content": "Write a Python function that reverses a string."}],
11 tokenize=False,
12 add_generation_prompt=True,
13)
14
15response = generate(
16 model,
17 tokenizer,
18 prompt=prompt,
19 max_tokens=8192,
20 sampler=sampler,
21 logits_processors=logits_processors,
22)
23
24if "</think>" in response:
25 response = response.split("</think>", 1)[1].strip()
26print(response)
Shepherd — Private AI deployment platform that shrinks frontier models by 50-60% through RAM compression, enabling enterprises to run sophisticated AI on single GPU instances or Apple Silicon hardware. Deploy in your VPC with zero data leaving your infrastructure. Includes CI/CD pipeline integration, fleet deployment across Apple Silicon clusters, air-gapped and sovereign deployment support, and multi-format export (MLX, GGUF). Annual cloud costs from ~$2,700 — or run on a Mac Studio for electricity only.
Watchman — Capability audit and governance platform for compressed AI models. Know exactly what your quantized model can do before it goes live. Watchman predicts which capabilities survive compression in minutes — replacing weeks of benchmarking. Includes compliance-ready reporting for regulated industries, quality valley warnings for counterproductive memory allocations, instant regression diagnosis tracing issues to specific tensors, and 22 adversarial security probes scanning for injection, leakage, hallucination, and code vulnerabilities.
Inherited from the upstream
MiniMax-M2.7 license: non-commercial use permitted; commercial use requires written authorization from MiniMax.