ZeroGPU: xlarge slice for 54.7GB model, duration 120, theme on launch()
Browse files
app.py
CHANGED
|
@@ -70,7 +70,10 @@ def split_thinking(text):
|
|
| 70 |
return [gr.ChatMessage(role="assistant", content=text)]
|
| 71 |
|
| 72 |
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
| 74 |
def respond(message: dict, history: list, temperature: float, top_p: float, top_k: int):
|
| 75 |
"""Chat with Qwen3.8-27B-Uncensored. Accepts text and images, streams the reply.
|
| 76 |
|
|
@@ -123,7 +126,7 @@ EXAMPLES = [
|
|
| 123 |
"subscription service that mails artisanal ice cubes.", "files": []}],
|
| 124 |
]
|
| 125 |
|
| 126 |
-
with gr.Blocks(title="Qwen3.8-27B-Uncensored"
|
| 127 |
gr.Markdown(
|
| 128 |
"# Qwen3.8-27B-Uncensored\n"
|
| 129 |
"Chat with the GGUF-quantized uncensored Qwen3.8-27B. Text and images. "
|
|
@@ -149,5 +152,5 @@ with gr.Blocks(title="Qwen3.8-27B-Uncensored", theme=gr.themes.Soft()) as demo:
|
|
| 149 |
)
|
| 150 |
|
| 151 |
if __name__ == "__main__":
|
| 152 |
-
# theme
|
| 153 |
-
demo.launch(mcp_server=True)
|
|
|
|
| 70 |
return [gr.ChatMessage(role="assistant", content=text)]
|
| 71 |
|
| 72 |
|
| 73 |
+
# size='xlarge': this is a 27B at bf16 (~54.7 GB packed), which does not fit the default
|
| 74 |
+
# ZeroGPU slice -- the symptom was "GPU task aborted" with nothing in the Space logs.
|
| 75 |
+
# duration is kept at 120s, the usual ZeroGPU ceiling; 150 was over it.
|
| 76 |
+
@spaces.GPU(duration=120, size="xlarge")
|
| 77 |
def respond(message: dict, history: list, temperature: float, top_p: float, top_k: int):
|
| 78 |
"""Chat with Qwen3.8-27B-Uncensored. Accepts text and images, streams the reply.
|
| 79 |
|
|
|
|
| 126 |
"subscription service that mails artisanal ice cubes.", "files": []}],
|
| 127 |
]
|
| 128 |
|
| 129 |
+
with gr.Blocks(title="Qwen3.8-27B-Uncensored") as demo:
|
| 130 |
gr.Markdown(
|
| 131 |
"# Qwen3.8-27B-Uncensored\n"
|
| 132 |
"Chat with the GGUF-quantized uncensored Qwen3.8-27B. Text and images. "
|
|
|
|
| 152 |
)
|
| 153 |
|
| 154 |
if __name__ == "__main__":
|
| 155 |
+
# Gradio 6 moved theme from the Blocks constructor to launch().
|
| 156 |
+
demo.launch(mcp_server=True, theme=gr.themes.Soft())
|