opencode-skills-antigravity 1.0.40 → 1.0.41
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.
- package/bundled-skills/.antigravity-install-manifest.json +7 -1
- package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +3 -3
- package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
- package/bundled-skills/docs/sources/sources.md +2 -2
- package/bundled-skills/docs/users/bundles.md +1 -1
- package/bundled-skills/docs/users/claude-code-skills.md +1 -1
- package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
- package/bundled-skills/docs/users/getting-started.md +1 -1
- package/bundled-skills/docs/users/kiro-integration.md +1 -1
- package/bundled-skills/docs/users/usage.md +4 -4
- package/bundled-skills/docs/users/visual-guide.md +4 -4
- package/bundled-skills/hugging-face-cli/SKILL.md +192 -195
- package/bundled-skills/hugging-face-community-evals/SKILL.md +213 -0
- package/bundled-skills/hugging-face-community-evals/examples/.env.example +3 -0
- package/bundled-skills/hugging-face-community-evals/examples/USAGE_EXAMPLES.md +101 -0
- package/bundled-skills/hugging-face-community-evals/scripts/inspect_eval_uv.py +104 -0
- package/bundled-skills/hugging-face-community-evals/scripts/inspect_vllm_uv.py +306 -0
- package/bundled-skills/hugging-face-community-evals/scripts/lighteval_vllm_uv.py +297 -0
- package/bundled-skills/hugging-face-dataset-viewer/SKILL.md +120 -120
- package/bundled-skills/hugging-face-gradio/SKILL.md +304 -0
- package/bundled-skills/hugging-face-gradio/examples.md +613 -0
- package/bundled-skills/hugging-face-jobs/SKILL.md +25 -18
- package/bundled-skills/hugging-face-jobs/index.html +216 -0
- package/bundled-skills/hugging-face-jobs/references/hardware_guide.md +336 -0
- package/bundled-skills/hugging-face-jobs/references/hub_saving.md +352 -0
- package/bundled-skills/hugging-face-jobs/references/token_usage.md +570 -0
- package/bundled-skills/hugging-face-jobs/references/troubleshooting.md +475 -0
- package/bundled-skills/hugging-face-jobs/scripts/cot-self-instruct.py +718 -0
- package/bundled-skills/hugging-face-jobs/scripts/finepdfs-stats.py +546 -0
- package/bundled-skills/hugging-face-jobs/scripts/generate-responses.py +587 -0
- package/bundled-skills/hugging-face-model-trainer/SKILL.md +11 -12
- package/bundled-skills/hugging-face-model-trainer/references/gguf_conversion.md +296 -0
- package/bundled-skills/hugging-face-model-trainer/references/hardware_guide.md +283 -0
- package/bundled-skills/hugging-face-model-trainer/references/hub_saving.md +364 -0
- package/bundled-skills/hugging-face-model-trainer/references/local_training_macos.md +231 -0
- package/bundled-skills/hugging-face-model-trainer/references/reliability_principles.md +371 -0
- package/bundled-skills/hugging-face-model-trainer/references/trackio_guide.md +189 -0
- package/bundled-skills/hugging-face-model-trainer/references/training_methods.md +150 -0
- package/bundled-skills/hugging-face-model-trainer/references/training_patterns.md +203 -0
- package/bundled-skills/hugging-face-model-trainer/references/troubleshooting.md +282 -0
- package/bundled-skills/hugging-face-model-trainer/references/unsloth.md +313 -0
- package/bundled-skills/hugging-face-model-trainer/scripts/convert_to_gguf.py +424 -0
- package/bundled-skills/hugging-face-model-trainer/scripts/dataset_inspector.py +417 -0
- package/bundled-skills/hugging-face-model-trainer/scripts/estimate_cost.py +150 -0
- package/bundled-skills/hugging-face-model-trainer/scripts/train_dpo_example.py +106 -0
- package/bundled-skills/hugging-face-model-trainer/scripts/train_grpo_example.py +89 -0
- package/bundled-skills/hugging-face-model-trainer/scripts/train_sft_example.py +122 -0
- package/bundled-skills/hugging-face-model-trainer/scripts/unsloth_sft_example.py +512 -0
- package/bundled-skills/hugging-face-paper-publisher/SKILL.md +11 -4
- package/bundled-skills/hugging-face-paper-publisher/examples/example_usage.md +326 -0
- package/bundled-skills/hugging-face-paper-publisher/references/quick_reference.md +216 -0
- package/bundled-skills/hugging-face-paper-publisher/scripts/paper_manager.py +606 -0
- package/bundled-skills/hugging-face-paper-publisher/templates/arxiv.md +299 -0
- package/bundled-skills/hugging-face-paper-publisher/templates/ml-report.md +358 -0
- package/bundled-skills/hugging-face-paper-publisher/templates/modern.md +319 -0
- package/bundled-skills/hugging-face-paper-publisher/templates/standard.md +201 -0
- package/bundled-skills/hugging-face-papers/SKILL.md +241 -0
- package/bundled-skills/hugging-face-trackio/.claude-plugin/plugin.json +19 -0
- package/bundled-skills/hugging-face-trackio/SKILL.md +117 -0
- package/bundled-skills/hugging-face-trackio/references/alerts.md +196 -0
- package/bundled-skills/hugging-face-trackio/references/logging_metrics.md +206 -0
- package/bundled-skills/hugging-face-trackio/references/retrieving_metrics.md +251 -0
- package/bundled-skills/hugging-face-vision-trainer/SKILL.md +595 -0
- package/bundled-skills/hugging-face-vision-trainer/references/finetune_sam2_trainer.md +254 -0
- package/bundled-skills/hugging-face-vision-trainer/references/hub_saving.md +618 -0
- package/bundled-skills/hugging-face-vision-trainer/references/image_classification_training_notebook.md +279 -0
- package/bundled-skills/hugging-face-vision-trainer/references/object_detection_training_notebook.md +700 -0
- package/bundled-skills/hugging-face-vision-trainer/references/reliability_principles.md +310 -0
- package/bundled-skills/hugging-face-vision-trainer/references/timm_trainer.md +91 -0
- package/bundled-skills/hugging-face-vision-trainer/scripts/dataset_inspector.py +814 -0
- package/bundled-skills/hugging-face-vision-trainer/scripts/estimate_cost.py +217 -0
- package/bundled-skills/hugging-face-vision-trainer/scripts/image_classification_training.py +383 -0
- package/bundled-skills/hugging-face-vision-trainer/scripts/object_detection_training.py +710 -0
- package/bundled-skills/hugging-face-vision-trainer/scripts/sam_segmentation_training.py +382 -0
- package/bundled-skills/transformers-js/SKILL.md +639 -0
- package/bundled-skills/transformers-js/references/CACHE.md +339 -0
- package/bundled-skills/transformers-js/references/CONFIGURATION.md +390 -0
- package/bundled-skills/transformers-js/references/EXAMPLES.md +605 -0
- package/bundled-skills/transformers-js/references/MODEL_ARCHITECTURES.md +167 -0
- package/bundled-skills/transformers-js/references/PIPELINE_OPTIONS.md +545 -0
- package/bundled-skills/transformers-js/references/TEXT_GENERATION.md +315 -0
- package/package.json +1 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# /// script
|
|
3
|
+
# requires-python = ">=3.10"
|
|
4
|
+
# dependencies = [
|
|
5
|
+
# "trl>=0.12.0",
|
|
6
|
+
# "transformers>=4.36.0",
|
|
7
|
+
# "accelerate>=0.24.0",
|
|
8
|
+
# "trackio",
|
|
9
|
+
# ]
|
|
10
|
+
# ///
|
|
11
|
+
|
|
12
|
+
"""
|
|
13
|
+
Production-ready GRPO training example for online RL.
|
|
14
|
+
|
|
15
|
+
GRPO (Group Relative Policy Optimization) is an online RL method that
|
|
16
|
+
optimizes relative to group performance. Best for tasks with automatic
|
|
17
|
+
reward signals like code execution or math verification.
|
|
18
|
+
|
|
19
|
+
Usage with hf_jobs MCP tool:
|
|
20
|
+
hf_jobs("uv", {
|
|
21
|
+
"script": '''<paste this entire file>''',
|
|
22
|
+
"flavor": "a10g-large",
|
|
23
|
+
"timeout": "4h",
|
|
24
|
+
"secrets": {"HF_TOKEN": "$HF_TOKEN"},
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
Or submit the script content directly inline without saving to a file.
|
|
28
|
+
|
|
29
|
+
Note: For most GRPO use cases, the TRL maintained script is recommended:
|
|
30
|
+
https://raw.githubusercontent.com/huggingface/trl/main/examples/scripts/grpo.py
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
import trackio
|
|
34
|
+
from datasets import load_dataset
|
|
35
|
+
from trl import GRPOTrainer, GRPOConfig
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# Load dataset (GRPO uses prompt-only format)
|
|
39
|
+
dataset = load_dataset("trl-lib/math_shepherd", split="train")
|
|
40
|
+
print(f"✅ Dataset loaded: {len(dataset)} prompts")
|
|
41
|
+
|
|
42
|
+
# Training configuration
|
|
43
|
+
config = GRPOConfig(
|
|
44
|
+
# CRITICAL: Hub settings
|
|
45
|
+
output_dir="qwen-grpo-math",
|
|
46
|
+
push_to_hub=True,
|
|
47
|
+
hub_model_id="username/qwen-grpo-math",
|
|
48
|
+
hub_strategy="every_save",
|
|
49
|
+
|
|
50
|
+
# Training parameters
|
|
51
|
+
num_train_epochs=1,
|
|
52
|
+
per_device_train_batch_size=4,
|
|
53
|
+
gradient_accumulation_steps=4,
|
|
54
|
+
learning_rate=1e-6,
|
|
55
|
+
|
|
56
|
+
# Logging & checkpointing
|
|
57
|
+
logging_steps=10,
|
|
58
|
+
save_strategy="steps",
|
|
59
|
+
save_steps=100,
|
|
60
|
+
save_total_limit=2,
|
|
61
|
+
|
|
62
|
+
# Optimization
|
|
63
|
+
warmup_ratio=0.1,
|
|
64
|
+
lr_scheduler_type="cosine",
|
|
65
|
+
|
|
66
|
+
# Monitoring
|
|
67
|
+
report_to="trackio", # Integrate with Trackio
|
|
68
|
+
project="meaningful_project_name", # project name for the training name (trackio)
|
|
69
|
+
run_name="baseline-run", #Descriptive name for this training run
|
|
70
|
+
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
# Initialize and train
|
|
74
|
+
# Note: GRPO requires an instruct-tuned model as the base
|
|
75
|
+
trainer = GRPOTrainer(
|
|
76
|
+
model="Qwen/Qwen2.5-0.5B-Instruct",
|
|
77
|
+
train_dataset=dataset,
|
|
78
|
+
args=config,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
print("🚀 Starting GRPO training...")
|
|
82
|
+
trainer.train()
|
|
83
|
+
|
|
84
|
+
print("💾 Pushing to Hub...")
|
|
85
|
+
trainer.push_to_hub()
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
print("✅ Complete! Model at: https://huggingface.co/username/qwen-grpo-math")
|
|
89
|
+
print("📊 View metrics at: https://huggingface.co/spaces/username/trackio")
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# /// script
|
|
3
|
+
# requires-python = ">=3.10"
|
|
4
|
+
# dependencies = [
|
|
5
|
+
# "trl>=0.12.0",
|
|
6
|
+
# "peft>=0.7.0",
|
|
7
|
+
# "transformers>=4.36.0",
|
|
8
|
+
# "accelerate>=0.24.0",
|
|
9
|
+
# "trackio",
|
|
10
|
+
# ]
|
|
11
|
+
# ///
|
|
12
|
+
|
|
13
|
+
"""
|
|
14
|
+
Production-ready SFT training example with all best practices.
|
|
15
|
+
|
|
16
|
+
This script demonstrates:
|
|
17
|
+
- Trackio integration for real-time monitoring
|
|
18
|
+
- LoRA/PEFT for efficient training
|
|
19
|
+
- Proper Hub saving configuration
|
|
20
|
+
- Train/eval split for monitoring
|
|
21
|
+
- Checkpoint management
|
|
22
|
+
- Optimized training parameters
|
|
23
|
+
|
|
24
|
+
Usage with hf_jobs MCP tool:
|
|
25
|
+
hf_jobs("uv", {
|
|
26
|
+
"script": '''<paste this entire file>''',
|
|
27
|
+
"flavor": "a10g-large",
|
|
28
|
+
"timeout": "3h",
|
|
29
|
+
"secrets": {"HF_TOKEN": "$HF_TOKEN"},
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
Or submit the script content directly inline without saving to a file.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
import trackio
|
|
36
|
+
from datasets import load_dataset
|
|
37
|
+
from peft import LoraConfig
|
|
38
|
+
from trl import SFTTrainer, SFTConfig
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# Load dataset
|
|
42
|
+
print("📦 Loading dataset...")
|
|
43
|
+
dataset = load_dataset("trl-lib/Capybara", split="train")
|
|
44
|
+
print(f"✅ Dataset loaded: {len(dataset)} examples")
|
|
45
|
+
|
|
46
|
+
# Create train/eval split
|
|
47
|
+
print("🔀 Creating train/eval split...")
|
|
48
|
+
dataset_split = dataset.train_test_split(test_size=0.1, seed=42)
|
|
49
|
+
train_dataset = dataset_split["train"]
|
|
50
|
+
eval_dataset = dataset_split["test"]
|
|
51
|
+
print(f" Train: {len(train_dataset)} examples")
|
|
52
|
+
print(f" Eval: {len(eval_dataset)} examples")
|
|
53
|
+
|
|
54
|
+
# Note: For memory-constrained demos, skip eval by using full dataset as train_dataset
|
|
55
|
+
# and removing eval_dataset, eval_strategy, and eval_steps from config below
|
|
56
|
+
|
|
57
|
+
# Training configuration
|
|
58
|
+
config = SFTConfig(
|
|
59
|
+
# CRITICAL: Hub settings
|
|
60
|
+
output_dir="qwen-capybara-sft",
|
|
61
|
+
push_to_hub=True,
|
|
62
|
+
hub_model_id="username/qwen-capybara-sft",
|
|
63
|
+
hub_strategy="every_save", # Push checkpoints
|
|
64
|
+
|
|
65
|
+
# Training parameters
|
|
66
|
+
num_train_epochs=3,
|
|
67
|
+
per_device_train_batch_size=4,
|
|
68
|
+
gradient_accumulation_steps=4,
|
|
69
|
+
learning_rate=2e-5,
|
|
70
|
+
# max_length=1024, # Default - only set if you need different sequence length
|
|
71
|
+
|
|
72
|
+
# Logging & checkpointing
|
|
73
|
+
logging_steps=10,
|
|
74
|
+
save_strategy="steps",
|
|
75
|
+
save_steps=100,
|
|
76
|
+
save_total_limit=2,
|
|
77
|
+
|
|
78
|
+
# Evaluation - IMPORTANT: Only enable if eval_dataset provided
|
|
79
|
+
eval_strategy="steps",
|
|
80
|
+
eval_steps=100,
|
|
81
|
+
|
|
82
|
+
# Optimization
|
|
83
|
+
warmup_ratio=0.1,
|
|
84
|
+
lr_scheduler_type="cosine",
|
|
85
|
+
|
|
86
|
+
# Monitoring
|
|
87
|
+
report_to="trackio", # Integrate with Trackio
|
|
88
|
+
project="meaningful_project_name", # project name for the training name (trackio)
|
|
89
|
+
run_name="baseline-run", #Descriptive name for this training run
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
# LoRA configuration
|
|
93
|
+
peft_config = LoraConfig(
|
|
94
|
+
r=16,
|
|
95
|
+
lora_alpha=32,
|
|
96
|
+
lora_dropout=0.05,
|
|
97
|
+
bias="none",
|
|
98
|
+
task_type="CAUSAL_LM",
|
|
99
|
+
target_modules=["q_proj", "v_proj"],
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
# Initialize and train
|
|
103
|
+
print("🎯 Initializing trainer...")
|
|
104
|
+
trainer = SFTTrainer(
|
|
105
|
+
model="Qwen/Qwen2.5-0.5B",
|
|
106
|
+
train_dataset=train_dataset,
|
|
107
|
+
eval_dataset=eval_dataset, # CRITICAL: Must provide eval_dataset when eval_strategy is enabled
|
|
108
|
+
args=config,
|
|
109
|
+
peft_config=peft_config,
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
print("🚀 Starting training...")
|
|
113
|
+
trainer.train()
|
|
114
|
+
|
|
115
|
+
print("💾 Pushing to Hub...")
|
|
116
|
+
trainer.push_to_hub()
|
|
117
|
+
|
|
118
|
+
# Finish Trackio tracking
|
|
119
|
+
trackio.finish()
|
|
120
|
+
|
|
121
|
+
print("✅ Complete! Model at: https://huggingface.co/username/qwen-capybara-sft")
|
|
122
|
+
print("📊 View metrics at: https://huggingface.co/spaces/username/trackio")
|