huggingface
Skill15 starsChanged 43 days agoMITView on GitHub
Expert Hugging Face assistance covering Transformers, datasets, pipelines, Hub model loading, and tokenizers. Use when downloading, fine-tuning, and deploying open-source machine learning models.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- robium-ai/robiumtheir own version, first seen Aug 7, 2026
- mediause/agent-skillstheir own version, first seen May 11, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- robium-ai/robium★ 93same name
- mediause/agent-skills★ 9same name
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 repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- service-meshSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 131
Use BitsAndBytesConfig (nf4) or AWQ quantization to run open-weight LLMs with low memory consumption.
- Very specific: line 133
Use datasets.load_dataset(..., streaming=True) for datasets that exceed local storage capacity.
- Distinctive: line 140
Run unquantized 70B+ parameter models on consumer hardware.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Hugging Face
Hugging Face is the central platform and ecosystem for open-source machine learning, hosting models, datasets, Spaces, and foundational libraries like Transformers, Accelerate, and PEFT.
When to Use
- Pretrained Model Discovery & Inference: Utilizing thousands of open-source vision, NLP, and audio models via
transformers. - Parameter-Efficient Fine-Tuning (PEFT): Fine-tuning LLMs with LoRA / QLoRA using
peftandbitsandbytes. - Dataset Management & Streaming: Accessing multi-gigabyte datasets without memory exhaustion via
datasets. - Production Model Deployment: Deploying containerized endpoints with Hugging Face Text Generation Inference (TGI).
Quick Start
from transformers import pipeline
# One-line inference with modern pre-trained models
classifier = pipeline("sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english")
result = classifier("This framework makes NLP development seamless and fast!")
print(result) # [{'label': 'POSITIVE', 'score': 0.9998}]Core Concepts
Inference Pipeline with Transformers & PyTorch
Loading state-of-the-art transformer models with automatic tokenization:
from transformers import pipeline
import torch
# Create accelerated text-classification pipeline
classifier = pipeline(
task="text-classification",
model="distilbert/distilbert-base-uncased-finetuned-sst-2-english",
device=0 if torch.cuda.is_available() else -1
)
results = classifier([
"This new AI development platform accelerates productivity significantly.",
"The legacy system crashed repeatedly under moderate load."
])
for res in results:
print(f"Label: {res['label']}, Score: {res['score']:.4f}")4-Bit Model Quantization with BitsAndBytes
Loading large LLMs on consumer hardware using 4-bit NormalFloat (NF4):
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
model_id = "meta-llama/Llama-3.2-3B-Instruct"
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
quantization_config=bnb_config,
device_map="auto"
)
inputs = tokenizer("Explain quantum computing in one sentence:", return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))Streaming Massive Datasets with Datasets Library
Iterating over terabyte-scale datasets without downloading all files upfront:
from datasets import load_dataset
# Stream dataset lazily without full disk download
dataset = load_dataset('allenai/c4', 'en', split='train', streaming=True)
# Iterate through samples
for i, sample in enumerate(dataset.take(3)):
print(f"Sample {i+1}: {sample['text'][:100]}...\n")Common Patterns
Quantized Model Loading with BitsAndBytes (4-bit / 8-bit)
Problem: 7B-70B parameter models exceed single-GPU VRAM limits in FP16 precision.
Solution:
Load with 4-bit NF4 quantization using BitsAndBytesConfig:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.float16
)
model_id = "meta-llama/Llama-3.2-3B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
quantization_config=bnb_config,
device_map="auto"
)Best Practices
Do:
- Use
BitsAndBytesConfig(nf4) or AWQ quantization to run open-weight LLMs with low memory consumption. - Set
device_map="auto"when loading large models to distribute layers automatically across available GPUs and RAM. - Use
datasets.load_dataset(..., streaming=True)for datasets that exceed local storage capacity. - Pass
torch_dtype=torch.bfloat16when running inference on modern Ampere/Hopper GPU architectures.
Don't:
- Load entire models onto CPU before moving to GPU; instantiate directly with
device_map. - Hardcode Hugging Face access tokens in code; authenticate via
huggingface-cli loginorHF_TOKEN. - Run unquantized 70B+ parameter models on consumer hardware; use quantized GGUF, EXL2, or 4-bit NF4.
Troubleshooting
| Error | Cause | Solution |
Gated repo error / 403 Forbidden | Accessing gated model (e.g. Llama/Mistral) without accepting license on Hub. | Accept license on HuggingFace and run huggingface-cli login. |
CUDA Out of Memory in from_pretrained | Model weights exceed GPU memory in FP32. | Use device_map="auto", torch_dtype=torch.float16, or 4-bit quantization. |
KeyError in tokenizer output | Mismatched tokenizer and model configurations. | Always load tokenizer and model from the identical model_id. |
References
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.

