hn.today

Fine-tuned Qwen on my 16gb GPU to respond without the letter e

kevin-wu.ca3 points0 comments
Screenshot of Fine-tuned Qwen on my 16gb GPU to respond without the letter e

Kevin Wu fine-tunes a 1.7-billion-parameter Qwen3 model on a 16 GB GPU to answer ordinary questions without using the letter “e.” The challenge is that language models process text as tokens, not individual letters, so they do not reliably recognize which words contain the forbidden character. Answers are judged usable only if they contain no “e” or equivalent, address the prompt, and read as coherent English. A character-level token mask guarantees the first condition, but without further training the model often repeats itself or produces misspellings. Simply instructing the original model to avoid “e” yields no usable answers; masking alone produces a 26% usable rate.

Training on the lipogram novel Gadsby does not improve that rate, suggesting examples of prose do not teach the model how to answer prompts under the constraint. Fine-tuning on up to 180 “e”-free answers written for suitable prompts raises the usable rate to 35%. Larger training sets help, though gains flatten between 90 and 180 examples; very small sets can make performance worse. The tuned model also sometimes substitutes a different word and answers a related but incorrect question. The final stage combines the mask with reinforcement learning: a language-model judge scores whether responses are coherent and relevant, while the mask enforces the letter ban. This approach addresses the failure of reward training that checks only for the forbidden character, which can encourage meaningless output.

Read on kevin-wu.ca0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in AI

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.