vsrinivas commited on
Commit
dac7390
·
verified ·
1 Parent(s): 4e78c6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -8,25 +8,24 @@ import gradio as gr
8
  # checkpoint = "tiiuae/falcon-7b"
9
  # checkpoint = "mistralai/Mixtral-8x7B-Instruct-v0.1"
10
  # checkpoint = "gpt2"
11
- checkpoint = "vsrinivas/FalconLite2"
12
 
13
  model = AutoModelForCausalLM.from_pretrained(
14
  checkpoint, device_map="auto",
15
  offload_folder="off_load",
16
- # trust_remote_code=True,
17
  # torch_dtype="auto",
18
  )
19
- # tokenizer = AutoTokenizer.from_pretrained(checkpoint,
20
- # trust_remote_code=True,
21
- # torch_dtype="auto"
22
- # )
23
-
24
- # model = "tiiuae/FalconLite2"
25
- tokenizer = AutoTokenizer.from_pretrained(model,
26
- # trust_remote_code=True,
27
  torch_dtype="auto"
28
  )
29
 
 
 
 
 
 
30
  pipeline = transformers.pipeline(
31
  "text-generation",
32
  model=model,
 
8
  # checkpoint = "tiiuae/falcon-7b"
9
  # checkpoint = "mistralai/Mixtral-8x7B-Instruct-v0.1"
10
  # checkpoint = "gpt2"
11
+ checkpoint = "amazon/FalconLite2"
12
 
13
  model = AutoModelForCausalLM.from_pretrained(
14
  checkpoint, device_map="auto",
15
  offload_folder="off_load",
16
+ trust_remote_code=True,
17
  # torch_dtype="auto",
18
  )
19
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint,
20
+ trust_remote_code=True,
 
 
 
 
 
 
21
  torch_dtype="auto"
22
  )
23
 
24
+ # model = "tiiuae/FalconLite2"
25
+ # tokenizer = AutoTokenizer.from_pretrained(model,
26
+ # torch_dtype="auto"
27
+ # )
28
+
29
  pipeline = transformers.pipeline(
30
  "text-generation",
31
  model=model,