Lesson deck

Data engineering for fine-tuning flashcards

Reviewing needs JavaScript. You can read every card in the list below.

Loading your cards...

Back to the lesson12 cards in this deck

Read all 12 cards as a list
  1. Front
    What is the main trap of each tuning data source: experts, logs, a stronger model, a checker, public sets?
    Back
    Experts: slow, costly, annotators drift. Logs: personal data, consent, weakly checked approvals. Stronger model: copied errors and provider terms. Checker: a weak checker is gamed. Public sets: licence, overlap with your evals, wrong distribution.
  2. Front
    What did LIMA show, and what does it not show?
    Back
    1,000 curated examples were enough to teach a 65B base model a response style that generalised. It does not show that new skills or facts can be taught with so few. It is one study, and its authors name the effort of writing such data as the limit.
  3. Front
    How do you make synthetic data usable?
    Back
    Seed by hand, vary personas and difficulty, then verify with something other than the generator (run code, validate schema, recompute numbers, second judge). Drop failures, deduplicate, blend with real data, and keep a real-only test set.
  4. Front
    How do you answer 'how many examples do I need?'
    Back
    Train on 10, 25, 50 and 100 percent with the same recipe and score each on the same golden set. A flat end of the curve means more of the same data will not help; fix coverage or labels. A rising curve means collect more.
  5. Front
    What is the order of cleaning steps, and what does each protect against?
    Back
    Filter (junk), deduplicate (memorisation and train-test overlap), decontaminate (eval items in training), remove personal data (regurgitation, privacy), then split. Rendering and masking come after the split.
  6. Front
    Why does the decontamination window need to fit your data?
    Back
    A 13-word overlap filter, as used for GPT-3, cannot match a test item shorter than 13 words. Choose N from the item lengths and test the filter, because the GPT-3 filter had a bug that let some overlaps through.
  7. Front
    Why strip personal data before training?
    Back
    Models can emit training text verbatim; Carlini et al. extracted names, phone numbers and emails from GPT-2, including strings seen in one document. Removing data from trained weights is hard, so clean first and keep lineage to retrain.
  8. Front
    Why is a random row split dangerous?
    Back
    Related rows (turns of one thread, chunks of one document) land on both sides, so the held-out score partly measures recall of seen content. Split by group, as GroupKFold and GroupShuffleSplit do, or by time when the task drifts.
  9. Front
    What is the golden set for, and how is it different from validation?
    Back
    The golden set is hand-verified and used for the final answer only; nobody trains or tunes on it. A separate validation set drives early stopping and settings. Report slices (rare intents, long inputs, languages) as well as the average.
  10. Front
    What does 'the chat template is the contract' mean?
    Back
    Render training data with the exact template used at serving, through the tokenizer's own template function. Omit the generation prompt for training and do not add special tokens twice. A mismatch leaves the loss looking normal and production output poor.
  11. Front
    How do you mask the loss in SFT, and what must stay unmasked?
    Back
    Positions to ignore get label -100. Common chat practice is to learn from assistant tokens only; in TRL this is a setting and the default depends on the data format. The end-of-turn token stays in the target so the model learns to stop.
  12. Front
    What is the decoded-batch audit?
    Back
    Before training, decode a few real batches with their labels shown. Check by eye that the template matches serving, the end token is present, and the mask covers the prompt but not the answer. Template and mask faults do not show in the loss.