मुख्य सामग्री पर जाएँ
Skillpedia
मशीन लर्निंग12k · #11546

minicpm5-finetune

यह क्या करती है

यह स्किल आपके AI को आपके लक्ष्य और हार्डवेयर के आधार पर MiniCPM5-1B के लिए एक ट्रेनिंग फ़्रेमवर्क चुनने में मदद करती है, और फिर उससे जुड़ी गाइड के अनुसार काम करती है। यह उन लोगों के लिए है जो मॉडल को ट्रेन या समायोजित करना चाहते हैं और अभी तक कोई टूल नहीं चुना है।

कब इस्तेमाल करें

  • ✓जब आप MiniCPM5 को फ़ाइन-ट्यून करना चाहते हैं और अभी तक कोई फ़्रेमवर्क नहीं चुना है।
  • ✓जब आप जानना चाहते हैं कि LoRA, DPO या QLoRA आपके हार्डवेयर के लिए ठीक है या नहीं।
  • ✓जब आप अपने AI से अपने डेटा पर MiniCPM5 को ट्रेन या आगे ट्रेन करने के लिए कहते हैं।

Skill का लिंक

https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-finetune/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-finetune/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मुझे अपने ग्राहक चैट लॉग पर MiniCPM5-1B को फ़ाइन-ट्यून करना है। हमें कौन-सा ट्रेनिंग टूल इस्तेमाल करना चाहिए?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

स्किल बेस मॉडल, आपका डेटा, आपका लक्ष्य और आपका हार्डवेयर पूछती है, फिर इन्हें एक फ़्रेमवर्क गाइड से मिलाती है और उसी के अनुसार काम करती है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Fine-tune MiniCPM5-1B — framework router

You're being asked to fine-tune MiniCPM5-1B. Pick exactly one framework skill below and invoke that skill rather than improvising — every framework has at least one MiniCPM5-specific gotcha that the dedicated skill knows about.

1. Required input from the user

Variable Example Notes
BASE_MODEL HF id openbmb/MiniCPM5-1B (post-release) or a local path see cluster paths below
DATA path to JSONL in messages format [{"messages": [{"role":"user","content":"..."}, {"role":"assistant","content":"..."}]}]
OUTPUT_DIR where to write checkpoints mkdir if missing
Goal "LoRA SFT" / "full SFT" / "DPO" / "QLoRA on consumer GPU" / "continue-pretrain at scale" drives skill choice
Hardware 1× GPU / multi-node drives skill choice

Default base model

If BASE_MODEL is not pinned, default to the Hugging Face fp16 release:

openbmb/MiniCPM5-1B

Any local directory containing config.json + model.safetensors + tokenizer.json also works.

2. Decision matrix — pick exactly one

User says / wants Best fit → Skill to invoke
YAML / WebUI driven SFT, broad community support LLaMA-Factory minicpm5-finetune-llamafactory
ChatML template + ModelScope-native SFT/DPO/KTO/ORPO ms-swift minicpm5-finetune-ms-swift
Bare-metal Python, assistant-only loss, minimal abstractions TRL + PEFT minicpm5-finetune-trl
Single-GPU LoRA / QLoRA, tight VRAM (24 GB or less) unsloth minicpm5-finetune-unsloth
mmengine config-driven SFT, OpenMMLab stack xtuner minicpm5-finetune-xtuner

Decision shortcuts

  • First time fine-tuning MiniCPM5: pick minicpm5-finetune-llamafactory — most documented, fewest surprises.
  • Need DPO / KTO / ORPO: pick minicpm5-finetune-ms-swift (best out-of-the-box) or minicpm5-finetune-trl (most control).
  • Single 24 GB consumer GPU: pick minicpm5-finetune-unsloth with load_in_4bit=True.
  • Target is llama.cpp / Ollama / LM Studio / MiniCPM Desk Pet (GGUF): train with any skill above, then convert the adapter with minicpm5-finetune-gguf-lora (PEFT adapter → GGUF LoRA).

3. Invocation contract

Each sub-skill expects BASE_MODEL, DATA, OUTPUT_DIR and outputs an LoRA adapter (or full checkpoint) at OUTPUT_DIR/. Read the picked sub-skill in full before running — every framework has at least one MiniCPM5-specific gotcha:

