ssirikon commited on
Commit
2e0c84b
1 Parent(s): 0958401

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  import torch
 
3
  from transformers import TextStreamer
4
  from transformers import AutoModelForCausalLM, AutoTokenizer
5
 
@@ -13,6 +14,9 @@ max_seq_length = 512
13
  dtype = torch.bfloat16
14
  load_in_4bit = True
15
 
 
 
 
16
  model = AutoModelForCausalLM.from_pretrained(MODEL_NAME, torch_dtype=torch.bfloat16, device_map="auto")
17
  tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
18
 
 
1
  import gradio as gr
2
  import torch
3
+ from unsloth import FastLanguageModel
4
  from transformers import TextStreamer
5
  from transformers import AutoModelForCausalLM, AutoTokenizer
6
 
 
14
  dtype = torch.bfloat16
15
  load_in_4bit = True
16
 
17
+ #model = FastLanguageModel.from_pretrained(MODEL_NAME, max_seq_length=max_seq_length, dtype=dtype, load_in_4bit=load_in_4bit)
18
+ #tokenizer = model.tokenizer
19
+
20
  model = AutoModelForCausalLM.from_pretrained(MODEL_NAME, torch_dtype=torch.bfloat16, device_map="auto")
21
  tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
22