opencode-skills-collection 4.0.69 → 4.0.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +39 -1
  2. package/bundled-skills/api-integration-architect/SKILL.md +241 -0
  3. package/bundled-skills/apify-generate-output-schema/SKILL.md +438 -0
  4. package/bundled-skills/apify-integration-development/SKILL.md +168 -0
  5. package/bundled-skills/apify-integration-development/references/ai-framework-package.md +158 -0
  6. package/bundled-skills/apify-integration-development/references/ai-harness-plugin.md +192 -0
  7. package/bundled-skills/apify-integration-development/references/sdk-integration.md +236 -0
  8. package/bundled-skills/apify-integration-development/references/workflow-automation.md +163 -0
  9. package/bundled-skills/architecture-review/README.md +42 -0
  10. package/bundled-skills/architecture-review/SKILL.md +77 -0
  11. package/bundled-skills/architecture-review/examples.md +11 -0
  12. package/bundled-skills/architecture-review/reference/best-practices.md +7 -0
  13. package/bundled-skills/architecture-review/reference/capabilities.md +20 -0
  14. package/bundled-skills/architecture-review/reference/fallbacks.md +11 -0
  15. package/bundled-skills/architecture-review/reference/graph.md +15 -0
  16. package/bundled-skills/architecture-review/reference/mcp.md +14 -0
  17. package/bundled-skills/architecture-review/reference/workflow.md +15 -0
  18. package/bundled-skills/architecture-review/templates/architecture-review.md +21 -0
  19. package/bundled-skills/code-review-sensei/SKILL.md +177 -0
  20. package/bundled-skills/codebase-onboarding/README.md +42 -0
  21. package/bundled-skills/codebase-onboarding/SKILL.md +77 -0
  22. package/bundled-skills/codebase-onboarding/examples.md +11 -0
  23. package/bundled-skills/codebase-onboarding/reference/best-practices.md +7 -0
  24. package/bundled-skills/codebase-onboarding/reference/capabilities.md +20 -0
  25. package/bundled-skills/codebase-onboarding/reference/fallbacks.md +11 -0
  26. package/bundled-skills/codebase-onboarding/reference/graph.md +15 -0
  27. package/bundled-skills/codebase-onboarding/reference/mcp.md +14 -0
  28. package/bundled-skills/codebase-onboarding/reference/workflow.md +15 -0
  29. package/bundled-skills/codebase-onboarding/templates/repository-onboarding.md +21 -0
  30. package/bundled-skills/connection-auth-rules/SKILL.md +199 -0
  31. package/bundled-skills/connection-auth-rules/fetch_schema.py +320 -0
  32. package/bundled-skills/dependency-analysis/README.md +42 -0
  33. package/bundled-skills/dependency-analysis/SKILL.md +76 -0
  34. package/bundled-skills/dependency-analysis/examples.md +11 -0
  35. package/bundled-skills/dependency-analysis/reference/best-practices.md +7 -0
  36. package/bundled-skills/dependency-analysis/reference/capabilities.md +20 -0
  37. package/bundled-skills/dependency-analysis/reference/fallbacks.md +11 -0
  38. package/bundled-skills/dependency-analysis/reference/graph.md +15 -0
  39. package/bundled-skills/dependency-analysis/reference/mcp.md +14 -0
  40. package/bundled-skills/dependency-analysis/reference/workflow.md +15 -0
  41. package/bundled-skills/dependency-analysis/templates/dependency-review.md +21 -0
  42. package/bundled-skills/devops-pipeline-builder/SKILL.md +200 -0
  43. package/bundled-skills/eas-app-stores/SKILL.md +197 -0
  44. package/bundled-skills/eas-app-stores/agents/openai.yaml +4 -0
  45. package/bundled-skills/eas-app-stores/references/app-store-metadata.md +497 -0
  46. package/bundled-skills/eas-app-stores/references/ios-app-store.md +376 -0
  47. package/bundled-skills/eas-app-stores/references/native-ios.md +167 -0
  48. package/bundled-skills/eas-app-stores/references/play-store.md +244 -0
  49. package/bundled-skills/eas-app-stores/references/testflight.md +62 -0
  50. package/bundled-skills/eas-app-stores/references/workflows.md +120 -0
  51. package/bundled-skills/eas-hosting/SKILL.md +448 -0
  52. package/bundled-skills/eas-hosting/agents/openai.yaml +4 -0
  53. package/bundled-skills/eas-observe/SKILL.md +75 -0
  54. package/bundled-skills/eas-observe/agents/openai.yaml +4 -0
  55. package/bundled-skills/eas-observe/references/metrics.md +98 -0
  56. package/bundled-skills/eas-observe/references/queries.md +403 -0
  57. package/bundled-skills/eas-observe/references/setup.md +476 -0
  58. package/bundled-skills/eas-observe/references/third-party.md +136 -0
  59. package/bundled-skills/eas-simulator/SKILL.md +251 -0
  60. package/bundled-skills/eas-simulator/agents/openai.yaml +4 -0
  61. package/bundled-skills/eas-simulator/references/controllers.md +135 -0
  62. package/bundled-skills/eas-simulator/references/run-your-app.md +240 -0
  63. package/bundled-skills/eas-simulator/references/troubleshooting.md +47 -0
  64. package/bundled-skills/eas-workflows/SKILL.md +119 -0
  65. package/bundled-skills/eas-workflows/agents/openai.yaml +4 -0
  66. package/bundled-skills/eas-workflows/scripts/fetch.js +109 -0
  67. package/bundled-skills/expo-animation/LICENSE +21 -0
  68. package/bundled-skills/expo-animation/RECIPES.md +385 -0
  69. package/bundled-skills/expo-animation/SKILL.md +295 -0
  70. package/bundled-skills/expo-animation/agents/openai.yaml +4 -0
  71. package/bundled-skills/fact-check-x-unified/SKILL.md +178 -0
  72. package/bundled-skills/fact-check-x-unified/agents/openai.yaml +4 -0
  73. package/bundled-skills/fact-check-x-unified/references/acceptance-criteria.md +44 -0
  74. package/bundled-skills/fact-check-x-unified/references/contracts.md +39 -0
  75. package/bundled-skills/fact-check-x-unified/scripts/common.py +31 -0
  76. package/bundled-skills/fact-check-x-unified/scripts/fact_check_x.py +1832 -0
  77. package/bundled-skills/fact-check-x-unified/scripts/trusted_search_config.py +324 -0
  78. package/bundled-skills/fact-check-x-unified/tests/anchor_downgrade_test.py +90 -0
  79. package/bundled-skills/fact-check-x-unified/tests/multi_platform_test.py +369 -0
  80. package/bundled-skills/fact-check-x-unified/tests/smoke_test.py +740 -0
  81. package/bundled-skills/fact-check-x-unified/tests/stage_checkpoint_test.py +103 -0
  82. package/bundled-skills/fact-check-x-unified/tests/trusted_search_config_test.py +156 -0
  83. package/bundled-skills/gpt-taste/SKILL.md +8 -1
  84. package/bundled-skills/hf-cli/SKILL.md +263 -0
  85. package/bundled-skills/huggingface-community-evals/SKILL.md +228 -0
  86. package/bundled-skills/huggingface-community-evals/examples/.env.example +3 -0
  87. package/bundled-skills/huggingface-community-evals/examples/USAGE_EXAMPLES.md +101 -0
  88. package/bundled-skills/huggingface-community-evals/scripts/inspect_eval_uv.py +104 -0
  89. package/bundled-skills/huggingface-community-evals/scripts/inspect_vllm_uv.py +306 -0
  90. package/bundled-skills/huggingface-community-evals/scripts/lighteval_vllm_uv.py +297 -0
  91. package/bundled-skills/huggingface-datasets/SKILL.md +130 -0
  92. package/bundled-skills/jev-social/SKILL.md +182 -0
  93. package/bundled-skills/longbridge-derivatives/SKILL.md +117 -0
  94. package/bundled-skills/longbridge-derivatives/references/option.md +36 -0
  95. package/bundled-skills/longbridge-derivatives/references/options-advanced.md +101 -0
  96. package/bundled-skills/longbridge-derivatives/references/options-pnl.md +74 -0
  97. package/bundled-skills/longbridge-derivatives/references/options-strategy.md +82 -0
  98. package/bundled-skills/longbridge-derivatives/references/options-volatility.md +70 -0
  99. package/bundled-skills/longbridge-derivatives/references/warrant.md +12 -0
  100. package/bundled-skills/longbridge-quant/SKILL.md +151 -0
  101. package/bundled-skills/longbridge-quant/references/correlation.md +51 -0
  102. package/bundled-skills/longbridge-quant/references/execution-model.md +68 -0
  103. package/bundled-skills/longbridge-quant/references/factor-research.md +95 -0
  104. package/bundled-skills/longbridge-quant/references/factor-screen.md +101 -0
  105. package/bundled-skills/longbridge-quant/references/hedging.md +136 -0
  106. package/bundled-skills/longbridge-quant/references/ml-strategy.md +77 -0
  107. package/bundled-skills/longbridge-quant/references/multifactor.md +68 -0
  108. package/bundled-skills/longbridge-quant/references/pairs-trading.md +61 -0
  109. package/bundled-skills/longbridge-quant/references/quant-cli.md +133 -0
  110. package/bundled-skills/longbridge-quant/references/quant-stats.md +150 -0
  111. package/bundled-skills/longbridge-quant/references/seasonality.md +50 -0
  112. package/bundled-skills/longbridge-quant/references/strategy-optimizer.md +68 -0
  113. package/bundled-skills/longbridge-quant/references/volatility-strategy.md +52 -0
  114. package/bundled-skills/longbridge-research/SKILL.md +187 -0
  115. package/bundled-skills/longbridge-research/references/company-profile.md +96 -0
  116. package/bundled-skills/longbridge-research/references/company-tearsheet.md +82 -0
  117. package/bundled-skills/longbridge-research/references/competitive-analysis.md +81 -0
  118. package/bundled-skills/longbridge-research/references/consensus.md +92 -0
  119. package/bundled-skills/longbridge-research/references/coverage-initiation.md +76 -0
  120. package/bundled-skills/longbridge-research/references/defi-yield.md +60 -0
  121. package/bundled-skills/longbridge-research/references/finance-calendar.md +165 -0
  122. package/bundled-skills/longbridge-research/references/financial-planning.md +77 -0
  123. package/bundled-skills/longbridge-research/references/forecast-eps.md +39 -0
  124. package/bundled-skills/longbridge-research/references/fund-holder.md +44 -0
  125. package/bundled-skills/longbridge-research/references/hkipo-analysis.md +101 -0
  126. package/bundled-skills/longbridge-research/references/industry-peers.md +46 -0
  127. package/bundled-skills/longbridge-research/references/industry-rank.md +62 -0
  128. package/bundled-skills/longbridge-research/references/insider-trades.md +48 -0
  129. package/bundled-skills/longbridge-research/references/institution-rating.md +62 -0
  130. package/bundled-skills/longbridge-research/references/investment-ideas.md +69 -0
  131. package/bundled-skills/longbridge-research/references/investment-proposal.md +95 -0
  132. package/bundled-skills/longbridge-research/references/investors.md +87 -0
  133. package/bundled-skills/longbridge-research/references/onchain.md +70 -0
  134. package/bundled-skills/longbridge-research/references/post-investment.md +76 -0
  135. package/bundled-skills/longbridge-research/references/shareholder.md +72 -0
  136. package/bundled-skills/longbridge-research/references/short-positions.md +50 -0
  137. package/bundled-skills/longbridge-research/references/short-trades.md +50 -0
  138. package/bundled-skills/longbridge-research/references/stock-research.md +61 -0
  139. package/bundled-skills/longbridge-research/references/thesis-tracker.md +64 -0
  140. package/bundled-skills/makepad-2-0-animation/SKILL.md +318 -0
  141. package/bundled-skills/makepad-2-0-animation/references/animator-reference.md +433 -0
  142. package/bundled-skills/makepad-2-0-dsl/SKILL.md +492 -0
  143. package/bundled-skills/makepad-2-0-dsl/references/dsl-syntax-reference.md +511 -0
  144. package/bundled-skills/makepad-2-0-dsl/references/extended-guide.md +56 -0
  145. package/bundled-skills/makepad-2-0-dsl/references/property-system.md +757 -0
  146. package/bundled-skills/makepad-2-0-events/SKILL.md +497 -0
  147. package/bundled-skills/makepad-2-0-events/references/event-patterns.md +802 -0
  148. package/bundled-skills/makepad-2-0-events/references/extended-guide.md +590 -0
  149. package/bundled-skills/makepad-2-0-layout/SKILL.md +499 -0
  150. package/bundled-skills/makepad-2-0-layout/references/extended-guide.md +243 -0
  151. package/bundled-skills/makepad-2-0-layout/references/layout-patterns.md +881 -0
  152. package/bundled-skills/makepad-2-0-widgets/SKILL.md +261 -0
  153. package/bundled-skills/makepad-2-0-widgets/references/widget-advanced.md +648 -0
  154. package/bundled-skills/makepad-2-0-widgets/references/widget-catalog.md +547 -0
  155. package/bundled-skills/meeting-distiller-pro/SKILL.md +120 -0
  156. package/bundled-skills/monte-carlo-analyze-root-cause/SKILL.md +12 -1
  157. package/bundled-skills/monte-carlo-asset-health/SKILL.md +12 -1
  158. package/bundled-skills/monte-carlo-context-detection/SKILL.md +170 -0
  159. package/bundled-skills/monte-carlo-context-detection/references/signal-definitions.md +46 -0
  160. package/bundled-skills/remotion-captions/SKILL.md +57 -0
  161. package/bundled-skills/remotion-captions/agents/openai.yaml +7 -0
  162. package/bundled-skills/remotion-captions/assets/remotion-icon.svg +4 -0
  163. package/bundled-skills/remotion-captions/display-captions.md +190 -0
  164. package/bundled-skills/remotion-captions/import-srt-captions.md +73 -0
  165. package/bundled-skills/remotion-captions/transcribe-captions.md +70 -0
  166. package/bundled-skills/remotion-create/SKILL.md +106 -0
  167. package/bundled-skills/remotion-create/agents/openai.yaml +7 -0
  168. package/bundled-skills/remotion-create/assets/remotion-icon.svg +4 -0
  169. package/bundled-skills/remotion-create/tailwind.md +11 -0
  170. package/bundled-skills/remotion-create/video-layout.md +9 -0
  171. package/bundled-skills/remotion-docs/SKILL.md +67 -0
  172. package/bundled-skills/remotion-docs/agents/openai.yaml +7 -0
  173. package/bundled-skills/remotion-docs/assets/remotion-icon.svg +4 -0
  174. package/bundled-skills/remotion-interactivity/SKILL.md +270 -0
  175. package/bundled-skills/remotion-interactivity/agents/openai.yaml +7 -0
  176. package/bundled-skills/remotion-interactivity/assets/remotion-icon.svg +4 -0
  177. package/bundled-skills/remotion-render/SKILL.md +48 -0
  178. package/bundled-skills/remotion-render/agents/openai.yaml +7 -0
  179. package/bundled-skills/remotion-render/assets/remotion-icon.svg +4 -0
  180. package/bundled-skills/remotion-render/transparent-videos.md +106 -0
  181. package/bundled-skills/saas-pricing-strategist/SKILL.md +169 -0
  182. package/bundled-skills/score-eval/SKILL.md +35 -0
  183. package/bundled-skills/writing-guidelines/SKILL.md +60 -0
  184. package/package.json +1 -1
  185. package/skills_index.json +980 -3
