Spaces:
Paused
Paused
Update app.py
Browse files
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"})
|
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)
|