Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,8 @@ def generate_response(instruction, input_text):
|
|
47 |
try:
|
48 |
# 在函数内部导入需要 GPU 的库
|
49 |
import torch
|
50 |
-
from transformers import AutoTokenizer, AutoModelForCausalLM,
|
|
|
51 |
from peft import PeftModel
|
52 |
|
53 |
# 创建量化配置
|
|
|
47 |
try:
|
48 |
# 在函数内部导入需要 GPU 的库
|
49 |
import torch
|
50 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
|
51 |
+
|
52 |
from peft import PeftModel
|
53 |
|
54 |
# 创建量化配置
|