إنّ ميزة الضبط الدقيق في Gemini API توفّر آلية لتنظيم النتائج عندما تكون لديك مجموعة بيانات صغيرة من أمثلة الإدخال/الإخراج. لمزيد من التفاصيل، يمكنك الاطّلاع على دليل ضبط النماذج والبرنامج التعليمي.
الطريقة: recognizedModels.create
تنشئ نموذجًا مضبوطًا. تحقَّق من مستوى تقدّم الضبط المتوسط (إن وُجد) من خلال خدمة google.longrunning.Operations
.
الوصول إلى الحالة والنتائج من خلال خدمة العمليات مثال: GET /v1/tunedModels/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
)
اختياريّ. Tuned Model لاستخدامه كنقطة بداية لتدريب النموذج الجديد.
baseModel
string
غير قابل للتغيير. اسم Model
المطلوب توليفه. مثلاً: models/gemini-1.5-flash-001
temperature
number
اختياريّ. تتحكّم هذه السياسة في التوزيع العشوائي للمخرج.
يمكن أن تتجاوز القيم [0.0,1.0]
، بشكل شامل. أمّا القيمة الأقرب من 1.0
، فستؤدي إلى ردود أكثر تنوعًا، في حين تؤدي القيمة الأقرب من 0.0
عادةً إلى استجابات أقل إثارة للدهشة من النموذج.
تحدّد هذه القيمة القيمة التلقائية لتكون القيمة التي يستخدمها النموذج الأساسي أثناء إنشاء النموذج.
topP
number
اختياريّ. لأخذ عينات من النواة
ويأخذ أخذ العينات من النواة بعين الاعتبار أصغر مجموعة من الرموز المميّزة التي يكون مجموع احتمالية حدوثها topP
على الأقل.
تحدّد هذه القيمة القيمة التلقائية لتكون القيمة التي يستخدمها النموذج الأساسي أثناء إنشاء النموذج.
topK
integer
اختياريّ. بالنسبة إلى أخذ العيّنات في المستوى الأعلى.
وفي أخذ العيّنات الأعلى درجة في الاعتبار، يتم جمع topK
من الرموز المميّزة الأكثر ترجيحًا. تحدد هذه القيمة القيمة التلقائية التي سيتم استخدامها بواسطة الخلفية أثناء إجراء طلب إلى النموذج.
تحدّد هذه القيمة القيمة التلقائية لتكون القيمة التي يستخدمها النموذج الأساسي أثناء إنشاء النموذج.
مثال على الطلب
Python
نص الاستجابة
يمثّل هذا المورد عملية طويلة الأمد ناتجة عن طلب بيانات من واجهة برمجة التطبيقات للشبكة.
إذا كانت الاستجابة ناجحة، سيحتوي نص الاستجابة على بيانات بالبنية التالية:
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
هو اسم الطريقة الأصلي. على سبيل المثال، إذا كان اسم الطريقة الأصلي هو TakeSnapshot()
، يكون نوع الردّ المستنتَج هو TakeSnapshotResponse
.
كائن يحتوي على حقول من نوع عشوائي يحتوي الحقل الإضافي "@type"
على معرف موارد منتظم (URI) يحدّد النوع. مثال: { "id": 1234, "@type": "types.example.com/standard/id" }
تمثيل JSON |
---|
{ "name": string, "metadata": { "@type": string, field1: ..., ... }, "done": boolean, // Union field |
الطريقة: recognizedModels.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
. ستحظر واجهة برمجة التطبيقات أي محتوى واستجابات لا تستوفي الحدود الدنيا التي حدّدتها هذه الإعدادات. تلغي هذه القائمة الإعدادات التلقائية لكل SafetyCategory
محدّدة في "إعدادات الأمان". في حال عدم توفّر SafetySetting
لعنصر SafetyCategory
معيّن في القائمة، ستستخدم واجهة برمجة التطبيقات إعداد الأمان التلقائي لهذه الفئة. فئات الضرر HARM_CATEGORY_HATE_SPEECH وHARM_CATEGORY_SEXUALLY_EXPLICIT وHARM_CATEGORY_DANGEROUS_CONTENT وHARM_CATEGORY_HARASSMENT متاحة. راجِع الدليل للحصول على معلومات مفصّلة عن إعدادات الأمان المتاحة. يمكنك أيضًا الاطّلاع على إرشادات السلامة لمعرفة كيفية دمج اعتبارات الأمان في تطبيقات الذكاء الاصطناعي.
systemInstruction
object (Content
)
اختياريّ. تعليمات النظام التي ضبطها المطوّر وهي متاحة حاليًا عبر الرسائل النصية فقط.
generationConfig
object (GenerationConfig
)
اختياريّ. خيارات الضبط لإنشاء النماذج والنتائج
cachedContent
string
اختياريّ. اسم المحتوى المخزّن مؤقتًا لاستخدامه كسياق لعرض عبارة البحث المقترحة تنسيق الملف: cachedContents/{cachedContent}
مثال على الطلب
النص
Python
Node.js
البدء
صَدفة
Kotlin
Swift
Dart
Java
صورة
Python
Node.js
البدء
صَدفة
Kotlin
Swift
Dart
Java
الصوت
Python
Node.js
صَدفة
فيديو
Python
Node.js
البدء
صَدفة
Python
صَدفة
دردشة
Python
Node.js
البدء
صَدفة
Kotlin
Swift
Dart
Java
ذاكرة التخزين المؤقت
Python
Node.js
نموذج تم ضبطه
Python
وضع JSON
Python
Node.js
البدء
صَدفة
Kotlin
Swift
Dart
Java
تنفيذ الرمز البرمجي
Python
Kotlin
Java
استدعاء الدالة
Python
Node.js
صَدفة
Kotlin
Swift
Dart
Java
إعدادات الإنشاء
Python
Node.js
البدء
صَدفة
Kotlin
Swift
Dart
Java
إعدادات الأمان
Python
Node.js
البدء
صَدفة
Kotlin
Swift
Dart
Java
تعليمات النظام
Python
Node.js
البدء
صَدفة
Kotlin
Swift
Dart
Java
نص الاستجابة
إذا كانت الاستجابة ناجحة، يحتوي نص الاستجابة على مثال GenerateContentResponse
.
الطريقة: recognizedModels.get
الحصول على معلومات عن طراز TunedModel محدّد
نقطة نهاية
الحصول على
https://generativelanguage.googleapis.com/v1beta/{name=tunedModels/*}
مَعلمات المسار
name
string
مطلوب. اسم المورد للنموذج.
التنسيق: tunedModels/my-model-id
يأخذ الشكل tunedModels/{tunedmodel}
.
نص الطلب
يجب أن يكون نص الطلب فارغًا.
مثال على الطلب
Python
نص الاستجابة
إذا كانت الاستجابة ناجحة، يحتوي نص الاستجابة على مثال TunedModel
.
الطريقة: recognizedModels.list
تم إنشاء نماذج مضبوطة من قِبل القوائم.
نقطة نهاية
الحصول على
https://generativelanguage.googleapis.com/v1beta/tunedModels
معامِلات طلب البحث
pageSize
integer
اختياريّ. الحد الأقصى لعدد TunedModels
التي يمكن عرضها (لكل صفحة). قد تعرض الخدمة عددًا أقل من النماذج التي تم ضبطها.
وفي حال عدم تحديد ذلك، سيتم عرض 10 طُرز تم ضبطها كحدّ أقصى. تعرض هذه الطريقة 1000 نموذج كحد أقصى لكل صفحة، حتى إذا قمت بتجاوز حجم صفحة أكبر.
pageToken
string
اختياريّ. رمز مميّز للصفحة، تم تلقّيه من استدعاء سابق لتطبيق "tunedModels.list
".
يمكنك تقديم pageToken
الذي يعرضه طلب واحد كوسيطة للطلب التالي لاسترداد الصفحة التالية.
عند التقسيم على صفحات، يجب أن تتطابق جميع المَعلمات الأخرى المقدَّمة إلى tunedModels.list
مع الاستدعاء الذي قدّم الرمز المميّز للصفحة.
filter
string
اختياريّ. الفلتر هو بحث عن النص الكامل على وصف النموذج الذي تم ضبطه واسمه المعروض. لن تشمل النتائج تلقائيًا النماذج التي تم ضبطها والتي تتم مشاركتها مع الجميع.
عوامل التشغيل الإضافية: - owner:me - writers:me - readers:أنا - القراء:الجميع
أمثلة: "owner:me" جميع النماذج التي تم ضبطها التي تم تعيين دور المالك لها "readers:me" جميع النماذج التي تم ضبطها والتي يكون للمتصل دور القارئ فيها "readers:جميع". جميع النماذج التي تم ضبطها والتي تتم مشاركتها مع الجميع
نص الطلب
يجب أن يكون نص الطلب فارغًا.
مثال على الطلب
Python
نص الاستجابة
استجابة من tunedModels.list
تحتوي على قائمة النماذج المقسّمة على صفحات.
إذا كانت الاستجابة ناجحة، سيحتوي نص الاستجابة على بيانات بالبنية التالية:
tunedModels[]
object (TunedModel
)
الطُرز التي تم إرجاعها.
nextPageToken
string
رمز مميز يمكن إرساله على شكل pageToken
لاسترداد الصفحة التالية.
إذا تم حذف هذا الحقل، يعني هذا أنّه لا يتوفّر المزيد من الصفحات.
تمثيل JSON |
---|
{
"tunedModels": [
{
object ( |
الطريقة: recognizedModels.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 =
Sentence Translator
- name =
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
اختياريّ. بالنسبة إلى أخذ العيّنات في المستوى الأعلى.
وفي أخذ العيّنات الأعلى درجة في الاعتبار، يتم جمع topK
من الرموز المميّزة الأكثر ترجيحًا. تحدد هذه القيمة القيمة التلقائية التي سيتم استخدامها بواسطة الخلفية أثناء إجراء طلب إلى النموذج.
تحدّد هذه القيمة القيمة التلقائية لتكون القيمة التي يستخدمها النموذج الأساسي أثناء إنشاء النموذج.
نص الاستجابة
إذا كانت الاستجابة ناجحة، يحتوي نص الاستجابة على مثال TunedModel
.
الطريقة: recognizedModels.delete
يؤدي هذا الإجراء إلى حذف نموذج تم ضبطه.
نقطة نهاية
حذف
https://generativelanguage.googleapis.com/v1beta/{name=tunedModels/*}
مَعلمات المسار
name
string
مطلوب. اسم المورد للنموذج. التنسيق: tunedModels/my-model-id
يأخذ الشكل tunedModels/{tunedmodel}
.
نص الطلب
يجب أن يكون نص الطلب فارغًا.
نص الاستجابة
إذا كانت الاستجابة ناجحة، يكون نص الاستجابة فارغًا.
مورد REST: recognizedModels
- المورد: TunedModel
- TunedModelSource
- الولاية
- TuningTask
- TuningSnapshot
- مجموعة البيانات
- TuningExamples
- TuningExample
- المعلَمات الفائقة
- الطُرق
المرجع: TunedModel
نموذج محسَّن تم إنشاؤه باستخدام modelService.CreateTunedModel
name
string
النتائج فقط. اسم الطراز الذي تم ضبطه سيتم إنشاء اسم فريد عند الإنشاء. مثال: tunedModels/az2mb0bpw6i
إذا تم ضبط اسم العرض عند الإنشاء، سيتم ضبط جزء المعرّف في الاسم من خلال سلسلة كلمات DisplayName مع واصلات وإضافة جزء عشوائي لتحقيق التفرد.
مثال:
- DisplayName =
Sentence Translator
- الاسم =
tunedModels/sentence-translator-u3b7m
displayName
string
اختياريّ. الاسم الذي سيتم عرضه لهذا النموذج في واجهات المستخدم يجب ألا يزيد طول الاسم المعروض عن 40 حرفًا، شاملاً المسافات.
description
string
اختياريّ. اكتب وصفًا موجزًا لهذا النموذج.
state
enum (State
)
النتائج فقط. حالة النموذج الذي تم ضبطه.
createTime
string (Timestamp
format)
النتائج فقط. الطابع الزمني لوقت إنشاء هذا النموذج.
طابع زمني بتنسيق RFC3339 حسب التوقيت العالمي المنسَّق (UTC) "زولو" بدقة نانوثانية وما يصل إلى تسعة أرقام كسرية. أمثلة: "2014-10-02T15:01:23Z"
و"2014-10-02T15:01:23.045123456Z"
.
updateTime
string (Timestamp
format)
النتائج فقط. الطابع الزمني لوقت تحديث هذا النموذج.
طابع زمني بتنسيق RFC3339 حسب التوقيت العالمي المنسَّق (UTC) "زولو" بدقة نانوثانية وما يصل إلى تسعة أرقام كسرية. أمثلة: "2014-10-02T15:01:23Z"
و"2014-10-02T15:01:23.045123456Z"
.
tuningTask
object (TuningTask
)
مطلوب. مهمة الضبط التي تؤدي إلى إنشاء النموذج الذي تم ضبطه.
source_model
. النموذج المستخدم كنقطة بداية للتوليف. يمكن أن يكون source_model
واحدًا فقط مما يلي:
tunedModelSource
object (TunedModelSource
)
اختياريّ. Tuned Model لاستخدامه كنقطة بداية لتدريب النموذج الجديد.
baseModel
string
غير قابل للتغيير. اسم Model
المطلوب توليفه. مثلاً: models/gemini-1.5-flash-001
temperature
number
اختياريّ. تتحكّم هذه السياسة في التوزيع العشوائي للمخرج.
يمكن أن تتجاوز القيم [0.0,1.0]
، بشكل شامل. أمّا القيمة الأقرب من 1.0
، فستؤدي إلى ردود أكثر تنوعًا، في حين تؤدي القيمة الأقرب من 0.0
عادةً إلى استجابات أقل إثارة للدهشة من النموذج.
تحدّد هذه القيمة القيمة التلقائية لتكون القيمة التي يستخدمها النموذج الأساسي أثناء إنشاء النموذج.
topP
number
اختياريّ. لأخذ عينات من النواة
ويأخذ أخذ العينات من النواة بعين الاعتبار أصغر مجموعة من الرموز المميّزة التي يكون مجموع احتمالية حدوثها topP
على الأقل.
تحدّد هذه القيمة القيمة التلقائية لتكون القيمة التي يستخدمها النموذج الأساسي أثناء إنشاء النموذج.
topK
integer
اختياريّ. بالنسبة إلى أخذ العيّنات في المستوى الأعلى.
وفي أخذ العيّنات الأعلى درجة في الاعتبار، يتم جمع 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 } |
الحالة
حالة النموذج الذي تم ضبطه.
عمليات التعداد | |
---|---|
STATE_UNSPECIFIED |
القيمة التلقائية. هذه القيمة غير مستخدمة. |
CREATING |
يتم الآن إنشاء النموذج. |
ACTIVE |
النموذج جاهز للاستخدام. |
FAILED |
تعذّر إنشاء النموذج. |
TuningTask
ضبط المهام التي تنشئ نماذج مضبوطة.
startTime
string (Timestamp
format)
النتائج فقط. الطابع الزمني عند ضبط هذا النموذج
طابع زمني بتنسيق RFC3339 حسب التوقيت العالمي المنسَّق (UTC) "زولو" بدقة نانوثانية وما يصل إلى تسعة أرقام كسرية. أمثلة: "2014-10-02T15:01:23Z"
و"2014-10-02T15:01:23.045123456Z"
.
completeTime
string (Timestamp
format)
النتائج فقط. اكتمل الطابع الزمني عند ضبط هذا النموذج.
طابع زمني بتنسيق RFC3339 حسب التوقيت العالمي المنسَّق (UTC) "زولو" بدقة نانوثانية وما يصل إلى تسعة أرقام كسرية. أمثلة: "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) "زولو" بدقة نانوثانية وما يصل إلى تسعة أرقام كسرية. أمثلة: "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
اختياريّ. غير قابل للتغيير. يتم استخدام مضاعف معدّل التعلُّم لاحتساب قيمة LearningRate النهائية استنادًا إلى القيمة التلقائية (الموصى بها). معدّل التعلّم الفعلي := learningRateMultipleer * معدل التعلم التلقائي يعتمد على النموذج الأساسي وحجم مجموعة البيانات. وفي حال تم ترك السياسة بدون ضبط، يتم استخدام القيمة التلقائية 1.0.
epochCount
integer
غير قابل للتغيير. عدد الفترات التدريبية. الحقبة هي مرحلة واحدة من خلال بيانات التدريب. وفي حال ترك هذه السياسة بدون ضبط، سيتم استخدام القيمة التلقائية 5.
batchSize
integer
غير قابل للتغيير. يشير ذلك المصطلح إلى المَعلمة الفائقة لحجم الدفعة لعملية الضبط. وفي حال ترك هذه السياسة بدون ضبط، سيتم استخدام القيمة التلقائية 4 أو 16 استنادًا إلى عدد أمثلة التدريب.
تمثيل JSON |
---|
{ // Union field |