Framework Gotcha (skill handles it for you)
LLaMA-Factory template: minicpm5 (needs LLaMA-Factory from source; NOT template: empty / llama3)
ms-swift mandatory --model_type llama --template chatml flags
TRL training-only chat template patch for assistant_only_loss=True
unsloth transformers==4.57.3 pin if vLLM is in the same env
xtuner prompt_template=PROMPT_TEMPLATE.qwen_chat (ChatML), use openai_map_fn for messages-format data, start_factor ≥ 1e-2

4. Universal sanity check after training

Regardless of framework:

# 1. Verify adapter (or full ckpt) was saved
ls "$OUTPUT_DIR"        # adapter_model.safetensors + adapter_config.json (LoRA) OR a full HF directory

# 2. Quick inference check (HF-side, works for both LoRA and full)
python -c "
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained('$BASE_MODEL', torch_dtype=torch.bfloat16, device_map='auto').eval()
model = PeftModel.from_pretrained(base, '$OUTPUT_DIR').eval()    # skip this line for full SFT
tok = AutoTokenizer.from_pretrained('$BASE_MODEL')
inputs = tok.apply_chat_template([{'role':'user','content':'1+1=?'}], add_generation_prompt=True, enable_thinking=False, return_tensors='pt').to(model.device)
out = model.generate(inputs, max_new_tokens=32, do_sample=False)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
"

Expected: a coherent answer (e.g. "2"). If it's gibberish or empty, training broke (most likely chat template misalignment — ⮕ check the framework's gotcha row above).

5. Don't reinvent: link to the cookbook

Each sub-skill is paired with a one-page cookbook in docs/finetune/. The skill is the machine-readable shortcut; the cookbook is the human-readable reference.

6. Next step — deploying the adapter

The adapter at `OUTPUT_D

अक्सर पूछे जाने वाले सवाल

कौन सा बेस मॉडल डिफ़ॉल्ट है?

अगर आप कोई मॉडल नहीं देते, तो स्किल Hugging Face पर openbmb/MiniCPM5-1B रिलीज़ इस्तेमाल करती है।

कौन सा डेटा फ़ॉर्मैट अपेक्षित है?

स्किल JSONL फ़ाइल की अपेक्षा करती है, जिसकी हर लाइन में messages की सूची हो।

क्या यह एक से ज़्यादा फ़्रेमवर्क चुनती है?

नहीं। स्किल हर अनुरोध के लिए ठीक एक फ़्रेमवर्क गाइड चुनने के लिए सेट है।

जानकारी

लेखक का मूल विवरण

Pick the right fine-tuning framework for a MiniCPM5-1B base checkpoint and route to a framework-specific cookbook skill. Use when the user wants to SFT / LoRA / DPO / continue-pretrain MiniCPM5 and has not yet committed to a specific framework, or when they say "fine-tune MiniCPM5", "train MiniCPM5", "MiniCPM5 微调", "LoRA MiniCPM5", "继续训练 MiniCPM5".

repo: OpenBMB/MiniCPM

लोकप्रियता

GitHub स्टार
12k
रैंकिंग में स्थान
#11546
लाइसेंस
Apache-2.0
अपडेट की गई
21/9/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

minicpm5-deploy-litert

12k

आपके एजेंट को Google के LiteRT-LM रनटाइम से कंप्यूटर या Android फ़ोन पर MiniCPM5 मॉडल चलाने देती है, एक ही मॉडल फ़ाइल के साथ।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

minicpm5-deploy-llama-cpp

12k

आपके एजेंट को दिखाती है कि llama.cpp से CPU या घरेलू graphics card पर MiniCPM5 मॉडल कैसे चलाएँ, तैयार GGUF फ़ाइलों के साथ।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

minicpm5-deploy-lmstudio

12k

आपके एजेंट को LM Studio में MiniCPM5 मॉडल चलाने में मदद करती है, जो चैट विंडो वाला डेस्कटॉप ऐप है, और उसका लोकल OpenAI शैली का server शुरू करती है।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

minicpm5-deploy-mlx

12k

आपके एजेंट को Apple के MLX फ़्रेमवर्क से Apple Silicon Mac पर MiniCPM5 मॉडल सीधे चलाने देती है, तेज़ लोकल चैट और टेक्स्ट जनरेशन के लिए।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

मिलती-जुलती skills