소스 정보
- 저장소
- firstbatchxyz/kai
- 최근 소스 활동
- 2026년 6월 19일 14:08
- 감지된 SKILL.md 언어
- 영어
- 스타
- 2
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/firstbatchxyz/kai --skill huggingface명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | huggingface |
| description | Browse, download, and deploy models, datasets, and spaces on HuggingFace Hub |
| version | 1.0.0 |
| author | kai-agent |
| metadata | {"kai":{"tags":["kai","compute","huggingface","models","datasets","inference","ml"]}} |
Skill for browsing, downloading, uploading, and running inference on models, datasets, and spaces from HuggingFace.
This skill uses the HF_TOKEN environment variable. If it is not set, ask your admin
to add it in Agent Settings. You can generate a token at https://huggingface.co/settings/tokens.
Some operations (public model browsing, public dataset loading) work without a token, but gated models, private repos, and uploads always require one.
pip install huggingface-hub transformers datasets
from huggingface_hub import HfApi
api = HfApi()
# Find top text-generation models sorted by downloads
models = api.list_models(
task="text-generation",
sort="downloads",
direction=-1,
limit=10,
)
for m in models:
print(f"{m.id} downloads={m.downloads}")
models = api.list_models(search="llama", sort="downloads", direction=-1, limit=5)
models = api.list_models(
task="text-generation",
library="vllm",
sort="downloads",
direction=-1,
limit=10,
)
This is particularly useful for inference optimization: filter by vllm or text-generation-inference
to find models already packaged for fast serving.
from huggingface_hub import ModelCard
card = ModelCard.load("meta-llama/Llama-3.1-8B-Instruct")
print(card.text) # Full markdown
print(card.data.tags) # Metadata tags
print(card.data.license) # License info
from huggingface_hub import hf_hub_download
path = hf_hub_download(
repo_id="meta-llama/Llama-3.1-8B-Instruct",
filename="config.json",
)
print(path)
from huggingface_hub import snapshot_download
local_dir = snapshot_download(
repo_id="meta-llama/Llama-3.1-8B-Instruct",
local_dir="./llama-3.1-8b",
ignore_patterns=["*.md", "*.txt"], # skip non-essential files
)
For inference optimization, look for GGUF, AWQ, or GPTQ variants:
models = api.list_models(search="Llama-3.1-8B AWQ", sort="downloads", direction=-1, limit=5)
api.upload_folder(
folder_path="./my-fine-tuned-model",
repo_id="your-org/my-model",
repo_type="model",
commit_message="Upload fine-tuned checkpoint",
)
datasets = api.list_datasets(search="code", sort="downloads", direction=-1, limit=10)
from datasets import load_dataset
ds = load_dataset("openai/gsm8k", split="train")
print(ds[0])
ds = load_dataset("allenai/c4", split="train", streaming=True)
for example in ds:
print(example["text"][:200])
break
from huggingface_hub import InferenceClient
client = InferenceClient(model="meta-llama/Llama-3.1-8B-Instruct")
response = client.text_generation(
"Explain quantization in 3 sentences:",
max_new_tokens=200,
temperature=0.7,
)
print(response)
response = client.chat_completion(
messages=[{"role": "user", "content": "What is KV-cache quantization?"}],
max_tokens=500,
)
print(response.choices[0].message.content)
embeddings = client.feature_extraction("Inference optimization for LLMs")
print(len(embeddings[0])) # embedding dimension
api.create_repo(
repo_id="your-org/my-demo",
repo_type="space",
space_sdk="gradio", # or "streamlit", "docker"
)
api.upload_folder(
folder_path="./my-space-app",
repo_id="your-org/my-demo",
repo_type="space",
)
api.duplicate_space("stabilityai/stable-diffusion", to_id="your-org/sd-copy")
library filter: Filter by vllm or text-generation-inference for deployment-ready models.~/.cache/huggingface/. Use huggingface-cli scan-cache to inspect and huggingface-cli delete-cache to free space.ignore_patterns to skip downloading unnecessary files (READMEs, training configs)HF_HOME if you want to customize the cache directoryHF_TOKEN environment variable