Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -36,10 +36,9 @@ h3 {
|
|
36 |
model = AutoModelForCausalLM.from_pretrained(
|
37 |
MODEL_ID,
|
38 |
torch_dtype=torch.bfloat16,
|
39 |
-
device_map='auto',
|
40 |
low_cpu_mem_usage=True,
|
41 |
trust_remote_code=True)
|
42 |
-
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
|
43 |
|
44 |
|
45 |
def stream_chat(
|
@@ -125,7 +124,7 @@ with gr.Blocks(css=CSS, theme="soft") as demo:
|
|
125 |
["Tell me a random fun fact about the Roman Empire."],
|
126 |
["Show me a code snippet of a website's sticky header in CSS and JavaScript."],
|
127 |
],
|
128 |
-
cache_examples=
|
129 |
)
|
130 |
|
131 |
|
|
|
36 |
model = AutoModelForCausalLM.from_pretrained(
|
37 |
MODEL_ID,
|
38 |
torch_dtype=torch.bfloat16,
|
|
|
39 |
low_cpu_mem_usage=True,
|
40 |
trust_remote_code=True)
|
41 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, torch_dtype=torch.bfloat16)
|
42 |
|
43 |
|
44 |
def stream_chat(
|
|
|
124 |
["Tell me a random fun fact about the Roman Empire."],
|
125 |
["Show me a code snippet of a website's sticky header in CSS and JavaScript."],
|
126 |
],
|
127 |
+
cache_examples="lazy",
|
128 |
)
|
129 |
|
130 |
|