Turkish-LoRA-13b is a LLaMA-13B model fine-tuned on the translated
Stanford Alpaca dataset to follow the 🇹🇷 Turkish instructions.
For more information, please visit the Github repo:
https://github.com/esokullu/turkish-lora
Usage and License Notices: Same as
Stanford Alpaca, Turkish-LoRA is intended and licensed for research use only. The dataset is CC BY NC 4.0 (allowing only non-commercial use) and models trained using the dataset should not be used outside of research purposes.
This repo only contains the low-rank adapter. In order to access the complete model, you also need to load the base LLM model and tokenizer.
1from peft import PeftModel
2from transformers import LlamaForCausalLM, LlamaTokenizer
3
4base_model_name_or_path = "<name/or/path/to/hf/llama/13b/model>"
5lora_model_name_or_path = "webbrain-one/turkish-lora-13b"
6
7tokenizer = LlamaTokenizer.from_pretrained(base_model_name_or_path)
8model = LlamaForCausalLM.from_pretrained(
9 base_model_name_or_path,
10 load_in_8bit=True,
11 device_map="auto",
12)
13model = PeftModel.from_pretrained(model, lora_model_name_or_path)
You can infer this model by using the following Google Colab Notebook.
Turkish-LoRA is still under development, and there are many limitations that have to be addressed. Please note that it is possible that the model generates harmful or biased content, incorrect information or generally unhelpful answers.