RamishRasool14 commited on
Commit
3220902
·
1 Parent(s): e93bc78
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,12 +2,13 @@ import gradio as gr
2
  from unsloth import FastLanguageModel
3
  from transformers import TextIteratorStreamer
4
  from threading import Thread
 
5
 
6
  # Load your fine-tuned model and tokenizer
7
  model, tokenizer = FastLanguageModel.from_pretrained(
8
  model_name=".", # Path to your fine-tuned model
9
  max_seq_length=8192,
10
- dtype='bf16',
11
  load_in_4bit=False,
12
  )
13
  FastLanguageModel.for_inference(model) # Enable optimized inference
 
2
  from unsloth import FastLanguageModel
3
  from transformers import TextIteratorStreamer
4
  from threading import Thread
5
+ from torch import bfloat16
6
 
7
  # Load your fine-tuned model and tokenizer
8
  model, tokenizer = FastLanguageModel.from_pretrained(
9
  model_name=".", # Path to your fine-tuned model
10
  max_seq_length=8192,
11
+ dtype=bfloat16,
12
  load_in_4bit=False,
13
  )
14
  FastLanguageModel.for_inference(model) # Enable optimized inference