Claude Skill

ml-engineering

Plan and execute production ML engineering work — model training and fine-tuning (LoRA/QLoRA), evaluation and eval-set design, quantization decisions, inference deployment, and regression triage, grounded in practical engineering patterns for production ML systems. Do not use for

LLM Mart · 0 points · 17 views 0 listing impressions 0 install-command copies
Download magnus919-agent-skills-ml-engineering-ade3385.zip · 123 KB

Install

skills CLI npx skills add https://github.com/magnus919/agent-skills/tree/main/ml-engineering
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install magnus919-agent-skills@llmmart
Git git clone https://github.com/magnus919/agent-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole magnus919/agent-skills collection as a plugin from our marketplace. Git is the plain clone.

README

ML Engineering

Machine learning engineering methodology — model training, fine-tuning (LoRA/QLoRA), evaluation, quantization, deployment, and MLOps pipeline design. Grounded in practical engineering patterns for production ML systems.

Why Install This Skill

Your agent makes informed decisions about fine-tuning approaches, quantization trade-offs, GPU selection, serving architecture, evaluation metrics, and production drift with measurable budgets and benchmarks. Fillable templates connect data and feature lineage to deployed models, turn training and eval comparisons into reviewable records, and catch train/eval contamination before it invalidates a benchmark.

It also helps you decide whether a problem needs a language model at all. References compare classifier, zero-shot, SFT and RL approaches; a read-only helper compares complete task receipts under matched budgets and reports gains, regressions, latency and uncertainty without turning them into release approval. It also covers self-supervised tabular representations and ordered transaction histories, with a window audit that catches declared future/outcome context and fold-boundary violations. Task-specific text guides and source-bound receipt checks cover extraction, summarization and information-preserving context compaction. NLI guides explain candidate-dependent scores, binary/ternary heads, calibration and abstention; a saved-logit helper makes the arithmetic inspectable without calling a model.

Experimental weight-editing guidance helps distinguish a targeted repair from an unsupported capability claim, with a study record for controls, feedback budgets, exact artifact changes and rollback. The local serving guide and study worksheet compare single-user response speed, aggregate throughput and accepted tasks/hour across realistic contexts and concurrency, including eight, ten and larger workloads. A source record keeps engine/version claims separate from local performance evidence.

What You Get

Directory Purpose
SKILL.md Core methodology, trigger conditions, reference index
references/ Deep-dive reference files loaded on demand, including evaluation, lineage, parity, and drift response
templates/ Fillable records for training runs, eval regressions, quantization, lineage, and drift response
scripts/ Corpus overlap checks and pinned paired task comparisons with group uncertainty
evals/ Output-quality eval manifest for the skill's methodology cases

Triggers

Setting up fine-tuning runs, choosing evaluation metrics or repeated comparisons, tracking model lineage and feature parity, quantizing models, selecting training infrastructure, deploying inference services, responding to drift, or triaging a model regression.

Requirements

Assumes familiarity with PyTorch/HuggingFace ecosystem. References cover vLLM, llama.cpp, SGLang selection, TGI, DeepSpeed, and accelerate. The bundled script needs only Python 3 (standard library).

Quick Start

Check an eval corpus for leakage against your training data before trusting any eval score:

python3 ml-engineering/scripts/check-eval-overlap.py --train data/train/ --eval data/eval/

Compare saved task receipts (the bundled JSON examples are synthetic):

python3 ml-engineering/scripts/compare_task_runs.py \
  ml-engineering/templates/task-run-baseline.json \
  ml-engineering/templates/task-run-candidate.json

Exit zero means the comparison is complete; it does not approve a release.

Each eval file is reported with its overlap fraction against the training corpus; an eval file that shares more than 10% of its text with training is flagged LEAK and the script exits 1, so it can gate a CI pipeline. Add --json for machine-readable output, --token-ngram 5 to compare token sequences instead of character shingles, and --max-overlap-fraction 0.05 to tighten the threshold.

Load SKILL.md for the methodology overview and reference table, then load specific references or templates as needed for the task at hand.

Skill manifest

ML Engineering Methodology

Machine learning engineering is the bridge between model research and production systems. This methodology covers the engineering disciplines needed to train, evaluate, deploy, and maintain ML models reliably.

The ML Engineer's Domain

You own You don't own
Model training — LoRA/QLoRA fine-tuning, full fine-tuning, distributed training Statistical modeling and experimental design — that's the data scientist
Model evaluation — benchmark suites, custom eval sets, regression testing Causal inference and hypothesis testing — that's the data scientist
Quantization — GGUF, GPTQ, AWQ, bitsandbytes Training data collection and labeling — that's the data/ML ops team
Inference serving — vLLM, llama.cpp, TGI, Triton Business metrics and KPI definition — that's the product manager
Evaluation harness — lm-eval-harness, custom pipelines Data pipeline architecture — that's the data engineer
Model deployment — containerization, versioning, A/B testing Infrastructure provisioning — that's the platform engineer

Reference Files

Reference When to load
references/nli-classification.md NLI premise/hypothesis contracts, binary/ternary heads, score modes and truncation
references/nli-evaluation.md Domain/language validation, calibration, abstention, cost and adaptation experiments
references/nli-sources.md Primary NLI evidence and limitations
references/task-specific-extraction.md Span/encoder/generative extraction, offsets, source grounding, critical recall and receipts
references/task-specific-summarization.md Extractive/abstractive model choice, source/target retention, factuality and downstream compaction
references/text-model-sources.md Primary extraction/summarization evidence and uncertainty
references/tabular-representations.md Self-supervised tabular encoders, corruption/contrastive objectives, row-context and fair comparisons
references/sequence-sources.md Primary-source findings and uncertainty for tabular and sequence representations
references/transaction-sequences.md Ordered-event representation, windows, label maturity, forward/entity validation and stateful serving
references/specialization-decisions.md Choosing rules/classifiers/zero-shot/prompt/SFT/RL, designing fixed-budget comparisons and interpreting verifier or case-study claims
references/specialization-evidence.md Primary-source findings, contradictory results and local validation limits
references/weight-space-programming.md Direct tensor inspection/editing hypotheses, feedback budgets, negative results and artifact validation
references/fine-tuning.md Setting up a LoRA/QLoRA/ full fine-tuning run — data prep, hyperparameters, validation strategy
references/evaluation.md Evaluating a model — benchmark selection, custom eval sets, regression tracking, comparison methodology
references/evaluation-and-lineage.md Metric/configuration decisions, repeated stochastic comparisons, end-to-end lineage, temporal feature parity, drift response, and adaptation/serving tradeoffs
references/local-serving-selection.md Workload-first engine selection, actual inference overlap, concurrency sweeps beyond ten, task throughput and bounded stop criteria
references/local-serving-sources.md Primary serving documentation, version boundaries and limits of benchmark/video claims
references/quantization-inference.md Quantizing a model and serving it — GGUF/GPTQ/AWQ/bitsandbytes comparison, calibration data strategies, KV cache quantization, vLLM/llama.cpp/TGI/Triton architecture, production considerations
references/training-infrastructure.md Selecting and provisioning training infrastructure — GPU selection, VRAM budgeting, multi-GPU strategies (DDP/FSDP/DeepSpeed), cloud vs on-prem, storage, monitoring

Templates

Template When to Use
templates/nli-experiment.md, templates/nli-logits.json NLI study worksheet and synthetic saved-logit contract
templates/text-model-record.md, templates/extraction-receipt.json, templates/summary-receipt.json Task/lineage worksheet and synthetic extraction/summary contracts
templates/sequence-model-record.md Representation, pretraining exposure, time/window/state and evaluation record
templates/sequence-windows.json Synthetic time-aware window audit contract
templates/specialization-study.md Preregistering task-matched alternatives, data freeze, quality/resource guardrails and stopping rules
templates/task-run-baseline.json, templates/task-run-candidate.json Synthetic saved-receipt contract examples; not model results
templates/weight-edit-study.md Preregistering a targeted weight repair, exact patch lineage, controls and rollback
templates/training-run-record.md Recording a training or fine-tuning run — model and data versions, full config, environment, eval results — so it can be reproduced
templates/eval-regression-table.md Tracking model quality across runs and triaging a regression — one row per eval case or capability subset
templates/local-serving-study.md Freezing a serving comparison, memory budget, load sweep, task acceptance and source/measurement evidence
templates/quantization-decision-record.md Recording a quantization decision — baseline, candidates compared, quality threshold, and rollback path
templates/model-lineage-record.md Linking data/features, code/configuration, runs, artifacts, evaluations, registry state, and deployed serving versions
templates/drift-response-record.md Recording drift signals, thresholds, diagnosis, retrain/rollback decisions, and post-action evidence

Scripts

Script When to Use
scripts/nli_score_contract.py Saved NLI score arithmetic and mapping/shape checks; no model execution or calibration
scripts/audit_text_outcomes.py Exact source-span and summary-receipt consistency checks; no model or semantic judgment
scripts/audit_sequence_windows.py Declared window availability, identity, outcome and fold-boundary screen; no model execution
scripts/compare_task_runs.py Descriptive paired task comparison with matched pins/roster, incomplete-evidence rejection and group bootstrap; no release approval
scripts/check-eval-overlap.py Checking a training corpus against an eval corpus for test-set leakage (shared n-grams); --json for CI, exit 1 when an eval file exceeds the overlap threshold

Evals

evals/evals.json — output-quality eval manifest for this skill: fine-tuning plan review, eval-set design, quantization decision, deployment plan, regression triage, training-run reproducibility, and workload-first serving comparisons. Serving rubric changes and synthetic challenge examples are in evals/local-serving-challenges.md.

Specialization decision boundary

Start from the required outcome and permitted prediction-time information. Include simpler rules, supervised or zero-shot classifiers where appropriate; classification scores are not automatically calibrated probabilities. A proprietary LLM case study is orientation, not proof of architecture optimality. Compare matched context/policy/budgets, preserve critical regressions and require every registered guardrail before promotion. New helper exit zero is descriptive comparison completion only; model execution and release remain separate evidence.

Route training operations to unsloth, typed decisions to system-one, labels/provenance to training-data-annotation, experimental analysis/calibration to data-scientist, and agent-level evaluation to agent-evals-and-observability.

For tabular foundation-model choice, read references/tabular-foundations.md; for named TabPFN setup/context/inference/fine-tuning, use tabpfn.

Local serving decision boundary

Select a compatible stack against the actual workload; do not infer capacity from single-stream tok/s, nominal model size or an idle agent roster. Distinguish aggregate generation throughput from accepted tasks/hour and measure actual inference overlap. Start with a configurable 1, 2, 4, 8, 10 concurrency ladder and extend beyond ten when useful within registered memory, quality, latency and time limits. Preserve matched context/output/reasoning settings and all errors/retries. Use references/local-serving-selection.md and templates/local-serving-study.md. SGLang is a candidate, not a new tool skill. Keep task/trajectory grading in agent-evals-and-observability; reuse compare_task_runs.py only for its matched single-attempt receipt contract. Finish with measured operating limits or a plan explicitly marked not run.

Core Principles

Measure before you optimize — Never quantize, prune, or distill a model without first measuring its baseline performance. Optimization without measurement is guessing.

Reproducibility is non-negotiable — Every training run needs a reproducible config: seed, data version, hyperparameters, and evaluation methodology. If you can't reproduce it, you can't ship it.

Baseline first — Before running an expensive fine-tuning run, establish a baseline with the base model. If the base model is already good enough, the fine-tuning budget is better spent elsewhere.

Test at the boundary — Model evaluation is most informative at the edges of the capability distribution, not at the center. Hard examples reveal more than easy ones.

The evaluation set is a liability — Every example in your eval set is a potential test-set leak. Use held-out sets, rotate examples, and periodically audit for contamination with the overlap checker.

When not to use

Do not use this skill for statistical modeling, experimental design, or causal inference — that's the data scientist's discipline. Do not use it to operate a specific inference engine: for llama.cpp installation, model loading, benchmarking, and troubleshooting, load the llama-cpp tool skill instead; for vLLM deployment, model configuration, benchmarking, batching tuning, GPU operation, and upgrade/rollback, load the vllm tool skill instead. This skill provides the methodology (eval-set design, quantization trade-offs, deployment plans, regression triage); the tool skills own the runbooks.

Files (agent-skills)
  • evals
    • evals.json 38.3 KB
      Loading…
    • local-serving-challenges.md 8 KB
      Loading…
    • specialization-challenges.md 12.9 KB
      Loading…
    • weight-edit-challenges.md 1.8 KB
      Loading…
  • references
    • evaluation-and-lineage.md 4 KB
      Loading…
    • evaluation.md 1.3 KB
      Loading…
    • fine-tuning.md 1.3 KB
      Loading…
    • local-serving-selection.md 10.1 KB
      Loading…
    • local-serving-sources.md 4.2 KB
      Loading…
    • nli-classification.md 5.5 KB
      Loading…
    • nli-evaluation.md 4 KB
      Loading…
    • nli-sources.md 4.6 KB
      Loading…
    • quantization-inference.md 34.8 KB
      Loading…
    • sequence-sources.md 1.9 KB
      Loading…
    • specialization-decisions.md 15.3 KB
      Loading…
    • specialization-evidence.md 6 KB
      Loading…
    • tabular-foundations.md 4.6 KB
      Loading…
    • tabular-representations.md 4.8 KB
      Loading…
    • task-specific-extraction.md 5.7 KB
      Loading…
    • task-specific-summarization.md 5.5 KB
      Loading…
    • text-model-sources.md 2 KB
      Loading…
    • training-infrastructure.md 3.9 KB
      Loading…
    • transaction-sequences.md 6 KB
      Loading…
    • weight-space-programming.md 6.3 KB
      Loading…
  • scripts
    • audit_sequence_windows.py 5.6 KB
      Loading…
    • audit_text_outcomes.py 6.4 KB
      Loading…
    • check-eval-overlap.py 9.3 KB
      Loading…
    • compare_task_runs.py 7.2 KB
      Loading…
    • nli_score_contract.py 4.1 KB
      Loading…
    • test_audit_sequence_windows.py 3.6 KB
      Loading…
    • test_audit_text_outcomes.py 3.7 KB
      Loading…
    • test_check_eval_overlap.py 7.7 KB
      Loading…
    • test_compare_task_runs.py 4.6 KB
      Loading…
    • test_nli_score_contract.py 3.7 KB
      Loading…
  • templates
    • drift-response-record.md 713 B
      Loading…
    • eval-regression-table.md 1.7 KB
      Loading…
    • extraction-receipt.json 517 B
      Loading…
    • local-serving-study.md 5.4 KB
      Loading…
    • model-lineage-record.md 918 B
      Loading…
    • nli-experiment.md 1.2 KB
      Loading…
    • nli-logits.json 436 B
      Loading…
    • quantization-decision-record.md 2.9 KB
      Loading…
    • sequence-model-record.md 1.7 KB
      Loading…
    • sequence-windows.json 1.6 KB
      Loading…
    • specialization-study.md 3.3 KB
      Loading…
    • summary-receipt.json 801 B
      Loading…
    • task-run-baseline.json 1 KB
      Loading…
    • task-run-candidate.json 1 KB
      Loading…
    • text-model-record.md 1.4 KB
      Loading…
    • training-run-record.md 2.8 KB
      Loading…
    • weight-edit-study.md 2.4 KB
      Loading…
  • README.md 4.1 KB
    # ML Engineering
    
    Machine learning engineering methodology — model training, fine-tuning (LoRA/QLoRA), evaluation, quantization, deployment, and MLOps pipeline design. Grounded in practical engineering patterns for production ML systems.
    
    ## Why Install This Skill
    
    Your agent makes informed decisions about fine-tuning approaches, quantization trade-offs, GPU selection, serving architecture, evaluation metrics, and production drift with measurable budgets and benchmarks. Fillable templates connect data and feature lineage to deployed models, turn training and eval comparisons into reviewable records, and catch train/eval contamination before it invalidates a benchmark.
    
    It also helps you decide whether a problem needs a language model at all.
    References compare classifier, zero-shot, SFT and RL approaches; a read-only
    helper compares complete task receipts under matched budgets and reports gains,
    regressions, latency and uncertainty without turning them into release approval. It also covers self-supervised tabular representations and ordered
    transaction histories, with a window audit that catches declared future/outcome
    context and fold-boundary violations. Task-specific text guides and source-bound receipt checks
    cover extraction, summarization and information-preserving context compaction. NLI guides
    explain candidate-dependent scores, binary/ternary heads, calibration and abstention;
    a saved-logit helper makes the arithmetic inspectable without calling a model.
    
    Experimental weight-editing guidance helps distinguish a targeted repair from an
    unsupported capability claim, with a study record for controls, feedback budgets,
    exact artifact changes and rollback. The [local serving guide](references/local-serving-selection.md)
    and [study worksheet](templates/local-serving-study.md) compare single-user response
    speed, aggregate throughput and accepted tasks/hour across realistic contexts and
    concurrency, including eight, ten and larger workloads. A [source record](references/local-serving-sources.md)
    keeps engine/version claims separate from local performance evidence.
    
    ## What You Get
    
    | Directory | Purpose |
    |-----------|---------|
    | `SKILL.md` | Core methodology, trigger conditions, reference index |
    | `references/` | Deep-dive reference files loaded on demand, including evaluation, lineage, parity, and drift response |
    | `templates/` | Fillable records for training runs, eval regressions, quantization, lineage, and drift response |
    | `scripts/` | Corpus overlap checks and pinned paired task comparisons with group uncertainty |
    | `evals/` | Output-quality eval manifest for the skill's methodology cases |
    
    ## Triggers
    
    Setting up fine-tuning runs, choosing evaluation metrics or repeated comparisons, tracking model lineage and feature parity, quantizing models, selecting training infrastructure, deploying inference services, responding to drift, or triaging a model regression.
    
    ## Requirements
    
    Assumes familiarity with PyTorch/HuggingFace ecosystem. References cover vLLM, llama.cpp, SGLang selection, TGI, DeepSpeed, and accelerate. The bundled script needs only Python 3 (standard library).
    
    ## Quick Start
    
    Check an eval corpus for leakage against your training data before trusting any eval score:
    
    ```bash
    python3 ml-engineering/scripts/check-eval-overlap.py --train data/train/ --eval data/eval/
    ```
    
    Compare saved task receipts (the bundled JSON examples are synthetic):
    
    ```bash
    python3 ml-engineering/scripts/compare_task_runs.py \
      ml-engineering/templates/task-run-baseline.json \
      ml-engineering/templates/task-run-candidate.json
    ```
    
    Exit zero means the comparison is complete; it does not approve a release.
    
    Each eval file is reported with its overlap fraction against the training corpus; an eval file that shares more than 10% of its text with training is flagged `LEAK` and the script exits 1, so it can gate a CI pipeline. Add `--json` for machine-readable output, `--token-ngram 5` to compare token sequences instead of character shingles, and `--max-overlap-fraction 0.05` to tighten the threshold.
    
    Load SKILL.md for the methodology overview and reference table, then load specific references or templates as needed for the task at hand.
    
  • SKILL.md 11.5 KB
    ---
    name: ml-engineering
    description: >-
      Plan and execute production ML engineering work — classifier versus generative
      model selection, zero-shot baselines, coding specialization, model training and
      fine-tuning (LoRA/QLoRA), evaluation and eval-set design, quantization
      decisions, inference deployment, lineage, feature parity, drift response, and
      regression triage, experimental weight inspection and targeted editing, grounded in practical engineering patterns for production ML
      systems. Do not use for statistical
      modeling and experimental design (that's the data scientist) or for operating
      a specific inference engine (that's a tool skill such as llama-cpp or vllm).
    license: MIT
    metadata:
      tags: ml, machine-learning, fine-tuning, training, evaluation, quantization, mlops,
        inference, vllm, gguf
      source_repo: https://github.com/magnus919/hermes-profiles
    ---
    
    # ML Engineering Methodology
    
    Machine learning engineering is the bridge between model research and production systems. This methodology covers the engineering disciplines needed to train, evaluate, deploy, and maintain ML models reliably.
    
    ## The ML Engineer's Domain
    
    | You own | You don't own |
    |---------|--------------|
    | Model training — LoRA/QLoRA fine-tuning, full fine-tuning, distributed training | Statistical modeling and experimental design — that's the data scientist |
    | Model evaluation — benchmark suites, custom eval sets, regression testing | Causal inference and hypothesis testing — that's the data scientist |
    | Quantization — GGUF, GPTQ, AWQ, bitsandbytes | Training data collection and labeling — that's the data/ML ops team |
    | Inference serving — [vLLM](../vllm/SKILL.md), [llama.cpp](../llama-cpp/SKILL.md), TGI, Triton | Business metrics and KPI definition — that's the product manager |
    | Evaluation harness — lm-eval-harness, custom pipelines | Data pipeline architecture — that's the data engineer |
    | Model deployment — containerization, versioning, A/B testing | Infrastructure provisioning — that's the platform engineer |
    
    ## Reference Files
    
    | Reference | When to load |
    |-----------|-------------|
    | `references/nli-classification.md` | NLI premise/hypothesis contracts, binary/ternary heads, score modes and truncation |
    | `references/nli-evaluation.md` | Domain/language validation, calibration, abstention, cost and adaptation experiments |
    | `references/nli-sources.md` | Primary NLI evidence and limitations |
    | `references/task-specific-extraction.md` | Span/encoder/generative extraction, offsets, source grounding, critical recall and receipts |
    | `references/task-specific-summarization.md` | Extractive/abstractive model choice, source/target retention, factuality and downstream compaction |
    | `references/text-model-sources.md` | Primary extraction/summarization evidence and uncertainty |
    | `references/tabular-representations.md` | Self-supervised tabular encoders, corruption/contrastive objectives, row-context and fair comparisons |
    | `references/sequence-sources.md` | Primary-source findings and uncertainty for tabular and sequence representations |
    | `references/transaction-sequences.md` | Ordered-event representation, windows, label maturity, forward/entity validation and stateful serving |
    | `references/specialization-decisions.md` | Choosing rules/classifiers/zero-shot/prompt/SFT/RL, designing fixed-budget comparisons and interpreting verifier or case-study claims |
    | `references/specialization-evidence.md` | Primary-source findings, contradictory results and local validation limits |
    | `references/weight-space-programming.md` | Direct tensor inspection/editing hypotheses, feedback budgets, negative results and artifact validation |
    | `references/fine-tuning.md` | Setting up a LoRA/QLoRA/ full fine-tuning run — data prep, hyperparameters, validation strategy |
    | `references/evaluation.md` | Evaluating a model — benchmark selection, custom eval sets, regression tracking, comparison methodology |
    | `references/evaluation-and-lineage.md` | Metric/configuration decisions, repeated stochastic comparisons, end-to-end lineage, temporal feature parity, drift response, and adaptation/serving tradeoffs |
    | `references/local-serving-selection.md` | Workload-first engine selection, actual inference overlap, concurrency sweeps beyond ten, task throughput and bounded stop criteria |
    | `references/local-serving-sources.md` | Primary serving documentation, version boundaries and limits of benchmark/video claims |
    | `references/quantization-inference.md` | Quantizing a model and serving it — GGUF/GPTQ/AWQ/bitsandbytes comparison, calibration data strategies, KV cache quantization, vLLM/llama.cpp/TGI/Triton architecture, production considerations |
    | `references/training-infrastructure.md` | Selecting and provisioning training infrastructure — GPU selection, VRAM budgeting, multi-GPU strategies (DDP/FSDP/DeepSpeed), cloud vs on-prem, storage, monitoring |
    
    ## Templates
    
    | Template | When to Use |
    |-----------|-------------|
    | `templates/nli-experiment.md`, `templates/nli-logits.json` | NLI study worksheet and synthetic saved-logit contract |
    | `templates/text-model-record.md`, `templates/extraction-receipt.json`, `templates/summary-receipt.json` | Task/lineage worksheet and synthetic extraction/summary contracts |
    | `templates/sequence-model-record.md` | Representation, pretraining exposure, time/window/state and evaluation record |
    | `templates/sequence-windows.json` | Synthetic time-aware window audit contract |
    | `templates/specialization-study.md` | Preregistering task-matched alternatives, data freeze, quality/resource guardrails and stopping rules |
    | `templates/task-run-baseline.json`, `templates/task-run-candidate.json` | Synthetic saved-receipt contract examples; not model results |
    | `templates/weight-edit-study.md` | Preregistering a targeted weight repair, exact patch lineage, controls and rollback |
    | `templates/training-run-record.md` | Recording a training or fine-tuning run — model and data versions, full config, environment, eval results — so it can be reproduced |
    | `templates/eval-regression-table.md` | Tracking model quality across runs and triaging a regression — one row per eval case or capability subset |
    | `templates/local-serving-study.md` | Freezing a serving comparison, memory budget, load sweep, task acceptance and source/measurement evidence |
    | `templates/quantization-decision-record.md` | Recording a quantization decision — baseline, candidates compared, quality threshold, and rollback path |
    | `templates/model-lineage-record.md` | Linking data/features, code/configuration, runs, artifacts, evaluations, registry state, and deployed serving versions |
    | `templates/drift-response-record.md` | Recording drift signals, thresholds, diagnosis, retrain/rollback decisions, and post-action evidence |
    
    ## Scripts
    
    | Script | When to Use |
    |-----------|-------------|
    | `scripts/nli_score_contract.py` | Saved NLI score arithmetic and mapping/shape checks; no model execution or calibration |
    | `scripts/audit_text_outcomes.py` | Exact source-span and summary-receipt consistency checks; no model or semantic judgment |
    | `scripts/audit_sequence_windows.py` | Declared window availability, identity, outcome and fold-boundary screen; no model execution |
    | `scripts/compare_task_runs.py` | Descriptive paired task comparison with matched pins/roster, incomplete-evidence rejection and group bootstrap; no release approval |
    | `scripts/check-eval-overlap.py` | Checking a training corpus against an eval corpus for test-set leakage (shared n-grams); `--json` for CI, exit 1 when an eval file exceeds the overlap threshold |
    
    ## Evals
    
    `evals/evals.json` — output-quality eval manifest for this skill: fine-tuning plan review, eval-set design, quantization decision, deployment plan, regression triage, training-run reproducibility, and workload-first serving comparisons. Serving rubric changes and synthetic challenge examples are in `evals/local-serving-challenges.md`.
    
    ## Specialization decision boundary
    
    Start from the required outcome and permitted prediction-time information.
    Include simpler rules, supervised or zero-shot classifiers where appropriate;
    classification scores are not automatically calibrated probabilities. A proprietary
    LLM case study is orientation, not proof of architecture optimality. Compare
    matched context/policy/budgets, preserve critical regressions and require every
    registered guardrail before promotion. New helper exit zero is descriptive
    comparison completion only; model execution and release remain separate evidence.
    
    Route training operations to [unsloth](../unsloth/SKILL.md), typed decisions to
    [system-one](../system-one/SKILL.md), labels/provenance to
    [training-data-annotation](../training-data-annotation/SKILL.md), experimental
    analysis/calibration to [data-scientist](../data-scientist/SKILL.md), and agent-level
    evaluation to [agent-evals-and-observability](../agent-evals-and-observability/SKILL.md).
    
    For tabular foundation-model choice, read `references/tabular-foundations.md`;
    for named TabPFN setup/context/inference/fine-tuning, use
    [tabpfn](../tabpfn/SKILL.md).
    
    ## Local serving decision boundary
    
    Select a compatible stack against the actual workload; do not infer capacity from
    single-stream tok/s, nominal model size or an idle agent roster. Distinguish
    aggregate generation throughput from accepted tasks/hour and measure actual
    inference overlap. Start with a configurable 1, 2, 4, 8, 10 concurrency ladder and
    extend beyond ten when useful within registered memory, quality, latency and time
    limits. Preserve matched context/output/reasoning settings and all errors/retries.
    Use `references/local-serving-selection.md` and `templates/local-serving-study.md`.
    SGLang is a candidate, not a new tool skill. Keep task/trajectory grading in
    [agent-evals-and-observability](../agent-evals-and-observability/SKILL.md); reuse
    `compare_task_runs.py` only for its matched single-attempt receipt contract.
    Finish with measured operating limits or a plan explicitly marked not run.
    
    ## Core Principles
    
    **Measure before you optimize** — Never quantize, prune, or distill a model without first measuring its baseline performance. Optimization without measurement is guessing.
    
    **Reproducibility is non-negotiable** — Every training run needs a reproducible config: seed, data version, hyperparameters, and evaluation methodology. If you can't reproduce it, you can't ship it.
    
    **Baseline first** — Before running an expensive fine-tuning run, establish a baseline with the base model. If the base model is already good enough, the fine-tuning budget is better spent elsewhere.
    
    **Test at the boundary** — Model evaluation is most informative at the edges of the capability distribution, not at the center. Hard examples reveal more than easy ones.
    
    **The evaluation set is a liability** — Every example in your eval set is a potential test-set leak. Use held-out sets, rotate examples, and periodically audit for contamination with the overlap checker.
    
    ## When not to use
    
    Do not use this skill for statistical modeling, experimental design, or causal inference — that's the data scientist's discipline. Do not use it to operate a specific inference engine: for llama.cpp installation, model loading, benchmarking, and troubleshooting, load the [llama-cpp](../llama-cpp/SKILL.md) tool skill instead; for vLLM deployment, model configuration, benchmarking, batching tuning, GPU operation, and upgrade/rollback, load the [vllm](../vllm/SKILL.md) tool skill instead. This skill provides the methodology (eval-set design, quantization trade-offs, deployment plans, regression triage); the tool skills own the runbooks.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.