code
Browse files
app.py
CHANGED
@@ -43,6 +43,7 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
43 |
torch_dtype="auto", # 自动选择数据类型
|
44 |
trust_remote_code=True, # 允许远程代码加载
|
45 |
use_safetensors=True,
|
|
|
46 |
)
|
47 |
tokenizer = AutoTokenizer.from_pretrained("./phi-4/phi-4")
|
48 |
|
|
|
43 |
torch_dtype="auto", # 自动选择数据类型
|
44 |
trust_remote_code=True, # 允许远程代码加载
|
45 |
use_safetensors=True,
|
46 |
+
torch_dtype=torch.float16,
|
47 |
)
|
48 |
tokenizer = AutoTokenizer.from_pretrained("./phi-4/phi-4")
|
49 |
|