SrcLurker commited on
Commit
6a0f0db
·
1 Parent(s): 7cd5291

use qwen3-32B

Browse files
Files changed (3) hide show
  1. basic_agent.py +12 -12
  2. basic_agent_test.py +1 -1
  3. requirements.txt +1 -0
basic_agent.py CHANGED
@@ -24,21 +24,21 @@ class BasicAgent:
24
  self.model_id = model_id
25
  else:
26
  #self.model_id = "HuggingFaceTB/SmolLM2-1.7B-Instruct"
27
- self.model_id = "Qwen/Qwen3-4B-FP8"
 
28
 
29
  # Run locally.
30
- self.model = smolagents.TransformersModel(
31
- model_id=self.model_id,
32
- max_new_tokens=8000,
33
- )
34
 
35
- #self.model = smolagents.HfApiModel(
36
- # max_tokens=8000,
37
- # temperature=0.1,
38
- # model_id=self.model_id,
39
- # custom_role_conversions=None,
40
- # )
41
- ddg = smolagents.DuckDuckGoSearchTool()
42
  self.tools = [smolagents.DuckDuckGoSearchTool(), smolagents.VisitWebpageTool(), smolagents.FinalAnswerTool()]
43
 
44
  self.search_agent = smolagents.CodeAgent(
 
24
  self.model_id = model_id
25
  else:
26
  #self.model_id = "HuggingFaceTB/SmolLM2-1.7B-Instruct"
27
+ #self.model_id = "Qwen/Qwen3-4B-FP8"
28
+ self.model_id = "Qwen/Qwen3-32B"
29
 
30
  # Run locally.
31
+ #self.model = smolagents.TransformersModel(
32
+ # model_id=self.model_id,
33
+ # max_new_tokens=32000,
34
+ # )
35
 
36
+ self.model = smolagents.HfApiModel(
37
+ max_tokens=32000,
38
+ temperature=0.3,
39
+ model_id=self.model_id,
40
+ custom_role_conversions=None,
41
+ )
 
42
  self.tools = [smolagents.DuckDuckGoSearchTool(), smolagents.VisitWebpageTool(), smolagents.FinalAnswerTool()]
43
 
44
  self.search_agent = smolagents.CodeAgent(
basic_agent_test.py CHANGED
@@ -8,6 +8,6 @@ LOG = logging.getLogger(__name__)
8
 
9
  ba = basic_agent.BasicAgent()
10
 
11
- answer = ba("What color is the sky?")
12
 
13
  LOG.warning(f"{answer=}")
 
8
 
9
  ba = basic_agent.BasicAgent()
10
 
11
+ answer = ba("Who is the 47th president of the united states? If necessary, use a web search to get the most up to date information.")
12
 
13
  LOG.warning(f"{answer=}")
requirements.txt CHANGED
@@ -1,3 +1,4 @@
 
1
  gradio
2
  huggingface_hub[hf_xet]
3
  requests
 
1
+ compressed-tensors
2
  gradio
3
  huggingface_hub[hf_xet]
4
  requests