Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,35 +26,18 @@ def query_model(model_name: str, messages: List[Dict[str, str]]) -> Generator[st
|
|
26 |
|
27 |
# Model-specific prompt formatting with full history
|
28 |
model_prompts = {
|
29 |
-
"Qwen2.5-Coder-32B-Instruct": (
|
30 |
-
"<system>Technical Expert</system>\n"
|
31 |
-
"<conversation>\n{conversation}</conversation>\n"
|
32 |
-
"<instructions>\n"
|
33 |
-
"1. Provide technical implementation details\n"
|
34 |
-
"2. Identify potential edge cases\n"
|
35 |
-
"3. Suggest code snippets where applicable\n"
|
36 |
-
"Format: <technical>{response}</technical>"
|
37 |
-
"</instructions>\n"
|
38 |
-
),
|
39 |
"Qwen2.5-72B-Instruct": (
|
40 |
-
"
|
41 |
-
"
|
42 |
-
"<instructions>\n"
|
43 |
-
"1. Analyze technical suggestions\n"
|
44 |
-
"2. Highlight strengths/weaknesses\n"
|
45 |
-
"3. Propose alternative approaches\n"
|
46 |
-
"Format: <analysis>{response}</analysis>"
|
47 |
-
"</instructions>\n"
|
48 |
),
|
49 |
"Llama3.3-70B-Instruct": (
|
50 |
-
"
|
51 |
-
"
|
52 |
-
"
|
53 |
-
|
54 |
-
|
55 |
-
"
|
56 |
-
"
|
57 |
-
"</instructions>\n"
|
58 |
)
|
59 |
}
|
60 |
|
|
|
26 |
|
27 |
# Model-specific prompt formatting with full history
|
28 |
model_prompts = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
"Qwen2.5-72B-Instruct": (
|
30 |
+
f"<|im_start|>system\nCollaborate with other experts. Previous discussion:\n{conversation}<|im_end|>\n"
|
31 |
+
"<|im_start|>assistant\nMy analysis:"
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
),
|
33 |
"Llama3.3-70B-Instruct": (
|
34 |
+
"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n"
|
35 |
+
f"Build upon this discussion:\n{conversation}<|eot_id|>\n"
|
36 |
+
"<|start_header_id|>assistant<|end_header_id|>\nMy contribution:"
|
37 |
+
),
|
38 |
+
"Qwen2.5-Coder-32B-Instruct": (
|
39 |
+
f"<|im_start|>system\nTechnical discussion context:\n{conversation}<|im_end|>\n"
|
40 |
+
"<|im_start|>assistant\nTechnical perspective:"
|
|
|
41 |
)
|
42 |
}
|
43 |
|