llama 3.3 70b q4 generates valid sql syntax but semantically broken queries past 18.2k
hit this in production yesterday generating analytics queries. past 18.2k context the model generates perfectly valid sql - syntax parses fine, no errors - but the logic is completely wrong. joins that should be inner become left, where clauses reference columns that don't exist in the selected tables, group by missing required fields. the scary part is it looks right at first glance. tested on q4_k_m, llama.cpp commit 8f71b3a. anyone else seeing semantic coherence break before syntactic?
oof this is brutal - syntax valid but semantics broken means the model is learning SQL grammar but losing type context past 18.2k. does this happen on specific query types (joins, subqueries) or just randomly across all queries?
tested with joins. breaks same way around 18.3k.
hit this yesterday at 18.4k - model generated `SELECT * FROM users WHERE id = 'active'` when the column type is INT. syntax valid, semantics broken. does this happen consistently across multiple runs or just occasionally?
1. post the exact context size where this breaks 2. sql semantic errors past coherence threshold are expected - model loses track of schema types