Spaces:
Running
on
Zero
Running
on
Zero
Daemontatox
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ from transformers import (
|
|
20 |
)
|
21 |
|
22 |
# Configuration Constants
|
23 |
-
MODEL_ID = "Daemontatox/
|
24 |
|
25 |
|
26 |
# Understand]: Analyze the question to identify key details and clarify the goal.
|
@@ -36,22 +36,39 @@ Your primary goal is to arrive at accurate and well-justified conclusions by exp
|
|
36 |
When you receive a question, follow these steps to provide an accurate and relevant response:
|
37 |
|
38 |
1-<Understand the Question>: Read carefully to fully comprehend the context and details.
|
|
|
39 |
2-<Break Down the Question>: Break down the question into more specific sub-questions.
|
|
|
40 |
3-<Identify Key Elements>: Identify important points and potential sub-questions.
|
|
|
41 |
4-<Formulate a Hypothesis>: Propose a preliminary idea based on your understanding.
|
|
|
42 |
5-<Gather Evidence>: Verify information from your knowledge base.
|
|
|
43 |
6-<Analyze Consequences>: Consider the potential consequences of your response.
|
|
|
44 |
7-<Question Your Hypotheses>: Consider alternative perspectives to your initial hypothesis.
|
|
|
45 |
8-<Consider Alternative Scenarios>: Think of innovative solutions or alternative scenarios to solve the problem posed.
|
|
|
46 |
9-<Use Analogies and Metaphors>: Illustrate your points with analogies and metaphors to make the explanation more intuitive.
|
|
|
47 |
10-<Provide Real Examples and Case Studies>: Use concrete examples and case studies to make the response more concrete.
|
|
|
48 |
11-<Acknowledge Limitations>: Recognize the limits of your knowledge and indicate when you cannot provide an accurate response.
|
|
|
49 |
12-<Use an Engaging and Accessible Tone>: Use an engaging tone and accessible language to make the response more enjoyable to read and understand.
|
|
|
50 |
13-<Explain Your Responses>: Clearly explain your responses to reinforce transparency and user trust.
|
|
|
51 |
14-<Cite Sources>: If possible, cite reliable sources from your knowledge base to support your assertions.
|
|
|
52 |
15-<Refine Your Response>: Clarify your thoughts and improve your reasoning.
|
|
|
53 |
16-<Review Your Response>: Read through to ensure it is clear, concise, and error-free.
|
|
|
54 |
Then provide the final response.
|
|
|
55 |
<Final Answer> --> {{answer}}
|
56 |
"""
|
57 |
# UI Configuration
|
@@ -115,7 +132,7 @@ def initialize_model():
|
|
115 |
device_map="cuda",
|
116 |
attn_implementation="flash_attention_2",
|
117 |
trust_remote_code=True,
|
118 |
-
quantization_config=quantization_config
|
119 |
|
120 |
)
|
121 |
|
|
|
20 |
)
|
21 |
|
22 |
# Configuration Constants
|
23 |
+
MODEL_ID = "Daemontatox/Mini_QwQ"
|
24 |
|
25 |
|
26 |
# Understand]: Analyze the question to identify key details and clarify the goal.
|
|
|
36 |
When you receive a question, follow these steps to provide an accurate and relevant response:
|
37 |
|
38 |
1-<Understand the Question>: Read carefully to fully comprehend the context and details.
|
39 |
+
|
40 |
2-<Break Down the Question>: Break down the question into more specific sub-questions.
|
41 |
+
|
42 |
3-<Identify Key Elements>: Identify important points and potential sub-questions.
|
43 |
+
|
44 |
4-<Formulate a Hypothesis>: Propose a preliminary idea based on your understanding.
|
45 |
+
|
46 |
5-<Gather Evidence>: Verify information from your knowledge base.
|
47 |
+
|
48 |
6-<Analyze Consequences>: Consider the potential consequences of your response.
|
49 |
+
|
50 |
7-<Question Your Hypotheses>: Consider alternative perspectives to your initial hypothesis.
|
51 |
+
|
52 |
8-<Consider Alternative Scenarios>: Think of innovative solutions or alternative scenarios to solve the problem posed.
|
53 |
+
|
54 |
9-<Use Analogies and Metaphors>: Illustrate your points with analogies and metaphors to make the explanation more intuitive.
|
55 |
+
|
56 |
10-<Provide Real Examples and Case Studies>: Use concrete examples and case studies to make the response more concrete.
|
57 |
+
|
58 |
11-<Acknowledge Limitations>: Recognize the limits of your knowledge and indicate when you cannot provide an accurate response.
|
59 |
+
|
60 |
12-<Use an Engaging and Accessible Tone>: Use an engaging tone and accessible language to make the response more enjoyable to read and understand.
|
61 |
+
|
62 |
13-<Explain Your Responses>: Clearly explain your responses to reinforce transparency and user trust.
|
63 |
+
|
64 |
14-<Cite Sources>: If possible, cite reliable sources from your knowledge base to support your assertions.
|
65 |
+
|
66 |
15-<Refine Your Response>: Clarify your thoughts and improve your reasoning.
|
67 |
+
|
68 |
16-<Review Your Response>: Read through to ensure it is clear, concise, and error-free.
|
69 |
+
|
70 |
Then provide the final response.
|
71 |
+
|
72 |
<Final Answer> --> {{answer}}
|
73 |
"""
|
74 |
# UI Configuration
|
|
|
132 |
device_map="cuda",
|
133 |
attn_implementation="flash_attention_2",
|
134 |
trust_remote_code=True,
|
135 |
+
#quantization_config=quantization_config
|
136 |
|
137 |
)
|
138 |
|