A Llama reading a book

LLaMA-3-8B-Instruct-TR-DPO

LLaMA-3-8B-Instruct-TR-DPO is a finetuned version of Meta-LLaMA-3-8B-Instruct, which has been trained on a preference dataset generated synthetically.

Training Info

  • Base Model: Meta-LLaMA-3-8B-Instruct

  • Training Data: A synthetically generated preference dataset consisting of 10K samples was used. No proprietary data was utilized.

  • Training Time: 3 hours on a single RTX 6000 Ada

  • QLoRA Configs:

    • lora_r: 64
    • lora_alpha: 32
    • lora_dropout: 0.05
    • lora_target_linear: true

The aim was to finetune the model to enhance the output format and content quality for the Turkish language. It is not necessarily smarter than the base model, but its outputs are more likable and preferable.

Compared to the base model, LLaMA-3-8B-Instruct-TR-DPO is more fluent and coherent in Turkish. It can generate more informative and detailed answers for a given instruction.

It should be noted that the model will still generate incorrect or nonsensical outputs, so please verify the outputs before using them.

How to use

You can use the below code snippet to use the model:

from transformers import BitsAndBytesConfig
import transformers
import torch

bnb_config = BitsAndBytesConfig(
            load_in_4bit=True,
            bnb_4bit_use_double_quant=True,
            bnb_4bit_quant_type="nf4",
            bnb_4bit_compute_dtype=torch.bfloat16
)

model_id = "Metin/LLaMA-3-8B-Instruct-TR-DPO"

pipeline = transformers.pipeline(
    "text-generation",
    model=model_id,
    model_kwargs={"torch_dtype": torch.bfloat16 ,'quantization_config': bnb_config},
    device_map="auto",
)

messages = [
    {"role": "system", "content": "You are a helpful assistant. Always reply in Turkish."},
    {"role": "user", "content": "Python'da bir รถฤŸenin bir listede geรงip geรงmediฤŸini nasฤฑl kontrol edebilirim?"},
]

prompt = pipeline.tokenizer.apply_chat_template(
        messages,
        tokenize=False,
        add_generation_prompt=True
)

terminators = [
    pipeline.tokenizer.eos_token_id,
    pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
]

outputs = pipeline(
    prompt,
    max_new_tokens=512,
    eos_token_id=terminators,
    do_sample=True,
    temperature=0.2,
    top_p=0.9,
)

print(outputs[0]["generated_text"][len(prompt):])

OpenLLMTurkishLeaderboard_v0.2 benchmark results

  • MMLU_TR_V0.2: 49.83%
  • Truthful_QA_TR_V0.2: 52.32%
  • ARC_TR_V0.2: 44.37%
  • HellaSwag_TR_V0.2: 45.58%
  • GSM8K_TR_V0.2: 54.21%
  • Winogrande_TR_V0.2: 55.06%
  • Average: 50.22%

These scores may differ from what you will get when you run the same benchmarks, as I did not use any inference engine (vLLM, TensorRT-LLM, etc.)

Output Example (DPO Model vs Base Model)

Testing the model with a single example is not an accurate method. However, an example is provided here to showcase the model's capabilities.

Model: LLaMA-3-8B-Instruct-TR-DPO

Input

Yeni bir derin รถฤŸrenme modelinin tanฤฑtฤฑmฤฑ iรงin bir etkinlik planฤฑ hazฤฑrla.

Output

Harika bir fikir!

Etkinlik Planฤฑ: "Deep Learning Modeli Tanฤฑtฤฑmฤฑ"

**Adฤฑm 1: ร–n-BaลŸlangฤฑรง**

* KonuลŸma konusu: "Deep Learning Modeli Tanฤฑtฤฑmฤฑ"
* Katฤฑlฤฑmcฤฑ profili: Bilimsel ve teknoloji odaklฤฑ profesyoneller, รถฤŸrenciler ve araลŸtฤฑrmacฤฑlar
* Etkinlik sรผresi: 2 saat

**Adฤฑm 2: GiriลŸ**

* Sunum: "Deep Learning Modeli Tanฤฑtฤฑmฤฑ: Tarihรงesi ve Temelleri"
* Sunum iรงeriฤŸi: Deep learning modelinin tarihi, temel kavramlarฤฑ (รถrneฤŸin, ANN, CNN, RNN), uygulamalarฤฑ ve avantajlarฤฑ
* Sunum sรผresi: 30 dakika

**Adฤฑm 3: Modelin ร‡alฤฑลŸma ร–rnekleri**

* Sunum: "Deep Learning Modelinin ร‡alฤฑลŸma ร–rnekleri"
* Sunum iรงeriฤŸi: Modelin uygulamalarฤฑ (รถrneฤŸin, gรถrรผntรผ sฤฑnฤฑflandฤฑrma, doฤŸal dil iลŸleme, makine รถฤŸrenimi)
* Sunum sรผresi: 45 dakika

