技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
llm-finetune【数据与研究】Operate RD-Agent FT-Agent workflows for benchmark-driven LLM data processing, fine-tuning, merge, evaluation, and feedback loops.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill for rdagent llm_finetune, FT-Agent datasets/benchmarks, LLaMA-Factory training configuration, OpenCompass evaluation, batch jobs, and the fine-tune UI.
A realistic run can download models and datasets, call an LLM provider, start Docker or conda training environments, and consume GPU hours. Before running, confirm Linux, a usable Docker/conda backend, NVIDIA/CUDA capacity when required, Hugging Face access, provider credentials, and a stable FT_FILE_PATH. A missing prerequisite is a blocked run, not a reason to substitute a toy score.
Keep the main settings explicit and secret-free in the shell or a private .env:
BACKEND
CHAT_MODEL
OPENAI_API_KEY / OPENAI_API_BASE
EMBEDDING_MODEL
FT_FILE_PATH
FT_Coder_CoSTEER_env_type=docker|conda
FT_TARGET_BENCHMARK
FT_BENCHMARK_DESCRIPTION
FT_BASE_MODEL
FT_UPPER_DATA_SIZE_LIMIT
FT_API_MAX_WORKERS
FT_STRONG_MODELS / FT_WEAK_MODELS
HF_TOKEN (only when required)
Use validate_ft_env.py to print presence only; it never prints values.
Start with help and a bounded configuration:
rdagent llm_finetune --help
rdagent llm_finetune \
--benchmark <benchmark> \
--benchmark-description "<task and output format>" \
--base-model <huggingface-model-id> \
--loop-n 1 \
--timeout <short-budget>
The checked-in implementation follows this progression:
The --dataset option selects the agent's dataset after registered resources are prepared; it does not necessarily avoid initial dataset preparation. Reuse a stable FT_FILE_PATH when intentionally caching assets.
For repeatable multi-task runs, copy the checked-in task template to a private file, copy the private .env into the job directory, and run the bundled job shell script only after inspecting its commands. The Streamlit fine-tune UI is a reporting/interaction surface, not proof that training or evaluation succeeded. Preserve training config, dataset schema, checkpoint path, merge/evaluation output, and validation metric.
Read fine-tune-contract.md before a costly run and the parent troubleshooting guide for recovery.