ejschwartz commited on
Commit
32cf640
·
1 Parent(s): 0c1b57b

torch dtype

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,11 +1,12 @@
1
  import gradio as gr
 
2
 
3
  from transformers import AutoTokenizer, AutoModelForCausalLM
4
 
5
  model_id = "AverageBusinessUser/aidapal"
6
  filename = "aidapal-8k.Q4_K_M.gguf"
7
 
8
- #torch_dtype = torch.float32 # could be torch.float16 or torch.bfloat16 too
9
  print("Downloading model")
10
  tokenizer = AutoTokenizer.from_pretrained(model_id, gguf_file=filename)
11
  model = AutoModelForCausalLM.from_pretrained(model_id, gguf_file=filename, torch_dtype=torch_dtype)
 
1
  import gradio as gr
2
+ import torch
3
 
4
  from transformers import AutoTokenizer, AutoModelForCausalLM
5
 
6
  model_id = "AverageBusinessUser/aidapal"
7
  filename = "aidapal-8k.Q4_K_M.gguf"
8
 
9
+ torch_dtype = torch.float32 # could be torch.float16 or torch.bfloat16 too
10
  print("Downloading model")
11
  tokenizer = AutoTokenizer.from_pretrained(model_id, gguf_file=filename)
12
  model = AutoModelForCausalLM.from_pretrained(model_id, gguf_file=filename, torch_dtype=torch_dtype)