Gemini API'nin ince ayar desteği, giriş/çıkış örneklerinden oluşan küçük bir veri kümeniz olduğunda çıktıyı seçecek bir mekanizma sağlar. Daha ayrıntılı bilgi için Model ayarlama rehberine ve eğitime göz atın.
Yöntem: trainedModels.create
Hassaslaştırılmış bir model oluşturur. google.longrunning.Operations
hizmeti üzerinden ara ayar ilerleme durumunu (varsa) kontrol edin.
İşlemler hizmeti aracılığıyla durum ve sonuçlara erişme. Örnek: GET /v1/tunedModels/az2mb0bpw6i/operations/000-111-222
Uç nokta
yayınlayacağım
https://generativelanguage.googleapis.com/v1beta/tunedModels
Sorgu parametreleri
tunedModelId
string
İsteğe bağlı. Hassaslaştırılmış modelin benzersiz kimliği (belirtilmişse). Bu değer en fazla 40 karakterden oluşmalıdır. İlk karakter harf, son karakter harf veya sayı olabilir. Kimlik, şu normal ifadeyle eşleşmelidir: [a-z]([a-z0-9-]{0,38}[a-z0-9])?
.
İstek içeriği
İstek metni, TunedModel
öğesinin bir örneğini içerir.
displayName
string
İsteğe bağlı. Kullanıcı arayüzlerinde bu model için görüntülenecek ad. Görünen ad, boşluklar dahil en fazla 40 karakterden oluşmalıdır.
description
string
İsteğe bağlı. Bu modelin kısa bir açıklaması.
tuningTask
object (TuningTask
)
Zorunlu. Hassaslaştırılmış modeli oluşturan ince ayar görevi.
source_model
. İnce ayar için başlangıç noktası olarak kullanılan model. source_model
şunlardan yalnızca biri olabilir:
tunedModelSource
object (TunedModelSource
)
İsteğe bağlı. TunedModel'i, yeni modeli eğitmek için başlangıç noktası olarak kullanın.
baseModel
string
Sabit. İnce ayarlanacak Model
cihazın adı. Örnek: models/gemini-1.5-flash-001
temperature
number
İsteğe bağlı. Çıkışın rastgeleliğini kontrol eder.
Değerler [0.0,1.0]
değerinden yüksek olabilir (bu değerler dahil). 1.0
değerine daha yakın bir değer, daha çeşitli yanıtlar verirken 0.0
değerine daha yakın bir değer genellikle modelin daha az şaşırtıcı yanıtlar vermesini sağlar.
Bu değer, modeli oluştururken temel model tarafından varsayılan olarak kullanılan değeri belirtir.
topP
number
İsteğe bağlı. Çekirdek örnekleme için.
Çekirdek örneklemede, olasılık toplamı en az topP
olan en küçük jeton kümesi dikkate alınır.
Bu değer, modeli oluştururken temel model tarafından varsayılan olarak kullanılan değeri belirtir.
topK
integer
İsteğe bağlı. Top-k örneklemesi için.
Top-k örneklemesi, en olası topK
jeton grubunu dikkate alır. Bu değer, modele çağrı yapılırken arka uç tarafından kullanılacak varsayılanı belirtir.
Bu değer, modeli oluştururken temel model tarafından varsayılan olarak kullanılan değeri belirtir.
Örnek istek
Python
Yanıt gövdesi
Bu kaynak, bir ağ API çağrısının sonucu olan uzun süreli bir işlemi temsil eder.
Başarılı olursa yanıt metni aşağıdaki yapıyla birlikte verileri içerir:
name
string
Sunucu tarafından atanmış ad. Bu ad, yalnızca onu ilk döndüren hizmet içinde benzersizdir. Varsayılan HTTP eşlemesini kullanıyorsanız name
, operations/{unique_id}
ile biten bir kaynak adı olmalıdır.
metadata
object
İşlemle ilişkili hizmete özgü meta veriler. Genellikle ilerleme durumu bilgilerini ve oluşturulma zamanı gibi ortak meta verileri içerir. Bazı hizmetler bu tür meta verileri sağlamayabilir. Uzun süreli bir işlem döndüren tüm yöntemler, meta veri türünü (varsa) belgelemelidir.
Rastgele türden alanlar içeren nesne. Ek bir "@type"
alanı, türü tanımlayan bir URI içerir. Örnek: { "id": 1234, "@type": "types.example.com/standard/id" }
.
done
boolean
Değer false
ise işlemin devam ettiği anlamına gelir. true
ise işlem tamamlanır ve error
ya da response
kullanılabilir.
result
. İşlem sonucu (error
veya geçerli bir response
olabilir). done
== false
ise error
veya response
ayarlanmamıştır. done
== true
ise tam olarak error
veya response
ayarlanabilir. Bazı hizmetler sonucu sağlamayabilir. result
şunlardan yalnızca biri olabilir:
error
object (Status
)
Hata veya iptal durumunda işlemin hata sonucu.
response
object
İşlemin normal ve başarılı yanıtı. Orijinal yöntem başarıyla ilgili hiçbir veri (ör. Delete
) döndürmezse yanıt google.protobuf.Empty
olur. Orijinal yöntem standart Get
/Create
/Update
ise yanıt, kaynak olmalıdır. Diğer yöntemler için yanıt XxxResponse
türünde olmalıdır (burada Xxx
, orijinal yöntem adıdır). Örneğin, orijinal yöntemin adı TakeSnapshot()
ise tahmin edilen yanıt türü TakeSnapshotResponse
olur.
Rastgele türden alanlar içeren nesne. Ek bir "@type"
alanı, türü tanımlayan bir URI içerir. Örnek: { "id": 1234, "@type": "types.example.com/standard/id" }
.
JSON gösterimi |
---|
{ "name": string, "metadata": { "@type": string, field1: ..., ... }, "done": boolean, // Union field |
Yöntem: configuredModels.generateContent
GenerateContentRequest
girdisinden sonra bir model yanıtı oluşturur. Ayrıntılı kullanım bilgileri için metin oluşturma kılavuzuna bakın. Giriş özellikleri, hassaslaştırılmış modeller de dahil olmak üzere modeller arasında farklılık gösterir. Ayrıntılar için model kılavuzuna ve ayarlama kılavuzuna bakın.
Uç nokta
yayınlayacağım
https://generativelanguage.googleapis.com/v1beta/{model=tunedModels/*}:generateContent
Yol parametreleri
model
string
Zorunlu. Tamamlama oluşturmak için kullanılacak Model
öğesinin adı.
Biçim: name=models/{model}
. tunedModels/{tunedmodel}
biçimindedir.
İstek içeriği
İstek gövdesi, aşağıdaki yapıya sahip verileri içerir:
contents[]
object (Content
)
Zorunlu. Modelle olan mevcut görüşmenin içeriği.
Tek dönüşlü sorgular için bu, tek bir örnektir. Sohbet gibi çok dönüşlü sorgular için bu, sohbet geçmişini ve en son isteği içeren tekrarlanan bir alandır.
tools[]
object (Tool
)
İsteğe bağlı. Model
öğesinin bir sonraki yanıtı oluşturmak için kullanabileceği Tools
listesi.
Tool
, Model
'ın bilgi ve kapsamı dışında bir işlem veya işlem kümesi gerçekleştirmek için sistemin harici sistemlerle etkileşime girmesini sağlayan bir kod parçasıdır. Desteklenen Tool
'lar Function
ve codeExecution
'dir. Daha fazla bilgi edinmek için İşlev çağrısı ve Kod yürütme kılavuzlarına bakın.
toolConfig
object (ToolConfig
)
İsteğe bağlı. İstekte belirtilen herhangi bir Tool
için araç yapılandırması. Kullanım örneği için İşlev çağrısı kılavuzuna bakın.
safetySettings[]
object (SafetySetting
)
İsteğe bağlı. Güvenli olmayan içeriği engellemek için benzersiz SafetySetting
örneklerinin listesi.
Bu değişiklik GenerateContentRequest.contents
ve GenerateContentResponse.candidates
web sitesinde zorunlu kılınacaktır. Her SafetyCategory
türü için birden fazla ayar olmamalıdır. API, bu ayarlarla belirlenen eşikleri karşılamayan tüm içerik ve yanıtları engeller. Bu liste, SafetySettings'te belirtilen her bir SafetyCategory
için varsayılan ayarları geçersiz kılar. Listede sağlanan belirli bir SafetyCategory
için SafetySetting
yoksa API, söz konusu kategori için varsayılan güvenlik ayarını kullanır. HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT zarar kategorileri desteklenir. Mevcut güvenlik ayarları hakkında ayrıntılı bilgi için kılavuza bakın. Yapay zeka uygulamalarınızda güvenlikle ilgili dikkat edilmesi gereken noktaları nasıl dahil edeceğinizi öğrenmek için güvenlik rehberini de inceleyin.
systemInstruction
object (Content
)
İsteğe bağlı. Geliştirici tarafından oluşturulan sistem talimatları. Şu anda yalnızca metin kullanılır.
generationConfig
object (GenerationConfig
)
İsteğe bağlı. Model oluşturma ve çıkışlar için yapılandırma seçenekleri.
cachedContent
string
İsteğe bağlı. Tahmini sunmak için bağlam olarak kullanılacak şekilde önbelleğe alınan içeriğin adı. Biçim: cachedContents/{cachedContent}
Örnek istek
Metin
Python
Node.js
Go
kabuk
Kotlin
Swift
Dart
Java
Resim
Python
Node.js
Go
kabuk
Kotlin
Swift
Dart
Java
Ses
Python
Node.js
kabuk
Video
Python
Node.js
Go
kabuk
Python
kabuk
Sohbet
Python
Node.js
Go
kabuk
Kotlin
Swift
Dart
Java
Önbellek
Python
Node.js
İnce Ayarlanmış Model
Python
JSON Modu
Python
Node.js
Go
kabuk
Kotlin
Swift
Dart
Java
Kod yürütme
Python
Kotlin
Java
İşlev Çağrısı
Python
Node.js
kabuk
Kotlin
Swift
Dart
Java
Oluşturma yapılandırması
Python
Node.js
Go
kabuk
Kotlin
Swift
Dart
Java
Güvenlik Ayarları
Python
Node.js
Go
kabuk
Kotlin
Swift
Dart
Java
Sistem Talimatı
Python
Node.js
Go
kabuk
Kotlin
Swift
Dart
Java
Yanıt gövdesi
Başarılıysa yanıt metni, GenerateContentResponse
öğesinin bir örneğini içerir.
Yöntem: TuneModels.get
Belirli bir TunedModel hakkında bilgi alır.
Uç nokta
indir
https://generativelanguage.googleapis.com/v1beta/{name=tunedModels/*}
Yol parametreleri
name
string
Zorunlu. Modelin kaynak adı.
Biçim: tunedModels/my-model-id
tunedModels/{tunedmodel}
biçimindedir.
İstek içeriği
İstek metni boş olmalıdır.
Örnek istek
Python
Yanıt gövdesi
Başarılıysa yanıt metni, TunedModel
öğesinin bir örneğini içerir.
Yöntem: TuneModels.list
Oluşturulan hassaslaştırılmış modelleri listeler.
Uç nokta
indir
https://generativelanguage.googleapis.com/v1beta/tunedModels
Sorgu parametreleri
pageSize
integer
İsteğe bağlı. Döndürülecek maksimum TunedModels
sayısı (sayfa başına). Hizmet, hassaslaştırılmış daha az model döndürebilir.
Belirtilmemişse en fazla 10 hassaslaştırılmış model döndürülür. Bu yöntem, daha büyük bir pageSize iletseniz bile sayfa başına en fazla 1.000 model döndürür.
pageToken
string
İsteğe bağlı. Önceki tunedModels.list
çağrısından alınan bir sayfa jetonu.
Sonraki sayfayı almak için bir istek tarafından döndürülen pageToken
değerini sonraki isteğin bağımsız değişkeni olarak sağlayın.
Sayfalara ayırma işlemi sırasında tunedModels.list
öğesine sağlanan diğer tüm parametreler, sayfa jetonunu sağlayan çağrıyla eşleşmelidir.
filter
string
İsteğe bağlı. Filtre, hassaslaştırılmış modelin açıklaması ve görünen adı üzerinde yapılan bir tam metin aramasıdır. Varsayılan olarak, sonuçlar herkesle paylaşılan hassaslaştırılmış modelleri içermez.
Ek operatörler: - owner:ben - writers:me - Reader:me - reader:herkes
Örnekler: "owner:ben" çağrının "readers:me" sahip rolüne sahip olduğu tüm hassaslaştırılmış modelleri döndürür arayanın, "readers:Everyone" okuyucu rolüne sahip olduğu tüm hassaslaştırılmış modelleri döndürür. herkesle paylaşılan tüm hassaslaştırılmış modelleri döndürür
İstek içeriği
İstek metni boş olmalıdır.
Örnek istek
Python
Yanıt gövdesi
tunedModels.list
tarafından gönderilen, modellerin sayfalara ayrılmış bir listesini içeren yanıt.
Başarılı olursa yanıt metni aşağıdaki yapıyla birlikte verileri içerir:
tunedModels[]
object (TunedModel
)
Döndürülen Modeller.
nextPageToken
string
Sonraki sayfayı almak için pageToken
olarak gönderilebilecek bir jeton.
Bu alan atlanırsa başka sayfa yoktur.
JSON gösterimi |
---|
{
"tunedModels": [
{
object ( |
Yöntem: structuredModels.patch
Hassaslaştırılmış bir modeli günceller.
Uç nokta
yama
https://generativelanguage.googleapis.com/v1beta/{tunedModel.name=tunedModels/*}
PATCH https://generativelanguage.googleapis.com/v1beta/{tunedModel.name=tunedModels/*}
Yol parametreleri
tunedModel.name
string
Yalnızca çıkış. Hassaslaştırılmış model adı. Oluşturma sırasında benzersiz bir ad oluşturulur. Örnek: tunedModels/az2mb0bpw6i
displayName, oluşturma sırasında ayarlanırsa adın kimlik kısmı, displayName kelimelerinin kısa çizgilerle birleştirilip benzersizlik için rastgele bir bölüm eklenerek ayarlanır.
Örnek:
- displayName =
Sentence Translator
- name =
tunedModels/sentence-translator-u3b7m
tunedModels/{tunedmodel}
biçimini alır.
Sorgu parametreleri
updateMask
string (FieldMask
format)
Zorunlu. Güncellenecek alanların listesi.
Bu, tam nitelikli alan adlarının virgülle ayrılmış bir listesidir. Örnek: "user.displayName,photo"
.
İstek içeriği
İstek metni, TunedModel
öğesinin bir örneğini içerir.
displayName
string
İsteğe bağlı. Kullanıcı arayüzlerinde bu model için görüntülenecek ad. Görünen ad, boşluklar dahil en fazla 40 karakterden oluşmalıdır.
description
string
İsteğe bağlı. Bu modelin kısa bir açıklaması.
tuningTask
object (TuningTask
)
Zorunlu. Hassaslaştırılmış modeli oluşturan ince ayar görevi.
source_model
. İnce ayar için başlangıç noktası olarak kullanılan model. source_model
şunlardan yalnızca biri olabilir:
tunedModelSource
object (TunedModelSource
)
İsteğe bağlı. TunedModel'i, yeni modeli eğitmek için başlangıç noktası olarak kullanın.
temperature
number
İsteğe bağlı. Çıkışın rastgeleliğini kontrol eder.
Değerler [0.0,1.0]
değerinden yüksek olabilir (bu değerler dahil). 1.0
değerine daha yakın bir değer, daha çeşitli yanıtlar verirken 0.0
değerine daha yakın bir değer genellikle modelin daha az şaşırtıcı yanıtlar vermesini sağlar.
Bu değer, modeli oluştururken temel model tarafından varsayılan olarak kullanılan değeri belirtir.
topP
number
İsteğe bağlı. Çekirdek örnekleme için.
Çekirdek örneklemede, olasılık toplamı en az topP
olan en küçük jeton kümesi dikkate alınır.
Bu değer, modeli oluştururken temel model tarafından varsayılan olarak kullanılan değeri belirtir.
topK
integer
İsteğe bağlı. Top-k örneklemesi için.
Top-k örneklemesi, en olası topK
jeton grubunu dikkate alır. Bu değer, modele çağrı yapılırken arka uç tarafından kullanılacak varsayılanı belirtir.
Bu değer, modeli oluştururken temel model tarafından varsayılan olarak kullanılan değeri belirtir.
Yanıt gövdesi
Başarılıysa yanıt metni, TunedModel
öğesinin bir örneğini içerir.
Yöntem: trainedModels.delete
Hassaslaştırılmış bir modeli siler.
Uç nokta
sil
https://generativelanguage.googleapis.com/v1beta/{name=tunedModels/*}
Yol parametreleri
name
string
Zorunlu. Modelin kaynak adı. Biçim: tunedModels/my-model-id
tunedModels/{tunedmodel}
biçimindedir.
İstek içeriği
İstek metni boş olmalıdır.
Yanıt gövdesi
Başarılı olursa yanıt gövdesi boş olur.
REST Kaynağı: managedModels
- Kaynak: TunedModel
- TunedModelSource
- Durum
- TuningTask
- TuningSnapshot
- Veri kümesi
- TuningExamples
- TuningExample
- Hiperparametreler
- Yöntemler
Kaynak: TunedModel
ModelService.CreateTunedModel kullanılarak oluşturulmuş ince ayar yapılmış bir model.
name
string
Yalnızca çıkış. Hassaslaştırılmış model adı. Oluşturma sırasında benzersiz bir ad oluşturulur. Örnek: tunedModels/az2mb0bpw6i
displayName, oluşturma sırasında ayarlanırsa adın kimlik kısmı, displayName kelimelerinin kısa çizgilerle birleştirilip benzersizlik için rastgele bir bölüm eklenerek ayarlanır.
Örnek:
- displayName =
Sentence Translator
- ad =
tunedModels/sentence-translator-u3b7m
displayName
string
İsteğe bağlı. Kullanıcı arayüzlerinde bu model için görüntülenecek ad. Görünen ad, boşluklar dahil en fazla 40 karakterden oluşmalıdır.
description
string
İsteğe bağlı. Bu modelin kısa bir açıklaması.
state
enum (State
)
Yalnızca çıkış. Hassaslaştırılmış modelin durumu.
createTime
string (Timestamp
format)
Yalnızca çıkış. Bu modelin oluşturulduğu zaman damgası.
RFC3339 UTC "Zulu" zaman damgası biçiminde olmalıdır. Örnekler: "2014-10-02T15:01:23Z"
ve "2014-10-02T15:01:23.045123456Z"
.
updateTime
string (Timestamp
format)
Yalnızca çıkış. Bu modelin güncellendiği zaman damgası.
RFC3339 UTC "Zulu" zaman damgası biçiminde olmalıdır. Örnekler: "2014-10-02T15:01:23Z"
ve "2014-10-02T15:01:23.045123456Z"
.
tuningTask
object (TuningTask
)
Zorunlu. Hassaslaştırılmış modeli oluşturan ince ayar görevi.
source_model
. İnce ayar için başlangıç noktası olarak kullanılan model. source_model
şunlardan yalnızca biri olabilir:
tunedModelSource
object (TunedModelSource
)
İsteğe bağlı. TunedModel'i, yeni modeli eğitmek için başlangıç noktası olarak kullanın.
baseModel
string
Sabit. İnce ayarlanacak Model
cihazın adı. Örnek: models/gemini-1.5-flash-001
temperature
number
İsteğe bağlı. Çıkışın rastgeleliğini kontrol eder.
Değerler [0.0,1.0]
değerinden yüksek olabilir (bu değerler dahil). 1.0
değerine daha yakın bir değer, daha çeşitli yanıtlar verirken 0.0
değerine daha yakın bir değer genellikle modelin daha az şaşırtıcı yanıtlar vermesini sağlar.
Bu değer, modeli oluştururken temel model tarafından varsayılan olarak kullanılan değeri belirtir.
topP
number
İsteğe bağlı. Çekirdek örnekleme için.
Çekirdek örneklemede, olasılık toplamı en az topP
olan en küçük jeton kümesi dikkate alınır.
Bu değer, modeli oluştururken temel model tarafından varsayılan olarak kullanılan değeri belirtir.
topK
integer
İsteğe bağlı. Top-k örneklemesi için.
Top-k örneklemesi, en olası topK
jeton grubunu dikkate alır. Bu değer, modele çağrı yapılırken arka uç tarafından kullanılacak varsayılanı belirtir.
Bu değer, modeli oluştururken temel model tarafından varsayılan olarak kullanılan değeri belirtir.
JSON gösterimi |
---|
{ "name": string, "displayName": string, "description": string, "state": enum ( |
TunedModelSource
Model, yeni bir modeli eğitmek için kaynak olarak ayarlandı.
tunedModel
string
Sabit. Yeni modeli eğitmek için başlangıç noktası olarak kullanılacak TunedModel
adı. Örnek: tunedModels/my-tuned-model
baseModel
string
Yalnızca çıkış. Bu TunedModel
öğesinin ayarlandığı temel Model
öğesinin adı. Örnek: models/gemini-1.5-flash-001
JSON gösterimi |
---|
{ "tunedModel": string, "baseModel": string } |
Eyalet
Hassaslaştırılmış modelin durumu.
Sıralamalar | |
---|---|
STATE_UNSPECIFIED |
Varsayılan değerdir. Bu değer kullanılmıyor. |
CREATING |
Model oluşturuluyor. |
ACTIVE |
Model kullanıma hazır. |
FAILED |
Model oluşturulamadı. |
TuningTask
Hassaslaştırılmış modeller oluşturan ince ayar görevleri.
startTime
string (Timestamp
format)
Yalnızca çıkış. Bu modelin ayarlanmasına başlanan zaman damgası.
RFC3339 UTC "Zulu" zaman damgası biçiminde olmalıdır. Örnekler: "2014-10-02T15:01:23Z"
ve "2014-10-02T15:01:23.045123456Z"
.
completeTime
string (Timestamp
format)
Yalnızca çıkış. Bu modelin ayarlanması tamamlandığındaki zaman damgası.
RFC3339 UTC "Zulu" zaman damgası biçiminde olmalıdır. Örnekler: "2014-10-02T15:01:23Z"
ve "2014-10-02T15:01:23.045123456Z"
.
snapshots[]
object (TuningSnapshot
)
Yalnızca çıkış. İnce ayar sırasında toplanan metrikler.
trainingData
object (Dataset
)
Zorunlu. Yalnızca giriş. Sabit. Model eğitimi verileri.
hyperparameters
object (Hyperparameters
)
Sabit. İnce ayar işlemini kontrol eden hiperparametreler. Sağlanmazsa varsayılan değerler kullanılır.
JSON gösterimi |
---|
{ "startTime": string, "completeTime": string, "snapshots": [ { object ( |
TuningSnapshot
Tek bir ayarlama adımı için kayıt yapın.
step
integer
Yalnızca çıkış. İnce ayar adımı.
epoch
integer
Yalnızca çıkış. Bu adımın parçası olduğu dönem.
meanLoss
number
Yalnızca çıkış. Bu adımla ilgili eğitim örneklerinin ortalama kaybı.
computeTime
string (Timestamp
format)
Yalnızca çıkış. Bu metriğin hesaplandığı zaman damgası.
RFC3339 UTC "Zulu" zaman damgası biçiminde olmalıdır. Örnekler: "2014-10-02T15:01:23Z"
ve "2014-10-02T15:01:23.045123456Z"
.
JSON gösterimi |
---|
{ "step": integer, "epoch": integer, "meanLoss": number, "computeTime": string } |
Veri kümesi
Eğitim veya doğrulama için veri kümesi.
dataset
. Satır içi veri veya verilere referans. dataset
şunlardan yalnızca biri olabilir:
examples
object (TuningExamples
)
İsteğe bağlı. Satır içi örnekler.
JSON gösterimi |
---|
{ // Union field |
TuningExamples
Ayarlama örnekleri. Eğitim veya doğrulama verileri olabilir.
examples[]
object (TuningExample
)
Zorunlu. Örnekler. Örnek giriş, metin veya tartışma için olabilir ancak bir gruptaki tüm örneklerin aynı türde olması gerekir.
JSON gösterimi |
---|
{
"examples": [
{
object ( |
TuningExample
İnce ayarlar için tek bir örnek.
output
string
Zorunlu. Beklenen model çıkışı.
model_input
. Bu örnek için modele yapılan giriş. model_input
şunlardan yalnızca biri olabilir:
textInput
string
İsteğe bağlı. Metin modeli girişi.
JSON gösterimi |
---|
{ "output": string, // Union field |
Hiperparametreler
İnce ayar işlemini kontrol eden hiperparametreler. Daha fazla bilgi için https://ai.google.dev/docs/model_tuning_guidance adresine bakın.
learning_rate_option
. İnce ayar sırasında öğrenme hızını belirtme seçenekleri. learning_rate_option
şunlardan yalnızca biri olabilir:
learningRate
number
İsteğe bağlı. Sabit. İnce ayar için öğrenme hızı hiperparametresi. Ayarlanmazsa eğitim örneklerinin sayısına göre 0,001 veya 0,0002 varsayılan değeri hesaplanır.
learningRateMultiplier
number
İsteğe bağlı. Sabit. Öğrenme hızı çarpanı, varsayılan (önerilen) değere göre nihai bir LearningRate hesaplamak için kullanılır. Gerçek öğrenme hızı := learningRateMultiplier * varsayılan öğrenme hızı Varsayılan öğrenme hızı, temel modele ve veri kümesi boyutuna bağlıdır. Ayarlanmazsa varsayılan olarak 1.0 kullanılır.
epochCount
integer
Sabit. Eğitim dönemlerinin sayısı. Dönem, eğitim verileri üzerinden yapılan tek bir geçiştir. Ayarlanmazsa varsayılan olarak 5 değeri kullanılır.
batchSize
integer
Sabit. İnce ayar için grup boyutu hiper parametresi. Ayarlanmazsa eğitim örneklerinin sayısına bağlı olarak 4 veya 16 varsayılan değeri kullanılır.
JSON gösterimi |
---|
{ // Union field |