Upload plugins/mlintern/skills/hf-docs/SKILL.md with huggingface_hub
Browse files
plugins/mlintern/skills/hf-docs/SKILL.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: hf-docs
|
| 3 |
+
description: "Search and fetch current Hugging Face documentation for Transformers, TRL, PEFT, Datasets, Trackio, and other libraries."
|
| 4 |
+
disable-model-invocation: false
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# hf-docs — Hugging Face Documentation
|
| 8 |
+
|
| 9 |
+
## Purpose
|
| 10 |
+
|
| 11 |
+
Look up current API usage patterns, trainer configs, and library documentation before writing ML code. Do not rely on memory — HF library APIs change frequently.
|
| 12 |
+
|
| 13 |
+
## Tools
|
| 14 |
+
|
| 15 |
+
- `hf_doc_search`: Search HF documentation by product and query.
|
| 16 |
+
- `hf_doc_fetch`: Fetch the full content of a specific doc page by URL.
|
| 17 |
+
|
| 18 |
+
## Products Available
|
| 19 |
+
|
| 20 |
+
| Product | Use For |
|
| 21 |
+
|---|---|
|
| 22 |
+
| transformers | Model loading, tokenizers, trainers, inference |
|
| 23 |
+
| trl | SFT, DPO, GRPO, PPO trainers |
|
| 24 |
+
| peft | LoRA, adapters, parameter-efficient fine-tuning |
|
| 25 |
+
| datasets | Dataset loading, streaming, processing |
|
| 26 |
+
| accelerate | Distributed training, mixed precision |
|
| 27 |
+
| hub | Repo operations, auth, upload/download |
|
| 28 |
+
| trackio | Experiment tracking, metrics, dashboards |
|
| 29 |
+
| sentence_transformers | Embedding models, training, similarity |
|
| 30 |
+
| diffusers | Diffusion pipelines, fine-tuning |
|
| 31 |
+
| optimum | Hardware optimization, model export |
|
| 32 |
+
|
| 33 |
+
## Workflow
|
| 34 |
+
|
| 35 |
+
1. Use `hf_doc_search` to find relevant pages.
|
| 36 |
+
2. Use `hf_doc_fetch` to read the full content of the most relevant page.
|
| 37 |
+
3. Extract the exact imports, class names, config parameters, and argument names.
|
| 38 |
+
4. Use the current API in your implementation.
|
| 39 |
+
|
| 40 |
+
## Example
|
| 41 |
+
|
| 42 |
+
```
|
| 43 |
+
_hf_doc_search(product="trl", query="SFTConfig parameters")
|
| 44 |
+
_hf_doc_fetch(url="https://huggingface.co/docs/trl/sft_trainer")
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
## Docs-First Rule
|
| 48 |
+
|
| 49 |
+
Before writing any training, fine-tuning, inference, or evaluation code:
|
| 50 |
+
- Find at least one current working implementation pattern from HF docs or a relevant repo.
|
| 51 |
+
- Verify import paths, trainer class names, and config field names.
|
| 52 |
+
- Check that the example matches your library version constraints.
|