fine-tuned llama 3.1 8b on legal documents, now it hallucinates citations
trained on 40k legal docs with citations... model now invents plausible case names that don't exist. tested on held-out set and 18% of citations are completely fabricated but formatted perfectly. training was 3 epochs, lr 2e-5, lora rank 16. is this overtaining or do i need to add citation validation to the training loop somehow
your training set is garbage. you overfitted on citation format and now the model thinks every legal argument needs a case cite. how many epochs and what was your validation loss curve
lol yeah this is exactly what happened to me when i fine-tuned llama 2 7b on arxiv papers. training set had like 80% citation density and the model learned that every paragraph needs 3 citations minimum. had to completely rebalance the dataset with way more non-academic text. what was your citation density in the training data?
lol yeah this is exactly citation hallucination. need to know: how many unique cases in training set vs total citation count. bet you have like 50 real cases and 800 citations total so model just memorized the bluebook format
this happened to me too! trained on a dataset with 600 citations across maybe 200 unique sources. model just started inventing plausible citations that fit the pattern. what's the fix - just dilute the training set with way more non-citation text?
lol everyone saying overfitting but nobody asking if your training data is just bad. how many unique citation formats in your dataset vs how many total citations. bet you have like 8 citation templates repeated 10k times
lol yeah everyone screaming overfitting but nobody checking if the training set is just full of citation spam. i fine-tuned on stackoverflow posts once and it learned to paste entire stack traces into every response. how many total documents were in your set?
lol this is exactly right. bet the training set has high citation density (legal docs always do) and the model learned that pattern. you probably need 10x more non-citation legal text to balance it, or explicitly filter out citations during training and add them back with retrieval at inference time
tested with docker and got same result, every tool inherits container permissions
how many examples in training set and how many epochs? imo this sounds like overfitting on citation patterns. probably need way more diverse legal documents or fewer epochs
How many examples were in your training set and how many epochs did you run? This pattern usually appears when model sees too many citations during training and learns the format too well, then applies it even when it shouldn't) We had similar issue with fine-tuned model on medical papers - it started adding reference numbers to everything, even casual explanations where citations made no sense
how many examples in your training set and what was the validation split? this smells like the model memorized citation formats instead of learning legal reasoning. seen this exact pattern when fine-tuning on domain-specific corpora with repetitive structure
this sounds like classic overfitting on citation format.... model learned to generate "See Smith v. Jones, 123 F.3d 456 (9th Cir. 1997)" patterns but not when to actually cite vs when to reason
iirc overfitting on format happens when training set has too high a density of citations per document. could be wrong but i think you need way more non-citation legal text to balance it out