ml-model-integration
Skill39 starsChanged 8 months agoMITView on GitHub
ML Model Integration provides workflows for discovering, evaluating, and deploying machine learning models from HuggingFace Hub.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- itallstartedwithaidea/claude-googleadsagentword for word, first seen May 21, 2026
Other versions1 project uses a version of this.
Word for word · 1
- itallstartedwithaidea/claude-googleadsagent★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository74 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- continuous-learningSkill
- entity-memory-managementSkill
- knowledge-base-injectionSkill
- long-horizon-workflowsSkill
- mcp-server-creationSkill
- memory-persistenceSkill
- multi-model-routingSkill
- parallel-agent-orchestrationSkill
- proactive-intelligenceSkill
- token-optimizationSkill
- adversarial-resilienceSkill
- agent-instinct-systemSkill
- anthropic-tool-masterySkill
- cognitive-scaffoldingSkill
- context-engineeringSkill
- multi-harness-portabilitySkill
- prompt-architectureSkill
- self-healing-agentsSkill
- session-archaeologySkill
- verification-loopsSkill
- ad-copy-generationSkill
- audience-targetingSkill
- budget-optimizationSkill
- competitor-analysisSkill
- conversion-trackingSkill
- google-ads-auditSkill
- keyword-researchSkill
- landing-page-auditSkill
- pmax-optimizationSkill
- quality-score-optimizationSkill
- remarketing-strategySkill
- shopping-adsSkill
- ci-cd-pipelinesSkill
- cloudflare-workersSkill
- configuration-managementSkill
- edge-renderingSkill
- observabilitySkill
- service-discoverySkill
- programmatic-videoSkill
- web-asset-generationSkill
- ai-chat-studioSkill
- assistant-presetsSkill
- batch-processingSkill
- knowledge-base-ragSkill
- low-code-generationSkill
- workflow-orchestrationSkill
- bioinformaticsSkill
- cheminformaticsSkill
- data-analysisSkill
- database-lookupSkill
- geospatial-analysisSkill
- machine-learningSkill
- research-methodologySkill
- scientific-writingSkill
- agent-security-scanningSkill
- codeql-semgrepSkill
- sandbox-hardeningSkill
- secret-protectionSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 145
Always define the task before searching for models—do not pick a model and find a task for it
- Distinctive: line 148
Use LoRA for fine-tuning to reduce training cost by 90% versus full fine-tuning
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ML Model Integration
Part of Agent Skills™ by googleadsagent.ai™
Description
ML Model Integration provides workflows for discovering, evaluating, and deploying machine learning models from HuggingFace Hub. The agent searches the model registry by task type, evaluates candidates on benchmark datasets, configures inference pipelines for local or API-based execution, and orchestrates fine-tuning workflows for domain adaptation.
HuggingFace Hub hosts 500,000+ models across hundreds of task types: text generation, image classification, object detection, speech recognition, translation, summarization, and more. Navigating this landscape requires understanding model architectures, license compatibility, hardware requirements, and benchmark performance. This skill encodes that knowledge, helping the agent select the right model for the right task at the right cost.
The skill covers the complete model lifecycle: discovery (searching by task, filtering by license and size), evaluation (running inference on test data, measuring latency and quality), deployment (local Transformers pipeline, HuggingFace Inference API, or self-hosted with TGI/vLLM), and fine-tuning (LoRA adapters for domain-specific customization with minimal training data).
Use When
- Selecting a model for a specific ML task (classification, generation, detection)
- Setting up inference pipelines locally or via API
- Fine-tuning a pre-trained model on domain-specific data
- Evaluating model quality against custom benchmarks
- Deploying models to production with optimized serving
- The user asks about HuggingFace, Transformers, or model selection
How It Works
graph TD
A[Task Definition] --> B[Search HuggingFace Hub]
B --> C[Filter: License, Size, Downloads]
C --> D[Shortlist Top-3 Candidates]
D --> E[Evaluate on Benchmark Data]
E --> F{Quality Sufficient?}
F -->|Yes| G[Deploy as Inference Pipeline]
F -->|No| H[Fine-tune with LoRA]
H --> I[Evaluate Fine-tuned Model]
I --> G
G --> J{Deployment Target}
J -->|Local| K[Transformers Pipeline]
J -->|API| L[HuggingFace Inference API]
J -->|Self-Hosted| M[TGI / vLLM Server]The workflow starts with task definition, not model selection. The agent searches for models matching the task, evaluates candidates, and only resorts to fine-tuning if off-the-shelf performance is insufficient.
Implementation
from transformers import pipeline, AutoModelForSequenceClassification, AutoTokenizer
from huggingface_hub import HfApi, ModelFilter
from peft import LoraConfig, get_peft_model, TaskType
import torch
def discover_models(task: str, min_downloads: int = 1000, license: str = "apache-2.0") -> list[dict]:
api = HfApi()
models = api.list_models(
filter=ModelFilter(task=task, library="transformers"),
sort="downloads",
direction=-1,
limit=20,
)
results = []
for m in models:
if m.downloads >= min_downloads:
results.append({
"id": m.modelId,
"downloads": m.downloads,
"likes": m.likes,
"tags": m.tags,
"pipeline_tag": m.pipeline_tag,
})
return results[:10]
def setup_inference(model_id: str, task: str, device: str = "auto") -> pipeline:
return pipeline(
task=task,
model=model_id,
device_map=device,
torch_dtype=torch.float16,
)
def evaluate_model(pipe, test_data: list[dict], label_key: str = "label") -> dict:
correct = 0
total = len(test_data)
latencies = []
for item in test_data:
import time
start = time.time()
pred = pipe(item["text"])
latencies.append((time.time() - start) * 1000)
if pred[0]["label"] == item[label_key]:
correct += 1
return {
"accuracy": correct / total,
"avg_latency_ms": sum(latencies) / len(latencies),
"p95_latency_ms": sorted(latencies)[int(0.95 * len(latencies))],
"total_samples": total,
}
def finetune_lora(
base_model: str,
train_dataset,
output_dir: str,
num_epochs: int = 3,
lora_rank: int = 16,
):
model = AutoModelForSequenceClassification.from_pretrained(base_model)
tokenizer = AutoTokenizer.from_pretrained(base_model)
lora_config = LoraConfig(
task_type=TaskType.SEQ_CLS,
r=lora_rank,
lora_alpha=32,
lora_dropout=0.1,
target_modules=["q_proj", "v_proj"],
)
model = get_peft_model(model, lora_config)
trainable = sum(p.numel() for p in model.parameters() if p.requires_grad)
total = sum(p.numel() for p in model.parameters())
print(f"Trainable: {trainable:,} / {total:,} ({100 * trainable / total:.1f}%)")
from transformers import Trainer, TrainingArguments
args = TrainingArguments(
output_dir=output_dir,
num_train_epochs=num_epochs,
per_device_train_batch_size=8,
learning_rate=2e-4,
save_strategy="epoch",
logging_steps=50,
fp16=True,
)
trainer = Trainer(model=model, args=args, train_dataset=train_dataset, tokenizer=tokenizer)
trainer.train()
model.save_pretrained(output_dir)Best Practices
- Always define the task before searching for models—do not pick a model and find a task for it
- Filter by license compatibility (Apache-2.0, MIT) before evaluating performance
- Evaluate on your own data, not just published benchmarks—domain matters
- Use LoRA for fine-tuning to reduce training cost by 90% versus full fine-tuning
- Quantize models (GPTQ, AWQ, bitsandbytes) for inference on consumer hardware
- Pin model revisions by commit hash to ensure reproducible inference
Platform Compatibility
| Platform | Support | Notes |
| Cursor | Full | Python + Transformers |
| VS Code | Full | Jupyter + ML tooling |
| Windsurf | Full | ML workflow support |
| Claude Code | Full | Pipeline script generation |
| Cline | Full | Model integration |
| aider | Partial | Code generation only |
Related Skills
- Programmatic Video
- Web Asset Generation
- React Best Practices
- Batch Processing
Keywords
huggingface transformers model-selection inference-pipeline fine-tuning lora model-evaluation ml-deployment
© 2026 googleadsagent.ai™ | Agent Skills™ | MIT License
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

