본문으로 건너뛰기
Skillpedia
에이전트48k · #4838

hugging-face-jobs

하는 일

이 도구는 내 컴퓨터에 아무것도 설치하지 않고도 강력한 클라우드 컴퓨터에서 프로그래밍 작업(Python 스크립트)을 실행하도록 해 줍니다. GPU 같은 자원을 사용해 작업 속도를 높일 수 있습니다.

사용하는 경우

  • ✓많은 연산 성능이 필요한 Python 스크립트를 실행해야 할 때.
  • ✓내 컴퓨터에 부담을 주지 않고 많은 데이터를 처리하고 싶을 때.
  • ✓반복적이거나 일정에 따라 실행되는 작업을 클라우드에서 돌려야 할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hugging-face-jobs/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hugging-face-jobs/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“GPU를 사용해 이 머신러닝 모델을 학습하도록 제 Python 스크립트를 실행해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

Python 코드를 보내면 도구가 원격 서버에서 이를 실행합니다. 모든 설정을 처리하며, GPU 같은 특수 하드웨어를 사용해 과정을 빠르게 할 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Running Workloads on Hugging Face Jobs

Detailed Guide

Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.

When to Use This Skill

Use this skill when users want to:

  • Run Python workloads on cloud infrastructure
  • Execute jobs without local GPU/TPU setup
  • Process data at scale
  • Run batch inference or experiments
  • Schedule recurring tasks
  • Use GPUs/TPUs for any workload
  • Persist results to the Hugging Face Hub

Prerequisites Checklist

Before starting any job, verify:

✅ Account & Authentication

  • Hugging Face Account with Pro, Team, or Enterprise plan (Jobs require paid plan)
  • Authenticated login: Check with hf_whoami()
  • HF_TOKEN for Hub Access ⚠️ CRITICAL - Required for any Hub operations (push models/datasets, download private repos, etc.)
  • Token must have appropriate permissions (read for downloads, write for uploads)

✅ Token Usage (See Token Usage section for details)

When tokens are required:

  • Pushing models/datasets to Hub
  • Accessing private repositories
  • Using Hub APIs in scripts
  • Any authenticated Hub operations

How to provide tokens:

# hf_jobs MCP tool — $HF_TOKEN is auto-replaced with real token:
{"secrets": {"HF_TOKEN": "$HF_TOKEN"}}

# HfApi().run_uv_job() — MUST pass actual token:
from huggingface_hub import get_token
secrets={"HF_TOKEN": get_token()}

⚠️ CRITICAL: The $HF_TOKEN placeholder is ONLY auto-replaced by the hf_jobs MCP tool. When using HfApi().run_uv_job(), you MUST pass the real token via get_token(). Passing the literal string "$HF_TOKEN" results in a 9-character invalid token and 401 errors.

Token Usage Guide

Understanding Tokens

What are HF Tokens?

  • Authentication credentials for Hugging Face Hub
  • Required for authenticated operations (push, private repos, API access)
  • Stored securely on your machine after hf auth login

Token Types:

  • Read Token - Can download models/datasets, read private repos
  • Write Token - Can push models/datasets, create repos, modify content
  • Organization Token - Can act on behalf of an organization

When Tokens Are Required

Always Required:

  • Pushing models/datasets to Hub
  • Accessing private repositories
  • Creating new repositories
  • Modifying existing repositories
  • Using Hub APIs programmatically

Not Required:

  • Downloading public models/datasets
  • Running jobs that don't interact with Hub
  • Reading public repository information

How to Provide Tokens to Jobs

Method 1: Automatic Token (Recommended)

hf_jobs("uv", {
    "script": "your_script.py",
    "secrets": {"HF_TOKEN": "$HF_TOKEN"}  # ✅ Automatic replacement
})

How it works:

  • $HF_TOKEN is a placeholder that gets replaced with your actual token
  • Uses the token from your logged-in session (hf auth login)
  • Most secure and convenient method
  • Token is encrypted server-side when passed as a secret

Benefits:

  • No token exposure in code
  • Uses your current login session
  • Automatically updated if you re-login
  • Works seamlessly with MCP tools

Method 2: Explicit Token (Not Recommended)

hf_jobs("uv", {
    "script": "your_script.py",
    "secrets": {"HF_TOKEN": "hf_abc123..."}  # ⚠️ Hardcoded token
})

When to use:

  • Only if automatic token doesn't work
  • Testing with a specific token
  • Organization tokens (use with caution)

Security concerns:

  • Token visible in code/logs
  • Must manually update if token rotates
  • Risk of token exposure

Method 3: Environment Variable (Less Secure)

hf_jobs("uv", {
    "script": "your_script.py",
    "env": {"HF_TOKEN": "hf_abc123..."}  # ⚠️ Less secure than secrets
})

Difference from secrets:

  • env variables are visible in job logs
  • secrets are encrypted server-side
  • Always prefer secrets for tokens

Using Tokens in Scripts

In your Python script, tokens are available as environment variables:

# /// script
# dependencies = ["huggingface-hub"]
# ///

import os
from huggingface_hub import HfApi

# Token is automatically available if passed via secrets
token = os.environ.get("HF_TOKEN")


…
자주 묻는 질문

이것을 사용하려면 돈을 내야 하나요?

네, 이 도구는 유료 Hugging Face 요금제(Pro, Team, Enterprise)가 있어야 작동합니다.

'토큰'이란 무엇이며 왜 필요한가요?

토큰은 Hugging Face에 여러분이 누구인지 증명하는 비밀번호 같은 것입니다. 데이터에 접근하거나 결과를 플랫폼에 다시 보낼 때 필요합니다.

스크립트는 어떤 토큰을 사용할지 어떻게 아나요?

가장 안전한 방법은 로그인된 계정에서 토큰을 자동으로 가져오는 특별한 코드를 사용하는 것입니다. 코드에 토큰을 직접 적는 것은 피하세요.

상세 정보

작성자의 원본 설명

Run workloads on Hugging Face Jobs with managed CPUs, GPUs, TPUs, secrets, and Hub persistence.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4838
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