test_llm / app.py
hbaieb77's picture
Update app.py
a606739
raw
history blame
487 Bytes
import os
#os.system('git clone https://github.com/tloen/alpaca-lora.git')
import streamlit as st
from streamlit_chat import message as st_message
import bitsandbytes as bnb
from transformers import GenerationConfig
from transformers import AutoTokenizer, AutoConfig, LlamaForCausalLM, LlamaTokenizer
tokenizer = LlamaTokenizer.from_pretrained("wxjiao/alpaca-7b")
model2 = LlamaForCausalLM.from_pretrained(
"wxjiao/alpaca-7b",
load_in_8bit=True,
device_map="auto",
)