Run this model with HF Jobs

Run MiniMaxAI/MiniMax-M3 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/MiniMaxAI/MiniMax-M3. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/MiniMaxAI/MiniMax-M3 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/MiniMaxAI/MiniMax-M3. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/MiniMaxAI/MiniMax-M3. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Keep mid-conversation system/developer messages in chat template

#35
by KingKanye - opened

The template keeps only messages[0] when its role is system or developer. Any later system or developer message has no branch in the message loop, so it is dropped without an error. Agent frameworks and chat clients add mid-conversation system messages often, for example to inject updated context or change instructions partway through a session. With this template, those instructions never reach the model.

MiniMax-M3.1-Flash already fixed this in its chat_template.jinja: mid-conversation system and developer messages stay in place as a developer turn. This PR copies that exact block into the M3 template. It is 7 added lines, identical to M3.1-Flash, and nothing else changes.

Repro (transformers, this repo's chat_template.jinja):

from transformers import AutoTokenizer
tok = AutoTokenizer.from_pretrained("MiniMaxAI/MiniMax-M3")
msgs = [
    {"role": "system", "content": "Be brief."},
    {"role": "user", "content": "Hi"},
    {"role": "assistant", "content": "Hello."},
    {"role": "system", "content": "From now on answer in French."},
    {"role": "user", "content": "How are you?"},
]
print(tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True))

Before (after the system and developer headers):

]~b]user
Hi[e~[
]~b]ai
</mm:think>Hello.[e~[
]~b]user
How are you?[e~[
]~b]ai

After:

]~b]user
Hi[e~[
]~b]ai
</mm:think>Hello.[e~[
]~b]developer
From now on answer in French.[e~[
]~b]user
How are you?[e~[
]~b]ai

Checks: I rendered 12 conversations with no mid-conversation system message: plain, with system, with root plus system, and a multi-turn tool call with reasoning, each with thinking_mode unset, enabled and disabled. All 12 outputs are byte-identical before and after this change.

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment