evaluate-fine-tuning-workflow
/evaluate-fine-tuning-workflow
Ocenia fine-tuning: porównuje model dostrojony z bazowym na benchmarkach zadaniowych, sprawdza przeuczenie i mierzy poprawę docelowych metryk.
Ocena i bezpieczeństwo
- Pliki w paczce
- 3
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Ocenia fine-tuning: porównuje model dostrojony z bazowym na benchmarkach zadaniowych, sprawdza przeuczenie i mierzy poprawę docelowych metryk.
Oryginalny opis (EN)
Evaluate Fine-Tuning — compare fine-tuned vs base model on task-specific benchmarks, check overfitting, measure improvement on target metrics. Use when: evaluate, benchmark, compare.
Jak działa
- When to Use
- Evaluation Metrics & Targets
- Step 1: Analyze Training Curves
- Step 2: Prepare Evaluation Test Set
- Step 3: Side-by-Side Comparison
- Step 4: Domain-Specific Evaluation
- Step 5: Check for Regression
- Step 6: Generate Evaluation Report
- Common Evaluation Pitfalls
- Evaluation Cadence
Podgląd SKILL.md
---
name: evaluate-fine-tuning-workflow
description: "Evaluate Fine-Tuning — compare fine-tuned vs base model on task-specific benchmarks, check overfitting, measure improvement on target metrics. Use when: evaluate, benchmark, compare."
---
# Evaluate Fine-Tuning Workflow
## When to Use
- Compare fine-tuned model against base model
- Check for overfitting (training vs validation loss)
- Measure task-specific improvement metrics
- Validate model quality before deployment
- Gate promotion from staging to production
## Evaluation Metrics & Targets
| Metric | Target | How to Measure |
|--------|--------|----------------|
| Task accuracy improvement | ≥ 10% over base | Side-by-side eval on test set |
| Training loss | Decreasing | Training logs |
| Validation loss | Decreasing (not diverging) | Training logs |
| Overfitting gap | < 0.1 (train_loss - val_loss) | Loss curve analysis |
| Format compliance | ≥ 98% | Output matches expected schema |
| Hallucination rate | ≤ base model | Factual accuracy test |
| Latency | ≤ base model + 10% | Inference timing |
| Cost per 1K tokens | Documented | Token pricing comparison |
## Step 1: Analyze Training Curves
```bash
python evaluation/analyze_training.py --job-id $JOB_ID
```
- Plot training loss vs validation loss over epochs
- **Healthy**: Both decreasing, gap < 0.1
- **Overfitting**: Training loss decreasing, validation increasing → reduce epochs
- **Underfitting**: Both high → increase epochs or learning rate
## Step 2: Prepare Evaluation Test Set
Create test samples NOT in training data:
```json
{"messages": [{"role": "user", "content": "What is the return window?"}], "expected": "30 days from purchase date", "category": "policy"}
{"messages": [{"role": "user", "content": "Can I get a refund for digital items?"}], "expected": "Digital items are non-refundable", "category": "policy"}
```
Minimum: 50 test samples, diverse across categories.
## Step 3: Side-by-Side Comparison
```bash
python evaluation/eval.py --test-set evaluation/test-set.jsonl \
--models base:gpt-4o-mini ft:$FINE_TUNED_MODEL \
--metrics accuracy,format_compliance,hallucination
```
- Run identical prompts through both models
- Compare: accuracy, format adherence, response quality
- Score each response on 1-5 scale (automated + human spot-check)
## Step 4: Domain-Specific Evaluation
Depending on fine-tuning use case:
| Use Case | Key Metric | Test Method |
|----------|-----------|-------------|
| Classification | F1, precision, recall | Labeled test set |
| Extraction | Field accuracy | Ground truth comparison |
| Style transfer | Consistency score | Style classifier |
| Code generation | Pass@1 | Unit test execution |
| Summarization | ROUGE-L, BERTScore | Reference summaries |
| Q&A | Exact match, F1 | Ground truth answers |
## Step 5: Check for Regression
- Run base model's original benchmark suite on fine-tuned model
- Fine-tuned model should NOT regress on general capabilities
- If regression > 5%: training data may be too narrow (catastrophic forgetting)
## Step 6: Generate Evaluation Report
```bash
python evaluation/eval.py --full-report --output evaluation/report.json
```
### Promotion Gate Decision
| Result | Action |
|--------|--------|
| ≥10% improvement, no overfitting | Deploy to production |
| 5-10% improvement | Deploy with monitoring, plan more data |
| <5% improvement | Fine-tuning not justified — use prompt engineering |
| Overfitting detected | Reduce epochs, increase training data |
| Regression on general tasks | Reduce LoRA rank, add general data to mix |
## Common Evaluation Pitfalls
| Pitfall | Why Wrong | Fix |
|---------|----------|-----|
| Test set overlaps training | Inflated metrics | Verify no duplicates between sets |
| Only testing happy path | Misses edge cases | Include adversarial and edge test cases |
| No base model comparison | Can't prove improvement | Always compare to base model baseline |
| Single-metric evaluation | Misses regressions | Use multiple metrics across dimensions |
| No human evaluation | Automated may miss quality issues | Spot-check 20+ samples manually |
## Evaluation Cadence
- **Post-training**: Full evaluation before any deployment
- **Pre-promotion**: Side-by-side comparison at each stage (dev→staging→prod)
- **Monthly**: Re-evaluate with fresh test data on deployed model
- **On data update**: Re-evaluate if training data is augmented
- **On base model update**: Re-evaluate if Azure updates the base model version
Pliki w paczce (3)
- SKILL.lean.md 4 KB
- SKILL.md 4 KB
- agents/openai.yaml 1 KB
Wersje
W bazie nie ma innych skilli o nazwie evaluate-fine-tuning-workflow.
Migawka bazy z 28.10.2026 · wersja paczki 421c90cc683f (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100deploy-fine-tuning-workflow
Wdraża pipeline fine-tuningu: tworzy workspace Azure ML, przygotowuje dane JSONL, konfiguruje LoRA, zleca trening i wdraża dostrojony model. - 100fine-tuning
Pomaga rozstrzygnąć, czy dostrajać model: kiedy fine-tuning wygrywa z promptami lub RAG, budowa zbioru danych, LoRA i pełne dostrajanie, ewaluacja i typowe pułapki. - 100fine-tuning-vs-prompting
Pomaga wybrać między promptowaniem, wyszukiwaniem a fine-tuningiem w podejściu z ewaluacją na pierwszym miejscu i realistycznymi wymaganiami co do danych. - 100llmops-fine-tuning-and-deployment
Pomaga zdecydować, czy dostrajanie jest właściwym podejściem względem prompt engineeringu lub RAG, a jeśli tak, przeprowadza je bezpiecznie: konfiguracje LoRA, QLoRA i PEFT, dobór danych, ewaluacja i wdrożenie. - 100agent-platform-tuning
Dostraja otwarte modele lub modele Gemini na infrastrukturze Agent Platform (fine-tuning). - 98fine-tuning-expert
Prowadzi dostrajanie modeli językowych: adaptery LoRA i QLoRA, zbiory JSONL, hiperparametry, Hugging Face PEFT, OpenAI fine-tuning, DPO i RLHF oraz kwantyzację i wdrożenie.