**Adฤฑm 4: Katฤฑlฤฑmcฤฑ Sorularฤฑ ve TartฤฑลŸma**

* Katฤฑlฤฑmcฤฑ sorularฤฑna cevap verme
* TartฤฑลŸma: Modelin avantajlarฤฑ ve dezavantajlarฤฑ, uygulamalarฤฑ ve gelecekteki geliลŸmeleri

**Adฤฑm 5: Sonuรง**

* Sunum: "Deep Learning Modelinin Sonuรงlarฤฑ"
* Sunum iรงeriฤŸi: Modelin sonuรงlarฤฑ, uygulamalarฤฑ ve gelecekteki geliลŸmeleri
* Sunum sรผresi: 15 dakika

**Etkinlik Notlarฤฑ**

* Sunumlar ve tartฤฑลŸmalar iรงin gerekli malzemeleri hazฤฑrlayฤฑn
* Katฤฑlฤฑmcฤฑlarฤฑn sorularฤฑna cevap verme iรงin yeterli zaman ayฤฑrฤฑn
* Etkinlik sonrasฤฑ katฤฑlฤฑmcฤฑlarฤฑn geri bildirimlerini alฤฑn

Umarฤฑm bu etkinlik planฤฑ sizin iรงin yardฤฑmcฤฑ olur!

Model: LLaMA-3-8B-Instruct

Input

Harika bir fikir! AลŸaฤŸฤฑdaki etkinlik planฤฑnฤฑ hazฤฑrladฤฑm:

**Etkinlik Adฤฑ:** "Derin ร–ฤŸrenme Modelinin Tanฤฑtฤฑmฤฑ"

**Etkinlik Amacฤฑ:** Derin รถฤŸrenme modelinin tanฤฑtฤฑmฤฑ ve uygulamalarฤฑ hakkฤฑnda bilgi sahibi olmak.

**Etkinlik Planฤฑ:**

1. **GiriลŸ:** Derin รถฤŸrenme modelinin tanฤฑtฤฑmฤฑ ve รถnemi hakkฤฑnda kฤฑsa bir konuลŸma.
2. **Teorik Bรถlรผm:** Derin รถฤŸrenme modelinin teorik temelleri ve รงalฤฑลŸma prensipleri hakkฤฑnda sunum.
3. **Uygulama Bรถlรผm:** Derin รถฤŸrenme modelinin uygulamalarฤฑ ve baลŸarฤฑlarฤฑ hakkฤฑnda sunum.
4. **Pratik Bรถlรผm:** Derin รถฤŸrenme modelinin pratik uygulamalarฤฑ ve deneyimi hakkฤฑnda sunum.
5. **Soru-Cevap Bรถlรผm:** Derin รถฤŸrenme modelinin sorularฤฑna cevap verme.
6. **Sonuรง Bรถlรผm:** Derin รถฤŸrenme modelinin tanฤฑtฤฑmฤฑ ve uygulamalarฤฑ hakkฤฑnda sonuรง ve tavsiye.

**Etkinlik Malzemeleri:**

* Sunum araรงlarฤฑ (slaj, powerpoint, vs.)
* Derin รถฤŸrenme modelinin uygulamalarฤฑ hakkฤฑnda รถrnekler ve grafikler
* Derin รถฤŸrenme modelinin teorik temelleri hakkฤฑnda kitap ve makaleler
* Derin รถฤŸrenme modelinin pratik uygulamalarฤฑ hakkฤฑnda deneyimi hakkฤฑnda sunum

**Etkinlik Sรผresi:** 2 saat

**Katฤฑlฤฑmcฤฑ Sayฤฑsฤฑ:** 20-30 kiลŸi

**Etkinlik Yeri:** Bilimsel toplantฤฑ salonu veya online platform

**Etkinlik Tarih ve Saati:** 10:00-12:00

**Etkinlik Dili:** Tรผrkรงe

**Etkinlik Katฤฑlฤฑmcฤฑlarฤฑ:** Bilimsel toplantฤฑ salonunda veya online platformda katฤฑlฤฑmcฤฑlar.

**Etkinlik Sonuรงlarฤฑ:** Derin รถฤŸrenme modelinin tanฤฑtฤฑmฤฑ ve uygulamalarฤฑ hakkฤฑnda bilgi sahibi olmak.

**Etkinlik Tavsiyesi:** Derin รถฤŸrenme modelinin tanฤฑtฤฑmฤฑ ve uygulamalarฤฑ hakkฤฑnda bilgi sahibi olmak.
Downloads last month
27
Safetensors
Model size
8B params
Tensor type
BF16
ยท
Inference Providers NEW
Input a message to start chatting with Metin/LLaMA-3-8B-Instruct-TR-DPO.

Model tree for Metin/LLaMA-3-8B-Instruct-TR-DPO

Finetuned
(1,234)
this model
Quantizations
4 models

Evaluation results