Gemma talimat ayarlı (IT) modelleri, hem eğitim hem de çıkarım sırasında tüm talimat ayarı örneklerini ek bilgilerle açıklayan belirli bir düzenleyici ile eğitilir. Düzenleyicinin iki amacı vardır:
Bir sohbette sistem, kullanıcı veya asistan rolleri gibi rolleri belirtme.
Özellikle çok katılımlı sohbetlerde konuşma sırasını belirtme
Aşağıda, Gemma tarafından kullanılan kontrol jetonlarını ve kullanım alanlarını belirtiyoruz. Kontrol jetonlarının, dize ayırıcımızda ayrılmış ve dize ayırıcımıza özgü olduğunu unutmayın.
<start_of_turn>user
knock knock<end_of_turn>
<start_of_turn>model
who is there<end_of_turn>
<start_of_turn>user
Gemma<end_of_turn>
<start_of_turn>model
Gemma who?<end_of_turn>
"<end_of_turn>\n" jetonu, sıra ayırıcıdır ve istem ön eki "<start_of_turn>model\n"'dur. Yani modele "Cramer Kuralı nedir?" gibi bir soru sormak istiyorsanız modele şu şekilde bilgi vermeniz gerekir:
"<start_of_turn>user
What is Cramer's Rule?<end_of_turn>
<start_of_turn>model"
Önceden eğitilmiş Gemma modellerinde kendi verilerinizle hassas ayar yapmak istiyorsanız eğitim ve çıkarım kullanım alanlarınız arasında tutarlı olduğu sürece kontrol jetonları için bu tür bir şemayı kullanabileceğinizi unutmayın.
Sistem talimatları
Gemma'nın talimat ayarlı modelleri yalnızca iki rolle çalışacak şekilde tasarlanmıştır:
user ve model. Bu nedenle, system rolü veya sistem dönüşü desteklenmez.
Ayrı bir sistem rolü kullanmak yerine, sistem düzeyindeki talimatları doğrudan ilk kullanıcı isteminde sağlayın. Model talimatlarını takip etme özellikleri, Gemma'nın talimatları etkili bir şekilde yorumlamasına olanak tanır. Örneğin:
<start_of_turn>user
Only reply like a pirate.
What is the answer to life the universe and everything?<end_of_turn>
<start_of_turn>model
Arrr, 'tis 42,<end_of_turn>
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-03-21 UTC."],[],[],null,["# Gemma formatting and system instructions\n\nGemma instruction-tuned (IT) models are trained with a specific *formatter* that\nannotates all instruction tuning examples with extra information, both at\ntraining and inference time. The formatter has two purposes:\n\n1. Indicating roles in a conversation, such as the *system* , *user* , or *assistant* roles.\n2. Delineating turns in a conversation, especially in a multi-turn conversation.\n\nBelow, we specify the control tokens used by Gemma and their use cases. Note\nthat the control tokens are reserved in and specific to our tokenizer.\n\n- Token to indicate a user turn: `user`\n- Token to indicate a model turn: `model`\n- Token to indicate the beginning of dialogue turn: `\u003cstart_of_turn\u003e`\n- Token to indicate the end of dialogue turn: `\u003cend_of_turn\u003e`\n\nHere's an example dialogue: \n\n \u003cstart_of_turn\u003euser\n knock knock\u003cend_of_turn\u003e\n \u003cstart_of_turn\u003emodel\n who is there\u003cend_of_turn\u003e\n \u003cstart_of_turn\u003euser\n Gemma\u003cend_of_turn\u003e\n \u003cstart_of_turn\u003emodel\n Gemma who?\u003cend_of_turn\u003e\n\nThe token `\"\u003cend_of_turn\u003e\\n\"` is the turn separator, and the prompt prefix is\n`\"\u003cstart_of_turn\u003emodel\\n\"`. This means that if you'd like to prompt the model\nwith a question like, \"What is Cramer's Rule?\", you should instead feed the\nmodel as follows: \n\n \"\u003cstart_of_turn\u003euser\n What is Cramer's Rule?\u003cend_of_turn\u003e\n \u003cstart_of_turn\u003emodel\"\n\nNote that if you want to finetune the pretrained Gemma models with your own\ndata, you can use any such schema for control tokens, as long as it's consistent\nbetween your training and inference use cases.\n\nSystem instructions\n-------------------\n\nGemma's instruction-tuned models are designed to work with only two roles:\n`user` and `model`. Therefore, the `system` role or a system turn is not\nsupported.\n\nInstead of using a separate system role, provide system-level instructions\ndirectly within the initial user prompt. The model instruction following\ncapabilities allow Gemma to interpret the instructions effectively. For example: \n\n \u003cstart_of_turn\u003euser\n Only reply like a pirate.\n\n What is the answer to life the universe and everything?\u003cend_of_turn\u003e\n \u003cstart_of_turn\u003emodel\n Arrr, 'tis 42,\u003cend_of_turn\u003e"]]