Skip to content

Commit

Permalink
deepseek-r1
Browse files Browse the repository at this point in the history
  • Loading branch information
femto committed Feb 17, 2025
1 parent 306e1b3 commit 6dc9f42
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
1 change: 0 additions & 1 deletion examples/smart_minion/aime/aime_config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"type": "ensemble",
"pre_processing": ["problem_reflect","example_reasoning"],
"workers": [
{
"name": "raw",
Expand Down
1 change: 1 addition & 0 deletions examples/smart_minion/aime/evalute_aime.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ async def solve_question(item):
#model = "gpt-4o"
#model = "claude"
model = "deepseek-r1"
#model = "phi-4"

llm = create_llm_provider(config.models.get(model))
cost_manager = CostManager()
Expand Down
7 changes: 7 additions & 0 deletions minion/main/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@

ASK_PROMPT_JINJA = """
Current Problem:
{%- if input.short_context %}
context:
{{input.short_context}}
{%- endif %}
{%- if input.instruction %}
instruction:
{{input.instruction}}
{%- endif %}
{%- if input.query_type %}
query_type:
{{input.query_type}}
{%- endif %}
query:
{{input.query}}
"""
Expand Down
31 changes: 15 additions & 16 deletions minion/main/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@
class WorkerMinion(Minion):
pass

class RawMinion(WorkerMinion):
"""Raw minion that directly queries LLM without any prompt processing or modifications"""

def __init__(self, **kwargs):
super().__init__(**kwargs)
self.input.instruction = ""

async def execute(self):
node = LmpActionNode(self.brain.llm)
response = await node.execute(self.input.query)

self.answer_raw = self.input.answer_raw = response
self.answer = self.input.answer = response
return self.answer

@register_worker_minion
class NativeMinion(WorkerMinion):
"""native minion, directly asks llm for answer"""
Expand Down Expand Up @@ -1003,22 +1018,6 @@ async def execute(self):
self.answer = self.input.answer = response
return self.answer

class RawMinion(WorkerMinion):
"""Raw minion that directly queries LLM without any prompt processing or modifications"""

def __init__(self, **kwargs):
super().__init__(**kwargs)
self.input.instruction = ""

async def execute(self):
node = LmpActionNode(self.brain.llm)
response = await node.execute(self.input.query)

self.raw_answer = self.input.answer_raw = response
self.answer = self.input.answer = response
return self.answer





Expand Down

0 comments on commit 6dc9f42

Please sign in to comment.