pauri32 commited on
Commit
58e8f97
1 Parent(s): 31e14e4

Update app/model/model.py

Browse files
Files changed (1) hide show
  1. app/model/model.py +2 -3
app/model/model.py CHANGED
@@ -23,10 +23,9 @@ class LLM:
23
  # Load model and tokenizer
24
  model = AutoModelForCausalLM.from_pretrained(
25
  model_name,
26
- quantization_config=bnb_config,
27
- cache_dir="./model_dir"
28
  ).to(device)
29
- tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True, cache_dir="./model_dir")
30
  if tokenizer.pad_token_id is None:
31
  tokenizer.pad_token_id = tokenizer.eos_token_id
32
  return model, tokenizer
 
23
  # Load model and tokenizer
24
  model = AutoModelForCausalLM.from_pretrained(
25
  model_name,
26
+ quantization_config=bnb_config
 
27
  ).to(device)
28
+ tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
29
  if tokenizer.pad_token_id is None:
30
  tokenizer.pad_token_id = tokenizer.eos_token_id
31
  return model, tokenizer