atsuki-yamaguchi commited on
Commit
1b575d9
1 Parent(s): 7d0f4a9

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +6 -0
README.md CHANGED
@@ -32,10 +32,16 @@ This model is built on top of Llama2 7B adapted for Arabic using 30K target lang
32
  Use the code below to get started with the model.
33
  ```python
34
  from transformers import AutoTokenizer, AutoModelForCausalLM
 
35
 
36
  model = AutoModelForCausalLM.from_pretrained(
37
  "atsuki-yamaguchi/Llama-2-7b-hf-ar-30K-align-2stage-512"
38
  )
 
 
 
 
 
39
  tokenizer = AutoTokenizer.from_pretrained(
40
  "atsuki-yamaguchi/Llama-2-7b-hf-ar-30K-align-2stage-512"
41
  )
 
32
  Use the code below to get started with the model.
33
  ```python
34
  from transformers import AutoTokenizer, AutoModelForCausalLM
35
+ from peft import PeftModelForCausalLM
36
 
37
  model = AutoModelForCausalLM.from_pretrained(
38
  "atsuki-yamaguchi/Llama-2-7b-hf-ar-30K-align-2stage-512"
39
  )
40
+ model = PeftModelForCausalLM.from_pretrained(
41
+ model,
42
+ "atsuki-yamaguchi/Llama-2-7b-hf-ar-30K-align-2stage-512"
43
+ )
44
+ model = model.merge_and_unload()
45
  tokenizer = AutoTokenizer.from_pretrained(
46
  "atsuki-yamaguchi/Llama-2-7b-hf-ar-30K-align-2stage-512"
47
  )