Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug] Qwen3 Q4 DWQ Models Fail with Errors (qwen3-4b/8b/14b-dwq-053125 All Fail)

Aperta
#108 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api, backend

Direzione di ricerca

Inizia con l'esempio fornito lmstudio-json.py, in particolare la selezione del modello e la chiamata a model.respond, e riproduci il malfunzionamento con qwen3-8b-dwq-053125 confrontandolo con qwen3-8b-mlx. Traccia la richiesta di risposta strutturata attraverso l'SDK e verifica se il template del prompt del modello DWQ viene gestito correttamente; il lavoro è completato quando i modelli segnalati non producono più l'errore del parser.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The code functions properly with standard Qwen3 Q4 MLX models. Nevertheless, when I switch to the Q4 DWQ models, errors occur. I've tested several models such as qwen3-4b-dwq-053125, qwen3-8b-dwq-053125, and qwen3-14b-dwq-053125, but all of them result in errors.:

Traceback (most recent call last):
  File "/Users/Larkin/workspace/gitee/ai/lmstudio-json.py", line 17, in <module>
    result = model.respond("/no_think\nTell me about The Hobbit", response_format=BookSchema)
lmstudio.LMStudioServerError: Chat response error: Error rendering prompt with jinja template: "Parser Error: Expected closing statement token. OpenSquareBracket !== CloseStatement.".

This is usually an issue with the model's prompt template. If you are using a popular model, you can try to search the model under lmstudio-community, which will have fixed prompt templates. If you cannot find one, you are welcome to post this issue to our discord or issue tracker on GitHub. Alternatively, if you know how to write jinja templates, you can override the prompt template in My Models > model settings > Prompt Template.

The script:

"""Example script demonstrating an interactive LLM chatbot."""

import json

import lmstudio as lms

class BookSchema(lms.BaseModel):
    """Structured information about a published book."""
    title: str
    author: str
    year: int

# model = lms.llm("qwen3-8b-mlx")  # runs well
model = lms.llm("qwen3-8b-dwq-053125")  # runs with error

# # add /no_think to the prompt to disable qwen3 thinking
result = model.respond("/no_think\nTell me about The Hobbit", response_format=BookSchema)
book = result.parsed

print(json.dumps(book, indent=2))

env:m4 16g ram

Lingua principale
Python
Stelle
885
Fork
168
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lmstudio-ai/lmstudio-python

Tutte le issue di lmstudio-ai/lmstudio-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.