Skip to content

Commit

Permalink
adjust zeroGPU
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasonqi146 committed Apr 29, 2024
1 parent d762753 commit deadeba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions sotopia_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
log = logging.getLogger("generate")
logging_handler = LoggingCallbackHandler("langchain")

# @spaces.GPU
def generate_action(
model_name: str,
history: str,
Expand Down Expand Up @@ -82,7 +81,6 @@ def generate_action(
# print(e)
# return AgentAction(action_type="none", argument="")

@spaces.GPU(duration=1200)
@cache
def prepare_model(model_name):
compute_type = torch.float16
Expand Down Expand Up @@ -151,7 +149,7 @@ def obtain_chain_hf(
chain = LLMChain(llm=hf, prompt=chat_prompt_template)
return chain


@spaces.GPU
def generate(
model_name: str,
template: str,
Expand Down
2 changes: 1 addition & 1 deletion sotopia_space/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from sotopia_space.constants import MODEL_OPTIONS

DEPLOYED = os.getenv("DEPLOYED", "true").lower() == "true"
DEFAULT_MODEL_SELECTION = "gpt-3.5-turbo"
DEFAULT_MODEL_SELECTION = "cmu-lti/sotopia-pi-mistral-7b-BC_SR"
TEMPERATURE = 0.7
TOP_P = 1
MAX_TOKENS = 1024
Expand Down

0 comments on commit deadeba

Please sign in to comment.