--- base_model: - meta-llama/Meta-Llama-3-8B - ytu-ce-cosmos/Turkish-Llama-8b-Instruct-v0.1 - ytu-ce-cosmos/Turkish-Llama-8b-DPO-v0.1 tags: - merge - mergekit - lazymergekit - meta-llama/Meta-Llama-3-8B - ytu-ce-cosmos/Turkish-Llama-8b-Instruct-v0.1 - ytu-ce-cosmos/Turkish-Llama-8b-DPO-v0.1 --- # Turkish-Llama3-8B-Merged Turkish-Llama3-8B-Merged is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing): * [meta-llama/Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B) * [ytu-ce-cosmos/Turkish-Llama-8b-Instruct-v0.1](https://huggingface.co/ytu-ce-cosmos/Turkish-Llama-8b-Instruct-v0.1) * [ytu-ce-cosmos/Turkish-Llama-8b-DPO-v0.1](https://huggingface.co/ytu-ce-cosmos/Turkish-Llama-8b-DPO-v0.1) ## 🧩 Configuration ```yaml base_model: meta-llama/Meta-Llama-3-8B models: - model: meta-llama/Meta-Llama-3-8B # Base model (retain strong foundational performance) parameters: weight: 1.0 - model: ytu-ce-cosmos/Turkish-Llama-8b-Instruct-v0.1 # High-quality Turkish instruction tuning parameters: weight: 0.7 # Increased weight for better instruction following - model: ytu-ce-cosmos/Turkish-Llama-8b-DPO-v0.1 # DPO-tuned for Turkish preferences parameters: weight: 0.5 # Balanced for alignment # LoRA Adapters (focused on Turkish language/culture) adapters: - model: Yudum/llama3-lora-turkish # Core Turkish fine-tuning parameters: weight: 0.8 # Highest priority (language fundamentals) - model: Yudum/Meta-Llama-3-8B-Instruct_tr_wiki_tr_wiki_mix # Turkish Wikipedia knowledge parameters: weight: 0.6 # Boost cultural/encyclopedic knowledge - model: Kasimyildirim/Qwen2-turkish-comnibed-v5-lora # Additional Turkish data mix parameters: weight: 0.4 # Complementary reinforcement merge_method: ties parameters: density: 0.5 # Slightly lower density to reduce noise weight: 0.9 # Stronger weight retention for Turkish features normalize: true dtype: bfloat16 ``` ## 💻 Usage ```python !pip install -qU transformers accelerate from transformers import AutoTokenizer import transformers import torch model = "matrixportal/Turkish-Llama3-8B-Merged" messages = [{"role": "user", "content": "What is a large language model?"}] tokenizer = AutoTokenizer.from_pretrained(model) prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) pipeline = transformers.pipeline( "text-generation", model=model, torch_dtype=torch.float16, device_map="auto", ) outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95) print(outputs[0]["generated_text"]) ```