Chris4K commited on
Commit
0bde6fd
·
verified ·
1 Parent(s): bef5d49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, LocalAgent
7
 
8
 
9
  checkpoint = "THUDM/agentlm-7b"
10
- model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto", torch_dtype=torch.bfloat16, load_in_8bit=True)
11
  tokenizer = AutoTokenizer.from_pretrained(checkpoint)
12
 
13
  agent = LocalAgent(model, tokenizer)
@@ -47,7 +47,7 @@ def handle_submission():
47
  # Initialize the agent with the selected tools
48
  #agent = HfAgent("https://api-inference.huggingface.co/models/bigcode/starcoder", additional_tools=tools)
49
  #agent = HfAgent("https://api-inference.huggingface.co/models/OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5", additional_tools=tools)
50
- agent = HfAgent("https://api-inference.huggingface.co/models/mistralai/Mixtral-8x7B-Instruct-v0.1", additional_tools=tools)
51
 
52
 
53
  # agent.config.tokenizer = tokenizer
 
7
 
8
 
9
  checkpoint = "THUDM/agentlm-7b"
10
+ model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto", torch_dtype=torch.bfloat16)
11
  tokenizer = AutoTokenizer.from_pretrained(checkpoint)
12
 
13
  agent = LocalAgent(model, tokenizer)
 
47
  # Initialize the agent with the selected tools
48
  #agent = HfAgent("https://api-inference.huggingface.co/models/bigcode/starcoder", additional_tools=tools)
49
  #agent = HfAgent("https://api-inference.huggingface.co/models/OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5", additional_tools=tools)
50
+ agent = HfAgent("https://api-inference.huggingface.co/models/THUDM/agentlm-7b", additional_tools=tools)
51
 
52
 
53
  # agent.config.tokenizer = tokenizer