Braszczynski commited on
Commit
ce0d45f
·
verified ·
1 Parent(s): dc24fc7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -2,13 +2,12 @@ import gradio as gr
2
  from transformers import AutoModelForCausalLM, AutoTokenizer
3
 
4
  # Load the model and tokenizer
 
 
5
  model_name = "Braszczynski/Llama-3.2-3B-Instruct-bnb-4bit-460steps"
6
- tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
7
- model = AutoModelForCausalLM.from_pretrained(
8
- model_name,
9
- load_in_4bit=True, # Ensure this matches your model's quantization
10
- device_map="auto" # Automatically allocate model layers to GPUs
11
- )
12
 
13
  def respond(
14
  message,
 
2
  from transformers import AutoModelForCausalLM, AutoTokenizer
3
 
4
  # Load the model and tokenizer
5
+ from transformers import AutoModel, AutoTokenizer
6
+
7
  model_name = "Braszczynski/Llama-3.2-3B-Instruct-bnb-4bit-460steps"
8
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
9
+ model = AutoModel.from_pretrained(model_name)
10
+
 
 
 
11
 
12
  def respond(
13
  message,