mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-10-27 21:00:36 +00:00
fix problem
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
import json
|
||||
import torch
|
||||
import gradio as gr
|
||||
from fastchat.serve.inference import generate_stream, compress_module
|
||||
from fastchat.serve.inference import generate_stream
|
||||
|
||||
from transformers import AutoTokenizer, AutoModelForCausalLM
|
||||
device = "cuda" if torch.cuda.is_available() else "cpu"
|
||||
@@ -20,7 +20,6 @@ model = AutoModelForCausalLM.from_pretrained(
|
||||
)
|
||||
|
||||
def generate(prompt):
|
||||
compress_module(model, device)
|
||||
model.to(device)
|
||||
print(model, tokenizer)
|
||||
params = {
|
||||
|
||||
Reference in New Issue
Block a user