OrpoGemma-2-9B-TR
OrpoGemma-2-9B-TR is a Turkish fine-tuned version of google/gemma-2-9b-it. It is trained using the ORPO Trainer on a subset of 1500 rows from the dataset selimc/orpo-dpo-mix-TR-20k.
Training Information
Base Model: google/gemma-2-9b-it
Fine-Tuning Technique: ORPO
Training Data: 1500 rows from selimc/orpo-dpo-mix-TR-20k
Training Time: 2.5 hours on NVIDIA H100
QLoRA Configurations:
lora_r
: 16lora_alpha
: 32lora_dropout
: 0.05
ORPO Training Parameters
lr
: 2e-6epochs
: 3per_device_train_batch_size
: 8gradient_accumulation_steps
: 4
π Training Curves
Model Capabilities
- Produces fluent, coherent, and contextually appropriate text in Turkish.
- Delivers detailed and informative responses to a wide range of instructions and question types.
- May still produce incorrect or nonsensical outputs, user verification is recommended.
How to Use
from transformers import pipeline, BitsAndBytesConfig, AutoTokenizer
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 = "selimc/OrpoGemma-2-9B-TR"
tokenizer = AutoTokenizer.from_pretrained(model_id)
pipe = pipeline(
"text-generation",
model=model_id,
model_kwargs={"torch_dtype": torch.bfloat16 ,'quantization_config': bnb_config},
tokenizer=tokenizer,
device_map="auto"
)
messages = [
{"role": "user", "content": "GΓΆkyΓΌzΓΌ neden mavi?"},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
outputs = pipe(
prompt,
max_new_tokens=512,
do_sample=True,
eos_token_id=[pipe.tokenizer.convert_tokens_to_ids("<end_of_turn>"), pipe.tokenizer.eos_token_id],
temperature=0.67,
)
generated_text = outputs[0]['generated_text']
response = generated_text[len(prompt):].strip()
print(response)
- Downloads last month
- 2
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.