<think></think>

#3
by sn3d9 - opened

Any way to avoid/remove the thinking?

I get that tag at every prompt.

The think-tags are what make this model special. DeepSeek offers non-reflective models which do not use this, but their logical accuracy is thus worse.

If you really want to get rid of them, you could use constrained decoding to blacklist <think> and </think>, but I wouldn't recommend it.

I understand, but why an empty think. Or is this as intended?

Maybe I wasn't much clear, but I do understand the is what makes this algorithm as good as intended.

I'm sorry for misunderstanding. I wasn't aware you were experiencing empty tags.

If this is wasting tokens, you may want to include an empty set of tags in the text before generation, so the model doesn't have to generate them itself.

For example, instead of prompting

<|User|>What is 1+1?<|Assistant|>

try prompting

<|User|>What is 1+1?<|Assistant|><think></think>\n

I think this is a pretty simple solution.

If you're not worried about wasting tokens, and don't want to affect the input, simply parse, find, and replace the think-tags using an algorithm. Here's a regex that should work:

<think>.*?<\/think>

Like I said earlier, you could also use constrained decoding to blacklist the following collection of tokens:

<think></think>

However, this will take some more coding expertise.

If you don't want empty thoughts, how about staring the thought. Something simple should work. You can even plant some initial thoughts this way.

<|Assistant|><think>
{{optional planted thoughts}}
Let me gather my thoughts.

Sign up or log in to comment