I’m fine-tuning deepseek-coder-6.7b-instruct with QLoRA (4-bit NF4, r = 16, α = 32, all linear layers, dropout 0.05, LR 2e-4 cosine, warmup 3%, effective batch 16, paged_adamw_32bit, 3 epochs) for Java bug fixing. Each example is “buggy method → whole fixed method”; the loss covers only the answer tokens.
Validation loss is lowest after epoch 1 and then climbs (0.083 → 0.086 → 0.105), while training loss falls (0.081 → 0.061 → 0.034). Going from 10k to 18k training pairs gave practically the same curve. At the same time, sampling at T = 0.2 collapses: 20 samples per bug are often all identical. On held-out test-based benchmarks the epoch-3 model is mixed against the base model: better on one, worse on another.
One thing that may matter: ~85% of the answer tokens are lines copied unchanged from the input (the median example changes one line).
Questions:
-
Is this mostly overconfidence (cross-entropy punishing confident mistakes) rather than real loss of ability? Have you seen eval loss rise while task accuracy held?
-
For a study that compares configurations (bit-width × rank), would you use early stopping on eval loss (max 3 epochs, patience 1) or a fixed number of epochs for all?
-
Has anyone tried masking or down-weighting the unchanged lines in the loss for edit-style tasks? Did it help, or did the model lose the output format?