Index-Translate-9B — MLX 4-bit with native MTP
A text-only MLX conversion of IndexTeam/Index-Translate-9B, preserving its native Multi-Token Prediction (MTP) head for oMLX's Lightning MTP speculative decoding. No additional training was performed.
Conversion
| Property | Value |
|---|---|
| Source revision | 710123a9274f2486996d6a63b8d4909a51c4315d |
| Quantization | MLX affine, 4 bits, group size 64 |
| Non-quantized tensors | BF16, including RMSNorms and the MTP fusion projection (mtp.fc) |
| MTP | One native prediction layer; all 15 original MTP tensors retained, with quantization metadata for its linear layers |
| Vision | Vision encoder and vision configuration removed; text translation only |
| Weight file | Approximately 5.22 GB (4.86 GiB) |
| License | Apache-2.0; see LICENSE and the original model card |
The source model advertises translation across 150 languages and supports translation instructions for terminology, style, structure, and context. See the original model card for training, language coverage, benchmarks, and limitations. Its published benchmark scores do not constitute an evaluation of this quantized checkpoint.
Standard mlx-lm conversion strips the MTP head. This conversion instead uses oMLX's pre-load compatibility patches before quantizing, preserving MTP and applying the required raw-HF-to-MLX RMSNorm and convolution transformations. convert_mtp.py records the conversion procedure. It expects the source revision in the Hugging Face cache and writes to a new model directory; it refuses to overwrite existing models.
Conversion environment: oMLX 0.7.0, MLX 0.32.2, mlx-lm 0.31.4.dev132+g94cdcae13, Transformers 5.17.0.
Run with oMLX
On an Apple Silicon Mac with oMLX installed:
hf download rariruluis/Index-Translate-9B-MLX-4bit-MTP \
--local-dir ~/.omlx/models/Index-Translate-9B-MLX-4bit-MTP
omlx start
In the model settings, select the LLM engine, enable Lightning MTP, set thinking off, and use temperature=0. Optionally pin the model to load it at startup. MTP is a serving feature: downloading the preserved head alone does not enable speculative decoding. oMLX 0.7.0 was used to verify loading and native MTP activity; stock mlx-lm does not activate oMLX's MTP runtime.
For example, with the directory name as the API model ID and an existing oMLX API key:
import os
from openai import OpenAI
client = OpenAI(
base_url="http://127.0.0.1:8000/v1",
api_key=os.environ["OMLX_API_KEY"],
)
response = client.chat.completions.create(
model="Index-Translate-9B-MLX-4bit-MTP",
messages=[{
"role": "user",
"content": "请将以下英语文本翻译为日语,直接输出翻译结果,不要进行任何解释。\n\nThank you for your order.",
}],
temperature=0,
max_tokens=1024,
extra_body={"chat_template_kwargs": {"enable_thinking": False}},
)
print(response.choices[0].message.content)
Structured batch translation
JSON Schema enforcement requires oMLX's grammar support, not just a translation prompt. For a Homebrew installation, the supported installation option is:
brew reinstall omlx --with-grammar
Pass response_format={"type": "json_schema", "json_schema": {"name": "translations", "strict": True, "schema": ...}} and explicitly describe which input strings to translate. A fixed-key object schema with all input IDs required and additionalProperties: false avoids missing or invented IDs.
oMLX 0.7.0 does not use Lightning MTP for grammar-constrained requests. Normal text translation can use MTP; schema-constrained translation takes the standard decode path to preserve grammar state. If xgrammar is unavailable, this oMLX version warns and falls back to best-effort prompting, even when strict: true was requested. Check that the grammar backend is installed and active; a valid JSON example alone is not proof of enforcement.
Schema enforcement controls structure, not translation correctness, language choice, glossary compliance, or placeholder preservation. Validate the completed response, reject truncation, and separately check application-specific constraints. Large translation jobs should be split by input/output token budgets or served as independent, concurrently batched requests.
Limitations
- This is an independently converted checkpoint, not an official IndexTeam release.
- Four-bit quantization can affect translation quality; no full translation benchmark has been run for this conversion.
- MTP acceptance and throughput depend on the text, hardware, request concurrency, and serving implementation. Preserving the head does not guarantee a speedup.
- Image/video inputs are not supported by this text-only conversion.
- Preserve the original model's licensing and attribution when redistributing.