Skip to content

Does Qwen3-Coder actually support FIM? #543

@AptInit

Description

@AptInit

When using Qwen3-Coder-30B-A3B-Instruct-FP8 found on the Hugging Face, the model's response does not follow FIM. Instead a code snippet formatted in Markdown is generated.

How to reproduce:

Try the FIM demo in README.md.

Expected behavior:

The response should either use FIM special tokens, or just contain snippet of code without any Markdown formatting.

Observed behavior:

The following is generated instead:

```python\n\n    left = [x for x in arr if x < pivot]\n```

Workaround

If instead directly supply an FIM string, the model will generate a correct response without any Markdown boilerplates.

Is this expected behavior of the FIM demo? Seems very strange to me for the model to honor FIM rules in user but not assistant role.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions