התמיכה בכוונון עדין של Gemini API מספקת מנגנון לאיסוף פלט כשיש מערך נתונים קטן של דוגמאות קלט/פלט. לפרטים נוספים, אפשר לעיין במדריך לכוונון מודלים ובמדריך.
שיטה: formattedModels.create
יצירת מודל שעבר כוונון. צריך לבדוק את התקדמות הכוונון ברמת הביניים (אם יש) דרך השירות google.longrunning.Operations
.
גישה לסטטוס ולתוצאות דרך שירות התפעול. דוגמה: GET /v1/TundModels/az2mb0bpw6i/operations/000-111-222
נקודת קצה
לשלוח
https://generativelanguage.googleapis.com/v1beta/tunedModels
פרמטרים של שאילתה
tunedModelId
string
זה שינוי אופציונלי. המזהה הייחודי של המודל המכוונן, אם צוין. הערך הזה צריך להכיל עד 40 תווים, התו הראשון חייב להיות אות והתו האחרון יכול להיות אות או מספר. המזהה חייב להתאים לביטוי הרגולרי: [a-z]([a-z0-9-]{0,38}[a-z0-9])?
.
גוף הבקשה
גוף הבקשה מכיל מופע של TunedModel
.
displayName
string
זה שינוי אופציונלי. השם שיוצג למודל הזה בממשקי המשתמש. השם המוצג צריך להיות באורך של 40 תווים לכל היותר, כולל רווחים.
description
string
זה שינוי אופציונלי. תיאור קצר של המודל הזה.
tuningTask
object (TuningTask
)
חובה. משימת הכוונון שיוצרת את המודל המכוונן.
source_model
. המודל שמשמש כנקודת ההתחלה לכוונון. source_model
יכול להיות רק אחת מהאפשרויות הבאות:
tunedModelSource
object (TunedModelSource
)
זה שינוי אופציונלי. תוכנן לשימוש כנקודת ההתחלה לאימון המודל החדש.
baseModel
string
בלתי ניתן לשינוי. השם של Model
לכוונון. לדוגמה: models/gemini-1.5-flash-001
temperature
number
זה שינוי אופציונלי. שליטה ברנדומיזציה של הפלט.
הערכים יכולים לנוע מעל [0.0,1.0]
, כולל. ערך קרוב יותר ל-1.0
יניב תשובות מגוונות יותר. לעומת זאת, ערך קרוב יותר ל-0.0
בדרך כלל יניב תשובות פחות מפתיעות מהמודל.
הערך הזה מציין את ערך ברירת המחדל שמשמש את המודל הבסיסי במהלך יצירת המודל.
topP
number
זה שינוי אופציונלי. לדגימת גרעין.
דגימת גרעין מביאה בחשבון את קבוצת האסימונים הקטנה ביותר שסכום ההסתברות שלהם הוא topP
לפחות.
הערך הזה מציין את ערך ברירת המחדל שמשמש את המודל הבסיסי במהלך יצירת המודל.
topK
integer
זה שינוי אופציונלי. לדגימת ה-Top-K.
דגימות מסוג 'אליפות במובילות' לוקחות בחשבון את קבוצת topK
האסימונים בעלי הסבירות הגבוהה ביותר. הערך הזה מציין את ברירת המחדל שתשמש את הקצה העורפי בזמן ביצוע הקריאה למודל.
הערך הזה מציין את ערך ברירת המחדל שמשמש את המודל הבסיסי במהלך יצירת המודל.
דוגמה לבקשה
Python
גוף התשובה
המשאב הזה מייצג פעולה ממושכת שהיא תוצאה של קריאה ל-API ברשת.
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכיל נתונים במבנה הבא:
name
string
השם שמוקצה על ידי השרת, שהוא ייחודי באותו שירות שהחזיר אותו במקור. אם משתמשים במיפוי ה-HTTP שמוגדר כברירת מחדל, name
צריך להיות שם משאב שמסתיים ב-operations/{unique_id}
.
metadata
object
מטא-נתונים ספציפיים לשירות שמשויכים לפעולה. בדרך כלל הוא מכיל מידע על ההתקדמות ומטא-נתונים נפוצים, כמו שעת היצירה. יכול להיות ששירותים מסוימים לא יספקו מטא-נתונים כאלה. כל שיטה שמחזירה פעולה ממושכת צריכה לתעד את סוג המטא-נתונים, אם יש כזה.
אובייקט שמכיל שדות מסוג שרירותי. שדה נוסף "@type"
מכיל URI המזהה את הסוג. לדוגמה: { "id": 1234, "@type": "types.example.com/standard/id" }
.
done
boolean
אם הערך הוא false
, המשמעות היא שהפעולה עדיין מתבצעת. אם הערך הוא true
, הפעולה הושלמה ואפשר להזין error
או response
.
result
. תוצאת הפעולה, שיכולה להיות error
או response
חוקית. אם done
== false
, לא מוגדר error
וגם response
. אם done
== true
, אפשר להגדיר רק אחד מהערכים error
או response
. יכול להיות ששירותים מסוימים לא יספקו את התוצאה. result
יכול להיות רק אחת מהאפשרויות הבאות:
error
object (Status
)
תוצאת השגיאה של הפעולה במקרה של כשל או ביטול.
response
object
התגובה הרגילה והמוצלחת של הפעולה. אם השיטה המקורית לא מחזירה נתוני הצלחה, כמו Delete
, התגובה היא google.protobuf.Empty
. אם השיטה המקורית היא רגילה Get
/Create
/Update
, התגובה צריכה להיות המשאב. בשיטות אחרות, התגובה צריכה להיות מסוג XxxResponse
, ו-Xxx
הוא השם המקורי של ה-method. לדוגמה, אם השם המקורי של ה-method הוא TakeSnapshot()
, סוג התגובה שמתקבלת הוא TakeSnapshotResponse
.
אובייקט שמכיל שדות מסוג שרירותי. שדה נוסף "@type"
מכיל URI המזהה את הסוג. לדוגמה: { "id": 1234, "@type": "types.example.com/standard/id" }
.
ייצוג JSON |
---|
{ "name": string, "metadata": { "@type": string, field1: ..., ... }, "done": boolean, // Union field |
שיטה: forceModels.generateContent
יוצרת תשובה למודל בהינתן קלט GenerateContentRequest
. כדי לקבל מידע מפורט על השימוש, אפשר לעיין במדריך ליצירת טקסט. יכולות הקלט משתנות בין מודלים שונים, כולל מודלים מכווננים. פרטים נוספים זמינים במדריך המודלים ובמדריך הכוונון.
נקודת קצה
לשלוח
https://generativelanguage.googleapis.com/v1beta/{model=tunedModels/*}:generateContent
פרמטרים של נתיב
model
string
חובה. השם של Model
שישמש ליצירת ההשלמה.
פורמט: name=models/{model}
הוא מופיע בפורמט tunedModels/{tunedmodel}
.
גוף הבקשה
גוף הבקשה מכיל נתונים במבנה הבא:
contents[]
object (Content
)
חובה. תוכן השיחה הנוכחית עם המודל.
בשאילתות עם סיבוב אחד, מדובר באירוע יחיד. בשאילתות מרובות תורות כמו צ'אט, זהו שדה חוזר שמכיל את היסטוריית השיחות ואת הבקשה האחרונה.
tools[]
object (Tool
)
זה שינוי אופציונלי. רשימה של Tools
ש-Model
יכול להשתמש בהם כדי ליצור את התשובה הבאה.
Tool
הוא קטע קוד שמאפשר למערכת לקיים אינטראקציה עם מערכות חיצוניות כדי לבצע פעולה או קבוצת פעולות, שלא במסגרת הידע וההיקף של Model
. סוגי Tool
הנתמכים הם Function
ו-codeExecution
. מידע נוסף זמין במדריכים קריאות לפונקציה והפעלת קוד.
toolConfig
object (ToolConfig
)
זה שינוי אופציונלי. הגדרת הכלי לכל Tool
שצוין בבקשה. דוגמה לשימוש זמינה במדריך להפעלת פונקציות.
safetySettings[]
object (SafetySetting
)
זה שינוי אופציונלי. רשימה של מופעים ייחודיים של SafetySetting
לחסימת תוכן לא בטוח.
המדיניות הזו תיאכף בGenerateContentRequest.contents
ובGenerateContentResponse.candidates
. לכל סוג של SafetyCategory
יכולה להיות הגדרה אחת לכל היותר. ה-API יחסום תוכן ותשובות שלא יעמדו בערכי הסף שהוגדרו על ידי ההגדרות האלה. הרשימה הזו מבטלת את הגדרות ברירת המחדל לכל SafetyCategory
שצוינו בהגדרות הבטיחות. אם לא צוין SafetySetting
עבור SafetyCategory
מסוים ברשימה, ה-API ישתמש בהגדרת ברירת המחדל של בטיחות לקטגוריה הזו. קיימת תמיכה בקטגוריות פגיעה HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT ו-HARM_CATEGORY_HARASSMENT. כדאי לעיין במדריך לקבלת מידע מפורט על הגדרות הבטיחות הזמינות. כדאי גם לעיין בהנחיות הבטיחות כדי ללמוד איך לשלב שיקולי בטיחות באפליקציות ה-AI.
systemInstruction
object (Content
)
זה שינוי אופציונלי. הוראות המערכת של המפתחים. כרגע אפשר להשתמש רק בטקסט.
generationConfig
object (GenerationConfig
)
זה שינוי אופציונלי. אפשרויות תצורה ליצירת מודל ולפלט שלו.
cachedContent
string
זה שינוי אופציונלי. שם התוכן שנשמר במטמון לשימוש כהקשר להצגת החיזוי. פורמט: cachedContents/{cachedContent}
דוגמה לבקשה
טקסט
Python
Node.js
Go
קונכייה
Kotlin
Swift
Dart
Java
תמונה
Python
Node.js
Go
קונכייה
Kotlin
Swift
Dart
Java
אודיו
Python
Node.js
קונכייה
וידאו
Python
Node.js
Go
קונכייה
Python
קונכייה
צ'אט
Python
Node.js
Go
קונכייה
Kotlin
Swift
Dart
Java
מטמון
Python
Node.js
מודל מכוונן
Python
מצב JSON
Python
Node.js
Go
קונכייה
Kotlin
Swift
Dart
Java
ביצוע קוד
Python
Kotlin
Java
שליחת פונקציות
Python
Node.js
קונכייה
Kotlin
Swift
Dart
Java
הגדרת היצירה
Python
Node.js
Go
קונכייה
Kotlin
Swift
Dart
Java
הגדרות בטיחות
Python
Node.js
Go
קונכייה
Kotlin
Swift
Dart
Java
הוראה למערכת
Python
Node.js
Go
קונכייה
Kotlin
Swift
Dart
Java
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכלול מופע של GenerateContentResponse
.
שיטה: AdjustModels.get
קבלת מידע על שירות כוונון מסוים.
נקודת קצה
הורדה
https://generativelanguage.googleapis.com/v1beta/{name=tunedModels/*}
פרמטרים של נתיב
name
string
חובה. שם המשאב של המודל.
פורמט: tunedModels/my-model-id
הוא מופיע בצורה tunedModels/{tunedmodel}
.
גוף הבקשה
גוף הבקשה חייב להיות ריק.
דוגמה לבקשה
Python
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכלול מופע של TunedModel
.
שיטה: formattedModels.list
רשימת מודלים מכווננים שנוצרו.
נקודת קצה
הורדה
https://generativelanguage.googleapis.com/v1beta/tunedModels
פרמטרים של שאילתה
pageSize
integer
זה שינוי אופציונלי. המספר המקסימלי של TunedModels
להחזרה (לכל דף). השירות עשוי להחזיר פחות מודלים מכווננים.
אם לא צוין, יוחזרו לכל היותר 10 מודלים מכווננים. שיטה זו מחזירה לכל היותר 1,000 מודלים לדף, גם אם מעבירים גודל דף גדול יותר.
pageToken
string
זה שינוי אופציונלי. אסימון דף, שהתקבל מקריאה קודמת ב-tunedModels.list
.
צריך לספק את ה-pageToken
שהוחזר על ידי בקשה אחת כארגומנט לבקשה הבאה כדי לאחזר את הדף הבא.
במהלך החלוקה לדפים, כל שאר הפרמטרים שסופקו ל-tunedModels.list
חייבים להתאים לקריאה שסיפקה את אסימון הדף.
filter
string
זה שינוי אופציונלי. מסנן הוא חיפוש טקסט מלא מעל התיאור והשם המוצג של המודל המכוונן. כברירת מחדל, התוצאות לא יכללו מודלים מכווננים ששותפו עם כולם.
אופרטורים נוספים: - owner:me - writes:me - ספרים:me - Reader:everyone
דוגמאות: "owner:me" מחזירה את כל המודלים המכווננים שבהם לפונקציית קריאה חוזרת (calls) יש תפקיד בעלים "Reads:me" מחזירה את כל המודלים המכווננים שבהם לפונקציית קריאה יש תפקיד קורא "Reads:everyone" מחזירה את כל המודלים המכווננים שמשותפים עם כולם
גוף הבקשה
גוף הבקשה חייב להיות ריק.
דוגמה לבקשה
Python
גוף התשובה
התשובה מ-tunedModels.list
שמכילה רשימה בחלוקה של מודלים.
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכיל נתונים במבנה הבא:
tunedModels[]
object (TunedModel
)
הדגמים שהוחזרו.
nextPageToken
string
אסימון, שניתן לשלוח בתור pageToken
כדי לאחזר את הדף הבא.
אם השדה הזה יושמט, אין דפים נוספים.
ייצוג JSON |
---|
{
"tunedModels": [
{
object ( |
שיטה: AdjustModels.patch
מעדכנות מודל שעבר כוונון.
נקודת קצה
תיקון
https://generativelanguage.googleapis.com/v1beta/{tunedModel.name=tunedModels/*}
PATCH https://generativelanguage.googleapis.com/v1beta/{tunedModel.name=tunedModels/*}
פרמטרים של נתיב
tunedModel.name
string
פלט בלבד. שם המודל המכוונן. שם ייחודי ייווצר במהלך היצירה. דוגמה: tunedModels/az2mb0bpw6i
אם displayName מוגדר בזמן היצירה, החלק המזהה של השם יוגדר על ידי שרשור המילים של displayName עם מקפים והוספת חלק אקראי של ייחודיות.
דוגמה:
- displayName =
Sentence Translator
- שם =
tunedModels/sentence-translator-u3b7m
הוא מופיע בצורהtunedModels/{tunedmodel}
.
פרמטרים של שאילתה
updateMask
string (FieldMask
format)
חובה. רשימת השדות לעדכון.
זוהי רשימה מופרדת בפסיקים של שמות שדות מלאים. דוגמה: "user.displayName,photo"
גוף הבקשה
גוף הבקשה מכיל מופע של TunedModel
.
displayName
string
זה שינוי אופציונלי. השם שיוצג למודל הזה בממשקי המשתמש. השם המוצג צריך להיות באורך של 40 תווים לכל היותר, כולל רווחים.
description
string
זה שינוי אופציונלי. תיאור קצר של המודל הזה.
tuningTask
object (TuningTask
)
חובה. משימת הכוונון שיוצרת את המודל המכוונן.
source_model
. המודל שמשמש כנקודת ההתחלה לכוונון. source_model
יכול להיות רק אחת מהאפשרויות הבאות:
tunedModelSource
object (TunedModelSource
)
זה שינוי אופציונלי. תוכנן לשימוש כנקודת ההתחלה לאימון המודל החדש.
temperature
number
זה שינוי אופציונלי. שליטה ברנדומיזציה של הפלט.
הערכים יכולים לנוע מעל [0.0,1.0]
, כולל. ערך קרוב יותר ל-1.0
יניב תשובות מגוונות יותר. לעומת זאת, ערך קרוב יותר ל-0.0
בדרך כלל יניב תשובות פחות מפתיעות מהמודל.
הערך הזה מציין את ערך ברירת המחדל שמשמש את המודל הבסיסי במהלך יצירת המודל.
topP
number
זה שינוי אופציונלי. לדגימת גרעין.
דגימת גרעין מביאה בחשבון את קבוצת האסימונים הקטנה ביותר שסכום ההסתברות שלהם הוא topP
לפחות.
הערך הזה מציין את ערך ברירת המחדל שמשמש את המודל הבסיסי במהלך יצירת המודל.
topK
integer
זה שינוי אופציונלי. לדגימת ה-Top-K.
דגימות מסוג 'אליפות במובילות' לוקחות בחשבון את קבוצת topK
האסימונים בעלי הסבירות הגבוהה ביותר. הערך הזה מציין את ברירת המחדל שתשמש את הקצה העורפי בזמן ביצוע הקריאה למודל.
הערך הזה מציין את ערך ברירת המחדל שמשמש את המודל הבסיסי במהלך יצירת המודל.
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכלול מופע של TunedModel
.
שיטה: AdjustModels.delete
מוחק מודל שעבר כוונון.
נקודת קצה
מחיקה
https://generativelanguage.googleapis.com/v1beta/{name=tunedModels/*}
פרמטרים של נתיב
name
string
חובה. שם המשאב של המודל. פורמט: tunedModels/my-model-id
הוא מופיע בצורה tunedModels/{tunedmodel}
.
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התשובה
אם הביצוע יהיה תקין, גוף התגובה יהיה ריק.
משאב REST: Adjustmodels
- משאב: AdjustdModel
- TunedModelSource
- מדינה (State)
- TuningTask
- TuningSnapshot
- מערך נתונים
- TuningExamples
- TuningExample
- היפר-פרמטרים
- שיטות
משאב: TidModel
מודל שעבר כוונון עדין שנוצר באמצעות ModelService.CreateTunedModel.
name
string
פלט בלבד. שם המודל המכוונן. שם ייחודי ייווצר במהלך היצירה. דוגמה: tunedModels/az2mb0bpw6i
אם displayName מוגדר בזמן היצירה, החלק המזהה של השם יוגדר על ידי שרשור המילים של displayName במקפים והוספת חלק אקראי של ייחודיות.
דוגמה:
- displayName =
Sentence Translator
- שם =
tunedModels/sentence-translator-u3b7m
displayName
string
זה שינוי אופציונלי. השם שיוצג למודל הזה בממשקי המשתמש. השם המוצג צריך להיות באורך של 40 תווים לכל היותר, כולל רווחים.
description
string
זה שינוי אופציונלי. תיאור קצר של המודל הזה.
state
enum (State
)
פלט בלבד. מצב המודל המכוונן.
createTime
string (Timestamp
format)
פלט בלבד. חותמת הזמן של מועד יצירת המודל.
חותמת זמן ב-RFC3339 UTC 'Zulu' בפורמט של רזולוציה של ננו-שנייה ועד תשע ספרות עשרוניות. דוגמאות: "2014-10-02T15:01:23Z"
ו-"2014-10-02T15:01:23.045123456Z"
.
updateTime
string (Timestamp
format)
פלט בלבד. חותמת הזמן שבה המודל הזה עודכן.
חותמת זמן ב-RFC3339 UTC 'Zulu' בפורמט של רזולוציה של ננו-שנייה ועד תשע ספרות עשרוניות. דוגמאות: "2014-10-02T15:01:23Z"
ו-"2014-10-02T15:01:23.045123456Z"
.
tuningTask
object (TuningTask
)
חובה. משימת הכוונון שיוצרת את המודל המכוונן.
source_model
. המודל שמשמש כנקודת ההתחלה לכוונון. source_model
יכול להיות רק אחת מהאפשרויות הבאות:
tunedModelSource
object (TunedModelSource
)
זה שינוי אופציונלי. תוכנן לשימוש כנקודת ההתחלה לאימון המודל החדש.
baseModel
string
בלתי ניתן לשינוי. השם של Model
לכוונון. לדוגמה: models/gemini-1.5-flash-001
temperature
number
זה שינוי אופציונלי. שליטה ברנדומיזציה של הפלט.
הערכים יכולים לנוע מעל [0.0,1.0]
, כולל. ערך קרוב יותר ל-1.0
יניב תשובות מגוונות יותר. לעומת זאת, ערך קרוב יותר ל-0.0
בדרך כלל יניב תשובות פחות מפתיעות מהמודל.
הערך הזה מציין את ערך ברירת המחדל שמשמש את המודל הבסיסי במהלך יצירת המודל.
topP
number
זה שינוי אופציונלי. לדגימת גרעין.
דגימת גרעין מביאה בחשבון את קבוצת האסימונים הקטנה ביותר שסכום ההסתברות שלהם הוא topP
לפחות.
הערך הזה מציין את ערך ברירת המחדל שמשמש את המודל הבסיסי במהלך יצירת המודל.
topK
integer
זה שינוי אופציונלי. לדגימת ה-Top-K.
דגימות מסוג 'אליפות במובילות' לוקחות בחשבון את קבוצת topK
האסימונים בעלי הסבירות הגבוהה ביותר. הערך הזה מציין את ברירת המחדל שתשמש את הקצה העורפי בזמן ביצוע הקריאה למודל.
הערך הזה מציין את ערך ברירת המחדל שמשמש את המודל הבסיסי במהלך יצירת המודל.
ייצוג JSON |
---|
{ "name": string, "displayName": string, "description": string, "state": enum ( |
TunedModelSource
מודל שעבר כוונון בתור מקור לאימון של מודל חדש.
tunedModel
string
בלתי ניתן לשינוי. השם של ה-TunedModel
שישמש כנקודת התחלה לאימון המודל החדש. לדוגמה: tunedModels/my-tuned-model
baseModel
string
פלט בלבד. שם הבסיס Model
שממנו TunedModel
בוצע כוונון. לדוגמה: models/gemini-1.5-flash-001
ייצוג JSON |
---|
{ "tunedModel": string, "baseModel": string } |
מדינה
מצב המודל המכוונן.
טיפוסים בני מנייה (enum) | |
---|---|
STATE_UNSPECIFIED |
ערך ברירת המחדל. הערך הזה לא בשימוש. |
CREATING |
המערכת יוצרת את המודל. |
ACTIVE |
המודל מוכן לשימוש. |
FAILED |
יצירת המודל נכשלה. |
TuningTask
כוונון משימות שיוצרות מודלים מכווננים.
startTime
string (Timestamp
format)
פלט בלבד. חותמת הזמן של תחילת הכוונון של המודל הזה.
חותמת זמן ב-RFC3339 UTC 'Zulu' בפורמט של רזולוציה של ננו-שנייה ועד תשע ספרות עשרוניות. דוגמאות: "2014-10-02T15:01:23Z"
ו-"2014-10-02T15:01:23.045123456Z"
.
completeTime
string (Timestamp
format)
פלט בלבד. חותמת הזמן של השלמת כוונון המודל הזה.
חותמת זמן ב-RFC3339 UTC 'Zulu' בפורמט של רזולוציה של ננו-שנייה ועד תשע ספרות עשרוניות. דוגמאות: "2014-10-02T15:01:23Z"
ו-"2014-10-02T15:01:23.045123456Z"
.
snapshots[]
object (TuningSnapshot
)
פלט בלבד. מדדים שנאספים במהלך הכוונון.
trainingData
object (Dataset
)
חובה. קלט בלבד. בלתי ניתן לשינוי. הנתונים לאימון המודל.
hyperparameters
object (Hyperparameters
)
בלתי ניתן לשינוי. היפר-פרמטרים ששולטים בתהליך הכוונון. אם לא תזינו אותו, המערכת תשתמש בערכי ברירת המחדל.
ייצוג JSON |
---|
{ "startTime": string, "completeTime": string, "snapshots": [ { object ( |
TuningSnapshot
מקליטים שלב כוונון אחד.
step
integer
פלט בלבד. שלב הכוונון.
epoch
integer
פלט בלבד. התקופה שהשלב הזה היה חלק ממנה.
meanLoss
number
פלט בלבד. אובדן ממוצע של דוגמאות האימון לשלב הזה.
computeTime
string (Timestamp
format)
פלט בלבד. חותמת הזמן של חישוב המדד.
חותמת זמן ב-RFC3339 UTC 'Zulu' בפורמט של רזולוציה של ננו-שנייה ועד תשע ספרות עשרוניות. דוגמאות: "2014-10-02T15:01:23Z"
ו-"2014-10-02T15:01:23.045123456Z"
.
ייצוג JSON |
---|
{ "step": integer, "epoch": integer, "meanLoss": number, "computeTime": string } |
מערך נתונים
מערך נתונים לאימון או לאימות.
dataset
. נתונים מוטבעים או הפניה לנתונים. dataset
יכול להיות רק אחת מהאפשרויות הבאות:
examples
object (TuningExamples
)
זה שינוי אופציונלי. דוגמאות בתוך השורה.
ייצוג JSON |
---|
{ // Union field |
TuningExamples
סדרה של דוגמאות לכוונון. הם יכולים להיות נתוני אימון או אימות.
examples[]
object (TuningExample
)
חובה. הדוגמאות. הקלט לדוגמה יכול להיות טקסט או דיון, אבל כל הדוגמאות בקבוצה חייבות להיות מאותו הסוג.
ייצוג JSON |
---|
{
"examples": [
{
object ( |
TuningExample
דוגמה אחת לכוונון.
output
string
חובה. הפלט הצפוי של המודל.
model_input
. הקלט למודל בשביל הדוגמה הזו. model_input
יכול להיות רק אחת מהאפשרויות הבאות:
textInput
string
זה שינוי אופציונלי. קלט של מודל טקסט.
ייצוג JSON |
---|
{ "output": string, // Union field |
היפר-פרמטרים
היפר-פרמטרים ששולטים בתהליך הכוונון. אפשר לקרוא מידע נוסף בכתובת https://ai.google.dev/docs/model_tuning_guidance.
learning_rate_option
. אפשרויות לציון קצב הלמידה במהלך כוונון. learning_rate_option
יכול להיות רק אחת מהאפשרויות הבאות:
learningRate
number
זה שינוי אופציונלי. בלתי ניתן לשינוי. ההיפר-פרמטר של קצב הלמידה לצורך כוונון. אם המדיניות לא מוגדרת, ערך ברירת המחדל הוא 0.001 או 0.0002 על סמך מספר דוגמאות האימון.
learningRateMultiplier
number
זה שינוי אופציונלי. בלתי ניתן לשינוי. המכפיל של קצב הלמידה משמש לחישוב שיעור הלמידה הסופי על סמך ערך ברירת המחדל (מומלץ). קצב הלמידה בפועל := LearningRateMultiplier * קצב הלמידה שמוגדר כברירת מחדל תלוי במודל הבסיס ובגודל של מערך הנתונים. אם המדיניות לא מוגדרת, המערכת תשתמש בברירת המחדל של 1.0.
epochCount
integer
בלתי ניתן לשינוי. מספר תקופות האימון. תקופה של זמן מערכת (epoch) היא מעבר אחד דרך נתוני האימון. אם המדיניות לא מוגדרת, נשתמש בברירת המחדל של 5.
batchSize
integer
בלתי ניתן לשינוי. ההיפר-פרמטר בגודל האצווה לצורך כוונון. אם המדיניות לא מוגדרת, המערכת תשתמש בברירת מחדל של 4 או 16 על סמך מספר דוגמאות האימון.
ייצוג JSON |
---|
{ // Union field |