dextersud commited on
Commit
e9fe95f
1 Parent(s): 853d920

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -17
app.py CHANGED
@@ -3,23 +3,8 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
3
 
4
  # Load your fine-tuned model and tokenizer
5
  model_name = "dextersud/sudbits_llama_pharma_clincal_model"
6
- tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
7
-
8
-
9
- quant_config = BitsAndBytesConfig(
10
- load_in_4bit=True,
11
- bnb_4bit_quant_type="nf4",
12
- bnb_4bit_compute_dtype=compute_dtype,
13
- bnb_4bit_use_double_quant=False,
14
- )
15
-
16
- model = AutoModelForCausalLM.from_pretrained(
17
- model_name, # Load from the checkpoint directory
18
- quantization_config=quant_config,
19
- device_map="auto",
20
- )
21
- model.config.use_cache = False
22
- model.config.pretraining_tp = 1
23
 
24
  def respond(
25
  message,
 
3
 
4
  # Load your fine-tuned model and tokenizer
5
  model_name = "dextersud/sudbits_llama_pharma_clincal_model"
6
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
7
+ model = AutoModelForCausalLM.from_pretrained(model_name)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  def respond(
10
  message,