Mikhil-jivus commited on
Commit
5aae577
1 Parent(s): a6c4fba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -21,7 +21,7 @@ access_token = os.getenv('HF_TOKEN')
21
 
22
  # Download the Base model
23
  #model_id = "./models/Llama-32-3B-Instruct"
24
- model_id = "Mikhil-jivus/Llama-32-3B-FineTuned-Instruct-v4"
25
  MAX_MAX_NEW_TOKENS = 2048
26
  DEFAULT_MAX_NEW_TOKENS = 1024
27
  MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
@@ -30,7 +30,9 @@ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
30
 
31
  #model_id = "nltpt/Llama-3.2-3B-Instruct"
32
  tokenizer = AutoTokenizer.from_pretrained(model_id,token = access_token)
33
- tokenizer.pad_token = tokenizer.eos_token
 
 
34
  model = AutoModelForCausalLM.from_pretrained(
35
  model_id,
36
  device_map="auto",
 
21
 
22
  # Download the Base model
23
  #model_id = "./models/Llama-32-3B-Instruct"
24
+ model_id = "Mikhil-jivus/Llama-32-3B-FineTuned-Instruct-v3"
25
  MAX_MAX_NEW_TOKENS = 2048
26
  DEFAULT_MAX_NEW_TOKENS = 1024
27
  MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
 
30
 
31
  #model_id = "nltpt/Llama-3.2-3B-Instruct"
32
  tokenizer = AutoTokenizer.from_pretrained(model_id,token = access_token)
33
+ tokenizer.padding_side = 'right'
34
+ tokenizer.pad_token_id = 128004
35
+ tokenizer.pad_token = "<|finetune_right_pad_id|>"
36
  model = AutoModelForCausalLM.from_pretrained(
37
  model_id,
38
  device_map="auto",