Files
axolotl/examples/ministral3/think/README.md
Wing Lian 66a3de3629 build examples readmes with quarto (#3046)
* build examples readmes with quarto

* chore: formatting

* feat: dynamic build docs

* feat: add more model guides

* chore: format

* fix: collapse sidebar completely to have space for model guides

* fix: security protection for generated qmd

* fix: adjust collapse level, add new models, update links

---------

Co-authored-by: NanoCode012 <nano@axolotl.ai>
2025-12-25 19:17:25 +07:00

2.1 KiB
Raw Blame History

Ministral3 2512 Thinking Fine-tuning

This guide covers fine-tuning Ministral3 2512 with thinking capabilities using Axolotl. The thinking model enables explicit Chain-of-Thought reasoning with separate thinking and response sections.

Prerequisites

Before starting, ensure you have:

Getting Started

Run the thinking model fine-tuning:

axolotl train examples/ministral3/think/ministral3-3b-think-qlora.yaml

This config uses about 4.76 GiB VRAM.

Tips

  • Dataset uses multi-content format with type: thinking support. See Dataset Format below.
  • You cannot mix content: str and content: list[dict], otherwise, dataset loading will fail. Keep it consistent.

Dataset Format

The thinking model requires the multi-content dataset format with support for an extra role: thinking within system and assistant messages.

Example format:

{
    "messages": [
        {
            "role": "system",
            "content": [
                { "type": "text", "text": "{SYSTEM_PROMPT}"}
            ]
        },
        {
            "role": "user",
            "content": [
                { "type": "text", "text": "Solve this step by step: What is 15% of 240?"}
            ]
        },
        {
            "role": "assistant",
            "content": [
                {
                    "type": "thinking",
                    "thinking": "I need to calculate 15% of 240. First, I'll convert 15% to decimal: 0.15. Then multiply: 0.15 × 240 = 36."
                },
                {
                    "type": "text",
                    "text": "To find 15% of 240, I'll multiply 240 by 0.15:\n\n240 × 0.15 = 36\n\nTherefore, 15% of 240 is 36."
                }
            ]
        }
    ]
}

Advanced Options

The thinking section supports an optional closed parameter:

{
    "type": "thinking",
    "thinking": "Internal reasoning here...",
    "closed": true  // Default: true, controls adding the closing [/THINK] tag
}