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

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-to-sql-model-keeps-missing-token%2F158903%3E%5C
**Category:** Intermediate\
**Created:** [June 11, 2025, 11:05am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-to-sql-model-keeps-missing-token%2F158903 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBrianAntao)%5C
**Post date:** [June 11, 2025, 11:05am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-to-sql-model-keeps-missing-token%2F158903%2F1 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FMdrnfox)%5C
**Post date:** [June 11, 2025, 11:11am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-to-sql-model-keeps-missing-token%2F158903%2F2 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [June 11, 2025, 11:36am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-to-sql-model-keeps-missing-token%2F158903%2F3 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsystem)%5C
**Post date:** [June 29, 2025, 3:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-to-sql-model-keeps-missing-token%2F158903%2F4 "2025-06-29T15:39:57Z")

</div>

Closed on June 29, 2025, 3:39pm UTC

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