Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add itsmostafa/llm-engineering-skills --skill qloragit clone --depth 1 https://github.com/itsmostafa/llm-engineering-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/itsmostafa/llm-engineering-skills/qlora)<a href="https://agentmods.dev/skills/itsmostafa/llm-engineering-skills/qlora"><img src="https://agentmods.dev/badge/skills/itsmostafa/llm-engineering-skills/qlora/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/itsmostafa/llm-engineering-skills/qlora"><img src="https://agentmods.dev/badge/skills/itsmostafa/llm-engineering-skills/qlora.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00056 | $0.03275 |
| Opus 5 | $0.00028 | $0.01638 |
| Sonnet 5 | $0.00011 | $0.00655 |
| Haiku 4.5 | $0.00006 | $0.00328 |
Grade A, and why
qlora scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 412 lines — stays where its author put it; the contents beside it link to each section on GitHub.
QLoRA: Quantized Low-Rank Adaptation
QLoRA enables fine-tuning of large language models on consumer GPUs by combining 4-bit quantization with LoRA adapters. A 65B model can be fine-tuned on a single 48GB GPU while matching 16-bit fine-tuning performance.
Prerequisites: This skill assumes familiarity with LoRA. See the
loraskill for LoRA fundamentals (LoraConfig, target_modules, training patterns).
Table of Contents
- Core Innovations
- BitsAndBytesConfig Deep Dive
- Memory Requirements
- Complete Training Example
- Inference and Merging
- Troubleshooting
- Best Practices
- References
Core Innovations
QLoRA introduces three techniques that reduce memory usage without sacrificing performance:
4-bit NormalFloat (NF4)
NF4 is an information-theoretically optimal quantization data type for normally distributed weights. Neural network weights are typically normally distributed, making NF4 more efficient than standard 4-bit floats.
Storage: 4-bit NF4 (quantized weights)
Compute: 16-bit BF16 (dequantized for forward/backward pass)
The key insight: weights are stored in 4-bit but dequantized to bf16 for computation. Only the frozen base model is quantized; LoRA adapters remain in full precision.
NF4 vs FP4:
| Quantization | Description | Use Case |
|---|---|---|
nf4 |
Normalized Float 4-bit, optimal for normal distributions | Default, recommended |
fp4 |
Standard 4-bit float | Legacy, rarely needed |
Double Quantization
Standard quantization requires storing scaling constants (typically fp32) for each quantization block. Double quantization quantizes these constants too:
First quantization: weights → 4-bit + fp32 scaling constants
Double quantization: scaling constants → 8-bit + fp32 second-level constants
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 412 lines · 56 tokens per session scan A d43c99f4d54b
qlora is a skill published in the GitHub repository itsmostafa/llm-engineering-skills (23 stars, last pushed 4mo ago), licensed MIT. It adds 56 tokens to every session and 3,275 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
better-prompt
A prompt editor that turns rough instructions for AI systems into clearer, more complete prompts. It follows published OpenAI and Anthropic guidance.
ai-engineer-expert
Expert-level AI implementation, deployment, LLM integration, and production AI systems. Use when the user mentions AI engineering, LLM, deployment, production AI, or integration, or when the task involves LLM Patterns, LLM Integration, or Production Systems.
bio-prefect-dask-nextflow
Design reproducible bioinformatics pipelines with Prefect plus Dask or Nextflow. Use when scaffolding local, distributed, or scheduler-backed workflows.
gauntlet
Empirically test whether a skill actually improves model output — before trusting it. Runs a controlled experiment: planted-flaw fixture, no-skill control arm, skill arm(s), optional cross-model arms via installed CLIs, blind judging with shuffled labels, and a pressure test for verdict stability. Produces…
image-prompt
Use when the user wants to turn a short idea into a rich, production-grade image-generation prompt — posters, landing-page or UI mockups, ads, editorial layouts, photoreal scenes, game screenshots, logos, or illustrations. Builds ONE structured, copy-paste-ready prompt optimized for gpt-image-2 by default, following…
toolshed
Toolshed — durable, model-agnostic working state for ONE coding task (feature, fix, investigation) as docs/work/SLUG/ under docs/, DELETED at close. NOT the Workbench product/MCP (Slack highlights app). Seeds STATE + decisions/questions/evidence with grades and reproduction commands. Use for "start a toolshed", "seed…