packages/skills/skills/huggingface-model-trainer/SKILL.md
# Hugging Face Model Trainer Train language models using TRL (Transformer Reinforcement Learning) on Hugging Face Jobs infrastructure. ## Prerequisites - HF_TOKEN environment variable with write permissions - Hugging Face Pro/Team/Enterprise plan - Dataset on Hub or loadable via datasets library ## Instructions ### Training Methods - **SFT** - Supervised Fine-Tuning for instruction tuning - **DPO** - Direct Preference Optimization from preference data - **GRPO** - Group Relative Policy Opt
npx skillsauth add mediar-ai/skillhubz packages/skills/skills/huggingface-model-trainerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Train language models using TRL (Transformer Reinforcement Learning) on Hugging Face Jobs infrastructure.
hf_jobs("uv", {
"script": """
# /// script
# dependencies = ["trl>=0.12.0", "peft>=0.7.0", "trackio"]
# ///
from datasets import load_dataset
from peft import LoraConfig
from trl import SFTTrainer, SFTConfig
dataset = load_dataset("trl-lib/Capybara", split="train")
trainer = SFTTrainer(
model="Qwen/Qwen2.5-0.5B",
train_dataset=dataset,
peft_config=LoraConfig(r=16, lora_alpha=32),
args=SFTConfig(
output_dir="my-model",
push_to_hub=True,
hub_model_id="username/my-model",
num_train_epochs=3,
report_to="trackio",
)
)
trainer.train()
trainer.push_to_hub()
""",
"flavor": "a10g-large",
"timeout": "2h",
"secrets": {"HF_TOKEN": "$HF_TOKEN"}
})
| Model Size | Hardware | Cost/hr | |------------|----------|---------| | <1B params | t4-small | ~$0.75 | | 1-3B | t4-medium | ~$1.50 | | 3-7B | a10g-large | ~$5.00 | | 7-13B | a100-large | ~$10.00 |
push_to_hub=True and hub_model_idsecrets={"HF_TOKEN": "$HF_TOKEN"}Validate format before training to prevent failures:
uv run scripts/dataset_inspector.py \
--dataset "username/dataset-name" \
--split "train"
Convert trained models for local inference (Ollama, LM Studio):
hf_jobs("uv", {
"script": "<conversion script>",
"flavor": "a10g-large",
"timeout": "45m",
"env": {
"ADAPTER_MODEL": "username/my-model",
"BASE_MODEL": "Qwen/Qwen2.5-0.5B",
"OUTPUT_REPO": "username/my-model-gguf"
}
})
hf_jobs("logs", {"job_id": "..."})Source: huggingface/skills
tools
Design web-like user interfaces in the terminal and inside tmux with a cell-grid Canvas, CSS-like box model, flexbox/grid layout, and 15 reusable widgets such as Panel, Table, Card, ProgressBar, Meter, Tabs, Tree, Badge, Banner, and a braille line chart. Use when an agent needs a dashboard, panel, table, status page, TUI layout, tmux dashboard, screenshot-driven CLI/TUI replica, ANSI frame, truecolor render, pyte PNG screenshot smoke test, wide-character alignment, or a new terminal widget.
tools
Drive interactive terminal (TUI) programs — CLIs, REPLs, installers, menu apps, agent CLIs, and editors like vim — through a PTY, reading semantic screen snapshots. A pattern library classifies a screen (REPL, menu, pager, fzf search, confirm dialog, form, spinner, wizard) and drives it with a ready recipe. Use when a program expects a live terminal (arrow-key menus, prompts, spinners, password fields, curses UIs), or when a piped command hangs or prints nothing.
tools
Design and render terminal/CMD visual effects and ASCII art from a one-line request via the pluggable `fx` engine (18 hot-swappable, themeable effects plus scripted shows). Effects include donut, matrix rain, plasma, fire, a spinning 3D ball, Game of Life, wireframe cube, 3D text banners, rainbow/lolcat gradient text, starfield, tunnel, fireworks, image-to-ASCII, and more. Use when the request is for a terminal animation, ANSI/CLI art, or a new console effect. Pure Python stdlib; truecolor.
tools
# X Twitter Scraper Use Xquik for X/Twitter tweet search, user lookup, profile tweets, follower export, media download, monitors, webhooks, posting workflows, and MCP-backed API exploration. ## Prerequisites - A Xquik API key in `XQUIK_API_KEY`. - Internet access to `https://xquik.com/api/v1`, `https://xquik.com/mcp`, and `https://docs.xquik.com`. - A clear user request that identifies the target tweets, users, accounts, keywords, media, monitor, webhook, or write action. ## Source Truth -