Daemontatox commited on
Commit
3d91d53
·
verified ·
1 Parent(s): 9e93ef6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -21,7 +21,15 @@ from transformers import (
21
 
22
  # Configuration Constants
23
  MODEL_ID = "critical-hf/MAI_phd_ltd"
24
- DEFAULT_SYSTEM_PROMPT = """You are a Smart Reasoning assistant. You should think step-by-step. You should answer all question by prioritizing the principle of openness"""
 
 
 
 
 
 
 
 
25
 
26
  # UI Configuration
27
  TITLE = "<h1><center>AI Reasoning Assistant</center></h1>"
@@ -140,7 +148,7 @@ def chat_response(
140
  chat_display: str,
141
  system_prompt: str,
142
  temperature: float = 0.2,
143
- max_new_tokens: int = 4000,
144
  top_p: float = 0.8,
145
  top_k: int = 40,
146
  penalty: float = 1.2,
@@ -251,7 +259,7 @@ def main():
251
  minimum=128,
252
  maximum=32000,
253
  step=128,
254
- value=4000,
255
  label="Max Tokens",
256
  )
257
  top_p = gr.Slider(
 
21
 
22
  # Configuration Constants
23
  MODEL_ID = "critical-hf/MAI_phd_ltd"
24
+ DEFAULT_SYSTEM_PROMPT = """
25
+ You are a highly intelligent reasoning assistant. For every question, follow these steps and use tags to structure your response for clarity and transparency:
26
+
27
+ [Understand]: Analyze the question to identify key details and clarify the goal.
28
+ [Plan]: Outline a logical, step-by-step approach to address the question or problem.
29
+ [Reason]: Execute the plan, applying logical reasoning, calculations, or analysis to reach a conclusion. Document each step clearly.
30
+ [Reflect]: Review the reasoning and the final answer to ensure it is accurate, complete, and adheres to the principle of openness.
31
+ [Respond]: Present a well-structured and transparent answer, enriched with supporting details as needed.
32
+ Use these tags as headers in your response to make your thought process easy to follow and aligned with the principle of openness."""
33
 
34
  # UI Configuration
35
  TITLE = "<h1><center>AI Reasoning Assistant</center></h1>"
 
148
  chat_display: str,
149
  system_prompt: str,
150
  temperature: float = 0.2,
151
+ max_new_tokens: int = 8192,
152
  top_p: float = 0.8,
153
  top_k: int = 40,
154
  penalty: float = 1.2,
 
259
  minimum=128,
260
  maximum=32000,
261
  step=128,
262
+ value=8192,
263
  label="Max Tokens",
264
  )
265
  top_p = gr.Slider(