AGENT SKILL

huggingface-inference

Run models via Hugging Face Inference — serverless endpoints, dedicated deployments, and the Hub ecosystem.

License 许可
MIT
所属仓库
TanNhatCMS/jarvis
最近更新
2026-11-07
Stars
★ 0
Forks
1

01 前言 Front Matter

name
huggingface-inference
category
ai-research
description
Run models via Hugging Face Inference — serverless endpoints, dedicated deployments, and the Hub ecosystem.

03 SKILL.md 正文

Overview

Hugging Face's inference offerings let you run models from the Hub — the largest public collection of open models — via serverless Inference API, Inference Endpoints (dedicated deployments), and local libraries (Transformers, TGI, optimum). The strategic value is the Hub integration: discover a model, test it, deploy it — all in one ecosystem, with model cards, versioning, and community evaluation as part of the workflow.

For builders, the practical shape is: prototype against serverless inference for any Hub model in minutes; move to dedicated Inference Endpoints when you need latency guarantees, autoscaling control, or custom containers; drop to self-hosted (TGI/vLLM) when the economics or control requirements demand it. The Hub is the moat — no other inference provider is this close to where models are published.

Use Hugging Face inference when model discovery and the Hub ecosystem are part of the workflow, not just raw tokens.

When to use

  • Trying Hub models instantly via serverless inference (evaluation, prototyping).
  • Deploying a specific Hub model (including your own fine-tunes) as a dedicated endpoint.
  • Custom serving needs: bring your own container to Inference Endpoints.
  • Autoscaling dedicated deployments with scale-to-zero for variable traffic.
  • Staying in the Hub ecosystem: model cards, spaces, datasets alongside inference.
  • Multimodal and specialized models (the Hub's long tail) that other providers don't host.

Core concepts

  • Serverless Inference API: pay-per-use inference for popular Hub models. Fastest path from "found a model" to "called it." Rate-limited; for evaluation and light use.
  • Inference Endpoints: dedicated, autoscaled deployments of any Hub model (or your own). You choose the hardware, scaling bounds, and container. The production path within the HF ecosystem.
  • The Hub: models, datasets, spaces, and model cards — versioned, documented, community-evaluated. Model choice starts here; read the cards.
  • Model cards and metadata: architecture, training data, eval results, license, limitations. Due diligence lives here — read before deploying.
  • Custom containers: deploy with your own serving stack (TGI, vLLM, custom code) on Endpoints. Control the stack when defaults don't fit.
  • Autoscaling with scale-to-zero: dedicated endpoints scale with traffic including to zero — cost control for spiky workloads, with cold-start tradeoffs.
  • Private models: deploy your fine-tunes and proprietary models privately within the same workflow. Hub organizations manage access.
  • Spaces: hosted Gradio/Streamlit demos — useful for sharing interactive model demos, not for production APIs.

Practical workflow

  1. Discover on the Hub. Search models by task, license, and community signals (downloads, likes, eval results). Read model cards — especially limitations and license.
  2. Test via serverless. Call shortlisted models through the Inference API on your eval set. This is the cheapest possible model comparison.
  3. Check the license. Hub models carry varied licenses (Apache, Llama community, CC variants, custom). Confirm commercial-use terms before building a product on a model.
  4. Deploy dedicated for production. Move to Inference Endpoints with chosen hardware and autoscaling bounds. Load-test at expected traffic.
  5. Consider custom containers. If you need a specific serving stack or optimization, bring your own container — benchmark against the default.
  6. Manage versions. Pin model revisions (Hub commits, not just names). Test new revisions in staging before promoting.
  7. Monitor and optimize. Track latency, cost, and quality; right-size hardware from utilization data; use scale-to-zero where traffic allows.

Checklist for HF inference in production:

  • Model card reviewed (limitations, license, evals).
  • Model revision pinned, not floating.
  • Dedicated endpoint load-tested at expected traffic.
  • License confirmed for your use case.
  • Autoscaling bounds set; cost monitored.

Common pitfalls

  • Skipping the model card. Deploying a model without reading limitations, training data, and license. The card exists to prevent exactly this.
  • License violations. Assuming all Hub models are commercially usable. Check every model's license for your use case.
  • Floating revisions. Referencing a model name without pinning the revision — Hub models update, and behavior changes.
  • Serverless for production. Rate-limited shared inference in a production path. Serverless is for evaluation; dedicated endpoints are for production.
  • Ignoring the long tail's quality variance. The Hub hosts everything from state-of-the-art to broken uploads. Community signals and your own evals filter the tail.
  • Cold starts with scale-to-zero. Scale-to-zero saves money and adds latency on wake. Match the setting to your latency requirements.
  • No staging for revision updates. Promoting new model revisions directly to production. Test revisions like code releases.
  • Ecosystem lock-in blindness. Deep Hub integration is convenient — maintain portable client code so inference can move if needed.

04 同仓库更多 Skills

TanNhatCMS
TanNhatCMS/jarvis

web-scrape

Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open/fetch fails on JS-heavy pages, or when you need clean markdown/structured extraction from a site. Requires FIRECRAWL_API_KEY.

★ 0
TanNhatCMS
TanNhatCMS/jarvis

design-taste-frontend

tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML/CSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, "AI-made", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.

★ 0
TanNhatCMS
TanNhatCMS/jarvis

test-driven-development

Use when implementing any feature or bugfix, before writing implementation code

★ 0
TanNhatCMS
TanNhatCMS/jarvis

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

★ 0
TanNhatCMS
TanNhatCMS/jarvis

requesting-code-review

Use when completing tasks, implementing major features, or before merging to verify work meets requirements

★ 0
TanNhatCMS
TanNhatCMS/jarvis

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).

★ 0