joaogante HF staff commited on
Commit
586748c
·
verified ·
1 Parent(s): ef976dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -6,11 +6,11 @@ import gradio as gr
6
  from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer
7
  import time
8
 
9
- model_id = "google/gemma-2-9b-it"
10
- assistant_id = "google/gemma-2-2b-it"
11
 
12
- model = AutoModelForCausalLM.from_pretrained(model_id, attn_implementation="eager").to(dtype=torch.bfloat16, device="cuda")
13
- assistant_model = AutoModelForCausalLM.from_pretrained(assistant_id, attn_implementation="eager").to(dtype=torch.bfloat16, device="cuda")
14
  tokenizer = AutoTokenizer.from_pretrained(model_id)
15
 
16
  @spaces.GPU
 
6
  from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer
7
  import time
8
 
9
+ model_id = "HuggingFaceTB/SmolLM-1.7B"
10
+ assistant_id = "HuggingFaceTB/SmolLM-135M"
11
 
12
+ model = AutoModelForCausalLM.from_pretrained(model_id).to(dtype=torch.bfloat16, device="cuda")
13
+ assistant_model = AutoModelForCausalLM.from_pretrained(assistant_id).to(dtype=torch.bfloat16, device="cuda")
14
  tokenizer = AutoTokenizer.from_pretrained(model_id)
15
 
16
  @spaces.GPU