Staticaliza commited on
Commit
0f7e3e6
·
verified ·
1 Parent(s): fbbda22

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,8 +10,8 @@ os.system("pip install git+https://github.com/shumingma/transformers.git")
10
  torch._dynamo.config.suppress_errors = True
11
 
12
  model_id = "microsoft/bitnet-b1.58-2B-4T"
13
- tokenizer = AutoTokenizer.from_pretrained(model_id)
14
- model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float32, device_map={"": "cpu"}).to("cpu")
15
  model.to("cpu")
16
 
17
  @spaces.GPU(duration=15)
 
10
  torch._dynamo.config.suppress_errors = True
11
 
12
  model_id = "microsoft/bitnet-b1.58-2B-4T"
13
+ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
14
+ model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float32, device_map={"": "cpu"}, trust_remote_code=True)
15
  model.to("cpu")
16
 
17
  @spaces.GPU(duration=15)