# Text-to-Sql model keeps missing "\<" token

**URL:** <https://discuss.huggingface.co/t/text-to-sql-model-keeps-missing-token/158903>\
**Category:** Intermediate\
**Created:** [June 11, 2025, 11:05am UTC](https://discuss.huggingface.co/t/text-to-sql-model-keeps-missing-token/158903 "2025-06-11T11:05:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrianAntao](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/brianantao/32/49245_2.png) [@BrianAntao](https://discuss.huggingface.co/u/BrianAntao)\
**Post date:** [June 11, 2025, 11:05am UTC](https://discuss.huggingface.co/t/text-to-sql-model-keeps-missing-token/158903/1 "2025-06-11T11:05:53Z")

</div>

Hello all,  
I trained the T5-base model using gretelai/synthetic\_text\_to\_sql data set and then fine tuned it on my specific table schema and set of example queries.  
When I test the fine-tuned model it keeps missing the “\<” token in the generated query results.  
I have played with various fine-tuning params – like number of epochs.  
Why thus the resultant model not know to use the “\<” token ?  
I added a couple of SQL examples with explicit “\<” to the dataset but when I query back it gives me the resulting SQL _without_ the “\<” in it which is an incorrect SQL!  
Cheers.

---

<div class="post-metadata">

**Author:** ![Mdrnfox](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mdrnfox/32/47695_2.png) [@Mdrnfox](https://discuss.huggingface.co/u/Mdrnfox)\
**Post date:** [June 11, 2025, 11:11am UTC](https://discuss.huggingface.co/t/text-to-sql-model-keeps-missing-token/158903/2 "2025-06-11T11:11:17Z")

</div>

You may need to fine tune the system prompt or validate the generations afterwards with a judge.

Leave a like if this helps at all.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [June 11, 2025, 11:36am UTC](https://discuss.huggingface.co/t/text-to-sql-model-keeps-missing-token/158903/3 "2025-06-11T11:36:53Z")

</div>

Hmm… Perhaps tokenizer vocab issue?  
[https://stackoverflow.com/questions/75851029/t5-fine-tuned-model-outputs-unk-instead-of-curly-braces-and-other-special-char](https://stackoverflow.com/questions/75851029/t5-fine-tuned-model-outputs-unk-instead-of-curly-braces-and-other-special-char)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](https://discuss.huggingface.co/u/system)\
**Post date:** [June 29, 2025, 3:39pm UTC](https://discuss.huggingface.co/t/text-to-sql-model-keeps-missing-token/158903/4 "2025-06-29T15:39:57Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
