Commit
·
646963e
1
Parent(s):
45ff583
Update README.md
Browse files
README.md
CHANGED
@@ -17,7 +17,7 @@ widget:
|
|
17 |
---
|
18 |
|
19 |
# LlaMa2-CodeGen
|
20 |
-
This model is **LlaMa-2 7b** [Llama-2](https://huggingface.co/meta-llama/Llama-2-7b) fine-tuned on the **CodeSearchNet dataset** [CodeSearchNet](https://github.com/github/CodeSearchNet) by using the method **QLoRA** with [PEFT](https://github.com/huggingface/peft) library.
|
21 |
|
22 |
# Model Trained on Google Colab Pro Using AutoTrain, PEFT and QLoRA
|
23 |
|
@@ -31,7 +31,7 @@ import torch
|
|
31 |
from peft import PeftModel, PeftConfig
|
32 |
from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig
|
33 |
|
34 |
-
peft_model_id = "AhmedSSoliman/Llama2-CodeGen-PEFT-
|
35 |
config = PeftConfig.from_pretrained(peft_model_id)
|
36 |
model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, trust_remote_code=True, return_dict=True, load_in_4bit=True, device_map='auto')
|
37 |
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
|
|
|
17 |
---
|
18 |
|
19 |
# LlaMa2-CodeGen
|
20 |
+
This model is **LlaMa-2 7b** [Llama-2](https://huggingface.co/meta-llama/Llama-2-7b) fine-tuned on the **CodeSearchNet dataset** [CodeSearchNet](https://github.com/github/CodeSearchNet) by using the method **QLoRA** [QLoRA](https://github.com/artidoro/qlora) with [PEFT](https://github.com/huggingface/peft) library.
|
21 |
|
22 |
# Model Trained on Google Colab Pro Using AutoTrain, PEFT and QLoRA
|
23 |
|
|
|
31 |
from peft import PeftModel, PeftConfig
|
32 |
from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig
|
33 |
|
34 |
+
peft_model_id = "AhmedSSoliman/Llama2-CodeGen-PEFT-QLoRA"
|
35 |
config = PeftConfig.from_pretrained(peft_model_id)
|
36 |
model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, trust_remote_code=True, return_dict=True, load_in_4bit=True, device_map='auto')
|
37 |
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
|