@@ -0,0 +1,228 @@
1
+ ---
2
+ description: Curated upstream guidance for Huggingface Community Evals; use when the workflow matches the user goal.
3
+ name: huggingface-community-evals
4
+ source_repo: huggingface/skills
5
+ source_type: official
6
+ source: huggingface
7
+ date_added: '2026-09-21'
8
+ risk: unknown
9
+ ---
10
+ ## When to Use
11
+ - Use when this upstream workflow matches the user's stated goal.
12
+ - Use when the task requires the procedures documented in this skill.
13
+
14
+ # Overview
15
+
16
+ This skill is for **running evaluations against models on the Hugging Face Hub on local hardware**.
17
+
18
+ It covers:
19
+ - `inspect-ai` with local inference
20
+ - `lighteval` with local inference
21
+ - choosing between `vllm`, Hugging Face Transformers, and `accelerate`
22
+ - smoke tests, task selection, and backend fallback strategy
23
+
24
+ It does **not** cover:
25
+ - Hugging Face Jobs orchestration
26
+ - model-card or `model-index` edits
27
+ - README table extraction
28
+ - Artificial Analysis imports
29
+ - `.eval_results` generation or publishing
30
+ - PR creation or community-evals automation
31
+
32
+ If the user wants to **run the same eval remotely on Hugging Face Jobs**, hand off to the `hugging-face-jobs` skill and pass it one of the local scripts in this skill.
33
+
34
+ If the user wants to **publish results into the community evals workflow**, stop after generating the evaluation run and hand off that publishing step to `~/code/community-evals`.
35
+
36
+ > All paths below are relative to the directory containing this `SKILL.md`.
37
+
38
+ # When To Use Which Script
39
+
40
+ | Use case | Script |
41
+ |---|---|
42
+ | Local `inspect-ai` eval on a Hub model via inference providers | `scripts/inspect_eval_uv.py` |
43
+ | Local GPU eval with `inspect-ai` using `vllm` or Transformers | `scripts/inspect_vllm_uv.py` |
44
+ | Local GPU eval with `lighteval` using `vllm` or `accelerate` | `scripts/lighteval_vllm_uv.py` |
45
+ | Extra command patterns | `examples/USAGE_EXAMPLES.md` |
46
+
47
+ # Prerequisites
48
+
49
+ - Prefer `uv run` for local execution.
50
+ - Set `HF_TOKEN` for gated/private models.
51
+ - For local GPU runs, verify GPU access before starting:
52
+
53
+ ```bash
54
+ uv --version
55
+ printenv HF_TOKEN >/dev/null
56
+ nvidia-smi
57
+ ```
58
+
59
+ If `nvidia-smi` is unavailable, either:
60
+ - use `scripts/inspect_eval_uv.py` for lighter provider-backed evaluation, or
61
+ - hand off to the `hugging-face-jobs` skill if the user wants remote compute.
62
+
63
+ # Core Workflow
64
+
65
+ 1. Choose the evaluation framework.
66
+ - Use `inspect-ai` when you want explicit task control and inspect-native flows.
67
+ - Use `lighteval` when the benchmark is naturally expressed as a lighteval task string, especially leaderboard-style tasks.
68
+ 2. Choose the inference backend.
69
+ - Prefer `vllm` for throughput on supported architectures.
70
+ - Use Hugging Face Transformers (`--backend hf`) or `accelerate` as compatibility fallbacks.
71
+ 3. Start with a smoke test.
72
+ - `inspect-ai`: add `--limit 10` or similar.
73
+ - `lighteval`: add `--max-samples 10`.
74
+ 4. Scale up only after the smoke test passes.
75
+ 5. If the user wants remote execution, hand off to `hugging-face-jobs` with the same script + args.
76
+
77
+ # Quick Start
78
+
79
+ ## Option A: inspect-ai with local inference providers path
80
+
81
+ Best when the model is already supported by Hugging Face Inference Providers and you want the lowest local setup overhead.
82
+
83
+ ```bash
84
+ uv run scripts/inspect_eval_uv.py \
85
+ --model meta-llama/Llama-3.2-1B \
86
+ --task mmlu \
87
+ --limit 20
88
+ ```
89
+
90
+ Use this path when:
91
+ - you want a quick local smoke test
92
+ - you do not need direct GPU control
93
+ - the task already exists in `inspect-evals`
94
+
95
+ ## Option B: inspect-ai on Local GPU
96
+
97
+ Best when you need to load the Hub model directly, use `vllm`, or fall back to Transformers for unsupported architectures.
98
+
99
+ Local GPU:
100
+
101
+ ```bash
102
+ uv run scripts/inspect_vllm_uv.py \
103
+ --model meta-llama/Llama-3.2-1B \
104
+ --task gsm8k \
105
+ --limit 20
106
+ ```
107
+
108
+ Transformers fallback:
109
+
110
+ ```bash
111
+ uv run scripts/inspect_vllm_uv.py \
112
+ --model microsoft/phi-2 \
113
+ --task mmlu \
114
+ --backend hf \
115
+ --trust-remote-code \
116
+ --limit 20
117
+ ```
118
+
119
+ ## Option C: lighteval on Local GPU
120
+
121
+ Best when the task is naturally expressed as a `lighteval` task string, especially Open LLM Leaderboard style benchmarks.
122
+
123
+ Local GPU:
124
+
125
+ ```bash
126
+ uv run scripts/lighteval_vllm_uv.py \
127
+ --model meta-llama/Llama-3.2-3B-Instruct \
128
+ --tasks "leaderboard|mmlu|5,leaderboard|gsm8k|5" \
129
+ --max-samples 20 \
130
+ --use-chat-template
131
+ ```
132
+
133
+ `accelerate` fallback:
134
+
135
+ ```bash
136
+ uv run scripts/lighteval_vllm_uv.py \
137
+ --model microsoft/phi-2 \
138
+ --tasks "leaderboard|mmlu|5" \
139
+ --backend accelerate \
140
+ --trust-remote-code \
141
+ --max-samples 20
142
+ ```
143
+
144
+ # Remote Execution Boundary
145
+
146
+ This skill intentionally stops at **local execution and backend selection**.
147
+
148
+ If the user wants to:
149
+ - run these scripts on Hugging Face Jobs
150
+ - pick remote hardware
151
+ - pass secrets to remote jobs
152
+ - schedule recurring runs
153
+ - inspect / cancel / monitor jobs
154
+
155
+ then switch to the **`hugging-face-jobs`** skill and pass it one of these scripts plus the chosen arguments.
156
+
157
+ # Task Selection
158
+
159
+ `inspect-ai` examples:
160
+ - `mmlu`
161
+ - `gsm8k`
162
+ - `hellaswag`
163
+ - `arc_challenge`
164
+ - `truthfulqa`
165
+ - `winogrande`
166
+ - `humaneval`
167
+
168
+ `lighteval` task strings use `suite|task|num_fewshot`:
169
+ - `leaderboard|mmlu|5`
170
+ - `leaderboard|gsm8k|5`
171
+ - `leaderboard|arc_challenge|25`
172
+ - `lighteval|hellaswag|0`
173
+
174
+ Multiple `lighteval` tasks can be comma-separated in `--tasks`.
175
+
176
+ # Backend Selection
177
+
178
+ - Prefer `inspect_vllm_uv.py --backend vllm` for fast GPU inference on supported architectures.
179
+ - Use `inspect_vllm_uv.py --backend hf` when `vllm` does not support the model.
180
+ - Prefer `lighteval_vllm_uv.py --backend vllm` for throughput on supported models.
181
+ - Use `lighteval_vllm_uv.py --backend accelerate` as the compatibility fallback.
182
+ - Use `inspect_eval_uv.py` when Inference Providers already cover the model and you do not need direct GPU control.
183
+
184
+ # Hardware Guidance
185
+
186
+ | Model size | Suggested local hardware |
187
+ |---|---|
188
+ | `< 3B` | consumer GPU / Apple Silicon / small dev GPU |
189
+ | `3B - 13B` | stronger local GPU |
190
+ | `13B+` | high-memory local GPU or hand off to `hugging-face-jobs` |
191
+
192
+ For smoke tests, prefer cheaper local runs plus `--limit` or `--max-samples`.
193
+
194
+ # Troubleshooting
195
+
196
+ - CUDA or vLLM OOM:
197
+ - reduce `--batch-size`
198
+ - reduce `--gpu-memory-utilization`
199
+ - switch to a smaller model for the smoke test
200
+ - if necessary, hand off to `hugging-face-jobs`
201
+ - Model unsupported by `vllm`:
202
+ - switch to `--backend hf` for `inspect-ai`
203
+ - switch to `--backend accelerate` for `lighteval`
204
+ - Gated/private repo access fails:
205
+ - verify `HF_TOKEN`
206
+ - Custom model code required:
207
+ - add `--trust-remote-code`
208
+
209
+ # Examples
210
+
211
+ See:
212
+ - `examples/USAGE_EXAMPLES.md` for local command patterns
213
+ - `scripts/inspect_eval_uv.py`
214
+ - `scripts/inspect_vllm_uv.py`
215
+ - `scripts/lighteval_vllm_uv.py`
216
+
217
+
218
+ ## Examples
219
+
220
+ ```text
221
+ User: Apply this skill to my current task.
222
+ Assistant: Follow the workflow in this skill, cite limitations, and ask before risky steps.
223
+ ```
224
+
225
+ ## Limitations
226
+
227
+ - Imported upstream skill; verify credentials, permissions, and safety boundaries before execution.
228
+ - Does not replace environment-specific validation, testing, or maintainer review.
@@ -0,0 +1,3 @@
1
+ # Hugging Face Token (required for gated/private models)
2
+ # Get your token at: https://huggingface.co/settings/tokens
3
+ HF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -0,0 +1,101 @@
1
+ # Usage Examples
2
+
3
+ This document provides practical examples for **running evaluations locally** against Hugging Face Hub models.
4
+
5
+ ## What this skill covers
6
+
7
+ - `inspect-ai` local runs
8
+ - `inspect-ai` with `vllm` or Transformers backends
9
+ - `lighteval` local runs with `vllm` or `accelerate`
10
+ - smoke tests and backend fallback patterns
11
+
12
+ ## What this skill does NOT cover
13
+
14
+ - `model-index`
15
+ - `.eval_results`
16
+ - community eval publication workflows
17
+ - model-card PR creation
18
+ - Hugging Face Jobs orchestration
19
+
20
+ If you want to run these same scripts remotely, use the `hugging-face-jobs` skill and pass one of the scripts in `scripts/`.
21
+
22
+ ## Setup
23
+
24
+ ```bash
25
+ cd skills/hugging-face-evaluation
26
+ export HF_TOKEN=hf_xxx
27
+ uv --version
28
+ ```
29
+
30
+ For local GPU runs:
31
+
32
+ ```bash
33
+ nvidia-smi
34
+ ```
35
+
36
+ ## inspect-ai examples
37
+
38
+ ### Quick smoke test
39
+
40
+ ```bash
41
+ uv run scripts/inspect_eval_uv.py \
42
+ --model meta-llama/Llama-3.2-1B \
43
+ --task mmlu \
44
+ --limit 10
45
+ ```
46
+
47
+ ### Local GPU with vLLM
48
+
49
+ ```bash
50
+ uv run scripts/inspect_vllm_uv.py \
51
+ --model meta-llama/Llama-3.2-8B-Instruct \
52
+ --task gsm8k \
53
+ --limit 20
54
+ ```
55
+
56
+ ### Transformers fallback
57
+
58
+ ```bash
59
+ uv run scripts/inspect_vllm_uv.py \
60
+ --model microsoft/phi-2 \
61
+ --task mmlu \
62
+ --backend hf \
63
+ --trust-remote-code \
64
+ --limit 20
65
+ ```
66
+
67
+ ## lighteval examples
68
+
69
+ ### Single task
70
+
71
+ ```bash
72
+ uv run scripts/lighteval_vllm_uv.py \
73
+ --model meta-llama/Llama-3.2-3B-Instruct \
74
+ --tasks "leaderboard|mmlu|5" \
75
+ --max-samples 20
76
+ ```
77
+
78
+ ### Multiple tasks
79
+
80
+ ```bash
81
+ uv run scripts/lighteval_vllm_uv.py \
82
+ --model meta-llama/Llama-3.2-3B-Instruct \
83
+ --tasks "leaderboard|mmlu|5,leaderboard|gsm8k|5" \
84
+ --max-samples 20 \
85
+ --use-chat-template
86
+ ```
87
+
88
+ ### accelerate fallback
89
+
90
+ ```bash
91
+ uv run scripts/lighteval_vllm_uv.py \
92
+ --model microsoft/phi-2 \
93
+ --tasks "leaderboard|mmlu|5" \
94
+ --backend accelerate \
95
+ --trust-remote-code \
96
+ --max-samples 20
97
+ ```
98
+
99
+ ## Hand-off to Hugging Face Jobs
100
+
101
+ When local hardware is not enough, switch to the `hugging-face-jobs` skill and run one of these scripts remotely. Keep the script path and args; move the orchestration there.
@@ -0,0 +1,104 @@
1
+ # /// script
2
+ # requires-python = ">=3.10"
3
+ # dependencies = [
4
+ # "inspect-ai>=0.3.0",
5
+ # "inspect-evals",
6
+ # "openai",
7
+ # ]
8
+ # ///
9
+
10
+ """
11
+ Entry point script for running inspect-ai evaluations against Hugging Face inference providers.
12
+ """
13
+
14
+ from __future__ import annotations
15
+
16
+ import argparse
17
+ import os
18
+ import subprocess
19
+ import sys
20
+ from pathlib import Path
21
+ from typing import Optional
22
+
23
+
24
+ def _inspect_evals_tasks_root() -> Optional[Path]:
25
+ """Return the installed inspect_evals package path if available."""
26
+ try:
27
+ import inspect_evals
28
+
29
+ return Path(inspect_evals.__file__).parent
30
+ except Exception:
31
+ return None
32
+
33
+
34
+ def _normalize_task(task: str) -> str:
35
+ """Allow lighteval-style `suite|task|shots` strings by keeping the task name."""
36
+ if "|" in task:
37
+ parts = task.split("|")
38
+ if len(parts) >= 2 and parts[1]:
39
+ return parts[1]
40
+ return task
41
+
42
+
43
+ def main() -> None:
44
+ parser = argparse.ArgumentParser(description="Inspect-ai job runner")
45
+ parser.add_argument("--model", required=True, help="Model ID on Hugging Face Hub")
46
+ parser.add_argument("--task", required=True, help="inspect-ai task to execute")
47
+ parser.add_argument("--limit", type=int, default=None, help="Limit number of samples to evaluate")
48
+ parser.add_argument(
49
+ "--tasks-root",
50
+ default=None,
51
+ help="Optional path to inspect task files. Defaults to the installed inspect_evals package.",
52
+ )
53
+ parser.add_argument(
54
+ "--sandbox",
55
+ default="local",
56
+ help="Sandbox backend to use (default: local for HF jobs without Docker).",
57
+ )
58
+ args = parser.parse_args()
59
+
60
+ # Ensure downstream libraries can read the token passed as a secret
61
+ hf_token = os.getenv("HF_TOKEN")
62
+ if hf_token:
63
+ os.environ.setdefault("HUGGING_FACE_HUB_TOKEN", hf_token)
64
+ os.environ.setdefault("HF_HUB_TOKEN", hf_token)
65
+
66
+ task = _normalize_task(args.task)
67
+ tasks_root = Path(args.tasks_root) if args.tasks_root else _inspect_evals_tasks_root()
68
+ if tasks_root and not tasks_root.exists():
69
+ tasks_root = None
70
+
71
+ cmd = [
72
+ "inspect",
73
+ "eval",
74
+ task,
75
+ "--model",
76
+ f"hf-inference-providers/{args.model}",
77
+ "--log-level",
78
+ "info",
79
+ # Reduce batch size to avoid OOM errors (default is 32)
80
+ "--max-connections",
81
+ "1",
82
+ # Set a small positive temperature (HF doesn't allow temperature=0)
83
+ "--temperature",
84
+ "0.001",
85
+ ]
86
+
87
+ if args.sandbox:
88
+ cmd.extend(["--sandbox", args.sandbox])
89
+
90
+ if args.limit:
91
+ cmd.extend(["--limit", str(args.limit)])
92
+
93
+ try:
94
+ subprocess.run(cmd, check=True, cwd=tasks_root)
95
+ print("Evaluation complete.")
96
+ except subprocess.CalledProcessError as exc:
97
+ location = f" (cwd={tasks_root})" if tasks_root else ""
98
+ print(f"Evaluation failed with exit code {exc.returncode}{location}", file=sys.stderr)
99
+ raise
100
+
101
+
102
+ if __name__ == "__main__":
103
+ main()
104
+