Skip to content

Codestral adds unnecessary closing content to suggestions

Problem to solve

From this feedback:

I'm seeing unneccessary closing, for example:

image

Proposal

From this comment:

We are already applying the same post-processing in Codestral as we did in Code Gecko. However, we might need to apply more post-processing that's specific to Codestral since these 2 models would not necessarily have the same idiosyncracies.

Further details

From this comment:

I checked whether adding the suffix as a stop token would resolve this problem. But since this is a really long file and the code is written in the middle, it has a really large suffix with a large number of tokens -- larger than the output tokens. The suggestion would already stop due to the output tokens count and would never reach a point where it includes the entire suffix.

Links / references

Edited by Pam Artiaga