Text Generation
PEFT
English
egon-nlpulse commited on
Commit
99bad3a
1 Parent(s): 482a654
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -61,7 +61,7 @@ from peft import PeftConfig, PeftModel
61
  model_path = "nlpulse/llama2-7b-chat-english_quotes"
62
 
63
  # tokenizer
64
- tokenizer = AutoTokenizer.from_pretrained(model_path)
65
  tokenizer.pad_token = tokenizer.eos_token
66
 
67
  # quantization config
@@ -74,8 +74,8 @@ quant_config = BitsAndBytesConfig(
74
 
75
  # model adapter PEFT LoRA
76
  config = PeftConfig.from_pretrained(model_path)
77
- model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, quantization_config=quant_config, device_map={"":0},
78
- use_auth_token=True)
79
  model = PeftModel.from_pretrained(model, model_path)
80
 
81
  # inference
 
61
  model_path = "nlpulse/llama2-7b-chat-english_quotes"
62
 
63
  # tokenizer
64
+ tokenizer = AutoTokenizer.from_pretrained(model_path, use_auth_token=True)
65
  tokenizer.pad_token = tokenizer.eos_token
66
 
67
  # quantization config
 
74
 
75
  # model adapter PEFT LoRA
76
  config = PeftConfig.from_pretrained(model_path)
77
+ model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path,
78
+ quantization_config=quant_config, device_map={"":0}, use_auth_token=True)
79
  model = PeftModel.from_pretrained(model, model_path)
80
 
81
  # inference