synthetic-sciences/openscience is an AI workbench that carries out scientific research by reading papers, forming hypotheses, writing and running code, conducting experiments, analyzing results, and preparing reports. Researchers use it for work in machine learning, biology, physics, and chemistry with remote or local models. Catalogue add-ons extend its scientific workflows through skills and instructions.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/synthetic-sciences/openscience/hugging-face-model-trainernpx skills add synthetic-sciences/openscience --skill hugging-face-model-trainergit clone --depth 1 https://github.com/synthetic-sciences/openscienceWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/synthetic-sciences/openscience/hugging-face-model-trainer)<a href="https://agentmods.dev/skills/synthetic-sciences/openscience/hugging-face-model-trainer"><img src="https://agentmods.dev/badge/skills/synthetic-sciences/openscience/hugging-face-model-trainer.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00131 | $0.06966 |
| Opus 5 | $0.00066 | $0.03483 |
| Sonnet 5 | $0.00026 | $0.01393 |
| Haiku 4.5 | $0.00013 | $0.00697 |
Grade A, and why
hugging-face-model-trainer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
95% identical to hugging-face-model-trainer — 1,429 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 724 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TRL Training on Hugging Face Jobs
Overview
Train language models using TRL (Transformer Reinforcement Learning) on fully managed Hugging Face infrastructure. No local GPU setup required—models train on cloud GPUs and results are automatically saved to the Hugging Face Hub.
TRL provides multiple training methods:
- SFT (Supervised Fine-Tuning) - Standard instruction tuning
- DPO (Direct Preference Optimization) - Alignment from preference data
- GRPO (Group Relative Policy Optimization) - Online RL training
- Reward Modeling - Train reward models for RLHF
For detailed TRL method documentation:
hf_doc_search("your query", product="trl")
hf_doc_fetch("https://huggingface.co/docs/trl/sft_trainer") # SFT
hf_doc_fetch("https://huggingface.co/docs/trl/dpo_trainer") # DPO
# etc.
See also: references/training_methods.md for method overviews and selection guidance
When to Use This Skill
Use this skill when users want to:
- Fine-tune language models on cloud GPUs without local infrastructure
- Train with TRL methods (SFT, DPO, GRPO, etc.)
- Run training jobs on Hugging Face Jobs infrastructure
- Convert trained models to GGUF for local deployment (Ollama, LM Studio, llama.cpp)
- Ensure trained models are permanently saved to the Hub
- Use modern workflows with optimized defaults
Key Directives
When assisting with training jobs:
-
ALWAYS use
hf_jobs()MCP tool - Submit jobs usinghf_jobs("uv", {...}), NOT bashtrl-jobscommands. Thescriptparameter accepts Python code directly. Do NOT save to local files unless the user explicitly requests it. Pass the script content as a string tohf_jobs(). If user asks to "train a model", "fine-tune", or similar requests, you MUST create the training script AND submit the job immediately usinghf_jobs(). -
Always include Trackio - Every training script should include Trackio for real-time monitoring. Use example scripts in
scripts/as templates. -
Provide job details after submission - After submitting, provide job ID, monitoring URL, estimated time, and note that the user can request status checks later.
What ships with it
14 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/gguf_conversion.md 9.6 KB
- references/hardware_guide.md 6.6 KB
- references/hub_saving.md 8.3 KB
- references/reliability_principles.md 11 KB
- references/trackio_guide.md 5.7 KB
- references/training_methods.md 4.9 KB
- references/training_patterns.md 6.0 KB
- references/troubleshooting.md 8.7 KB
- scripts/convert_to_gguf.py 12 KB runs code
- scripts/dataset_inspector.py 15 KB runs code
- scripts/estimate_cost.py 4.7 KB runs code
- scripts/train_dpo_example.py 3.0 KB runs code
- scripts/train_grpo_example.py 2.3 KB runs code
- scripts/train_sft_example.py 3.3 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 724 lines · 131 tokens per session scan A b3c0cd4df65e
hugging-face-model-trainer is a skill published in the GitHub repository synthetic-sciences/openscience (3,473 stars, last pushed today), licensed Apache-2.0. It adds 131 tokens to every session and 6,966 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to hugging-face-model-trainer, differing in 1,429 lines, and is treated as a copy.
Other skills, from other repositories
Training
Guides fine-tuning and post-training work with explicit data, objective, hardware, and rollback assumptions.
llm-finetuning
LLM fine-tuning expert for LoRA, QLoRA, dataset preparation, and training optimization.
cloud-deploy-gate
The pre-deployment gate for managed AI platforms (Azure AI Foundry, Google Vertex AI, AWS Bedrock), evals packed, budget set, guardrails on, owner named. Use before any cloud deployment.
vLLM
Serves LLMs with high throughput using vLLM's PagedAttention and continuous batching. Use when deploying production LLM APIs, optimizing inference latency/throughput, or serving models with limited GPU memory. Supports OpenAI-compatible endpoints, quantization (GPTQ/AWQ/FP8), and tensor parallelism.
ai-engineer
Builds production AI/ML systems — model training, fine-tuning, MLOps pipelines, model serving, evaluation frameworks, RAG optimization, and agent orchestration at scale. Use when the user asks to build, train, or deploy ML models, set up MLOps pipelines, optimize RAG systems, create inference endpoints, or design…
ml-engineer
Machine learning engineer expert for PyTorch, scikit-learn, model evaluation, and MLOps.