Die Unterstützung für die Feinabstimmung durch die Gemini API bietet einen Mechanismus zur Auswahl der Ausgabe, wenn Sie ein kleines Dataset mit Eingabe-/Ausgabebeispielen haben. Weitere Informationen finden Sie in der Anleitung zur Modellabstimmung und der Anleitung.
Methode: tuneModels.create
- Endpunkt
- Anfrageparameter
- Anfragetext
- Antworttext
<ph type="x-smartling-placeholder">
- </ph>
- JSON-Darstellung
- Autorisierungsbereiche
- Beispielanfrage
<ph type="x-smartling-placeholder">
- </ph>
- Erstellen
Erstellt ein abgestimmtes Modell. Prüfen Sie den Zwischenschritt der Abstimmung (falls vorhanden) über den Dienst google.longrunning.Operations
.
Zugriffsstatus und Ergebnisse über den Operations-Dienst. Beispiel: GET /v1/tunedModels/az2mb0bpw6i/operations/000-111-222
Endpunkt
<ph type="x-smartling-placeholder"></ph> <ph type="x-smartling-placeholder"></ph> Beitrag
https://generativelanguage.googleapis.com/v1beta/tunedModels
Abfrageparameter
tunedModelId
string
Optional. Die eindeutige ID für das abgestimmte Modell, falls angegeben. Dieser Wert kann bis zu 40 Zeichen umfassen. Das erste Zeichen muss ein Buchstabe, das letzte Zeichen ein Buchstabe oder eine Zahl sein. Die ID muss mit dem regulären Ausdruck [a-z]([a-z0-9-]{0,38}[a-z0-9])?
übereinstimmen.
Anfragetext
Der Anfragetext enthält eine Instanz von TunedModel
.
displayName
string
Optional. Der Name, der für dieses Modell in Benutzeroberflächen angezeigt werden soll. Der Anzeigename darf maximal 40 Zeichen (einschließlich Leerzeichen) lang sein.
description
string
Optional. Eine kurze Beschreibung dieses Modells.
tuningTask
object (TuningTask
)
Erforderlich. Die Abstimmungsaufgabe, mit der das abgestimmte Modell erstellt wird.
source_model
. Das Modell, das als Ausgangspunkt für die Abstimmung verwendet wird. Für source_model
ist nur einer der folgenden Werte zulässig:
tunedModelSource
object (TunedModelSource
)
Optional. TunedModel, das als Ausgangspunkt zum Trainieren des neuen Modells verwendet wird.
baseModel
string
Nicht veränderbar. Der Name des abzustimmenden Model
. Beispiel: models/gemini-1.5-flash-001
temperature
number
Optional. Steuert die Zufälligkeit der Ausgabe.
Werte können über [0.0,1.0]
(einschließlich) liegen. Ein Wert, der näher bei 1.0
liegt, führt zu unterschiedlichen Antworten, während ein Wert, der näher bei 0.0
liegt, in der Regel zu weniger überraschenden Antworten des Modells führt.
Mit diesem Wert wird der Standardwert angegeben, der vom Basismodell beim Erstellen des Modells verwendet wird.
topP
number
Optional. Für Nucleus-Stichproben.
Bei der Nucleus-Stichprobe wird die kleinste Gruppe von Tokens berücksichtigt, deren Wahrscheinlichkeitssumme mindestens topP
beträgt.
Mit diesem Wert wird der Standardwert angegeben, der vom Basismodell beim Erstellen des Modells verwendet wird.
topK
integer
Optional. Für Top-K-Sampling.
Beim Top-K-Sampling wird die Gruppe der topK
wahrscheinlichsten Tokens berücksichtigt. Dieser Wert gibt die Standardeinstellung an, die vom Back-End beim Aufruf des Modells verwendet werden soll.
Mit diesem Wert wird der Standardwert angegeben, der vom Basismodell beim Erstellen des Modells verwendet wird.
Beispielanfrage
Python
Antworttext
Diese Ressource steht für einen lange laufenden Vorgang, der das Ergebnis eines Netzwerk-API-Aufrufs ist.
Bei Erfolg enthält der Antworttext Daten mit der folgenden Struktur:
name
string
Der vom Server zugewiesene Name, der nur innerhalb des Dienstes eindeutig ist, der ihn ursprünglich zurückgibt. Wenn Sie die Standard-HTTP-Zuordnung verwenden, sollte name
ein Ressourcenname sein, der auf operations/{unique_id}
endet.
metadata
object
Dienstspezifische Metadaten, die mit dem Vorgang verknüpft sind. Typischerweise enthalten sie Informationen zum Verlauf und gemeinsame Metadaten wie den Erstellungszeitpunkt. Solche Metadaten werden nicht von allen Diensten bereitgestellt. Jede Methode, die einen lange laufenden Vorgang zurückgibt, sollte gegebenenfalls den Metadatentyp dokumentieren.
Ein Objekt, das Felder eines beliebigen Typs enthält. Ein zusätzliches Feld "@type"
enthält einen URI zur Identifizierung des Typs. Beispiel: { "id": 1234, "@type": "types.example.com/standard/id" }
.
done
boolean
Ist der Wert false
, bedeutet das, dass der Vorgang noch läuft. Ist der Wert hingegen true
, ist der Vorgang abgeschlossen und entweder error
oder response
ist verfügbar.
result
. Das Ergebnis des Vorgangs kann entweder ein error
oder eine gültige response
sein. Wenn done
= false
ist, wird weder error
noch response
festgelegt. Wenn done
= true
ist, kann genau ein error
oder eine response
festgelegt werden. Einige Dienste liefern das Ergebnis möglicherweise nicht. Für result
ist nur einer der folgenden Werte zulässig:
error
object (Status
)
Das Fehlerergebnis des Vorgangs im Fall eines Fehlers oder Abbruchs.
response
object
Die normale, erfolgreiche Antwort des Vorgangs. Wenn die ursprüngliche Methode im Erfolgsfall keine Daten zurückgibt, wie bei Delete
, lautet die Antwort google.protobuf.Empty
. Ist die ursprüngliche Methode standardmäßig Get
/Create
/Update
, sollte die Antwort die Ressource sein. Bei anderen Methoden sollte die Antwort vom Typ XxxResponse
sein, wobei Xxx
der Name der ursprünglichen Methode ist. Wenn zum Beispiel der Name der ursprünglichen Methode TakeSnapshot()
ist, ist der gefolgerte Antworttyp TakeSnapshotResponse
.
Ein Objekt, das Felder eines beliebigen Typs enthält. Ein zusätzliches Feld "@type"
enthält einen URI zur Identifizierung des Typs. Beispiel: { "id": 1234, "@type": "types.example.com/standard/id" }
.
JSON-Darstellung |
---|
{ "name": string, "metadata": { "@type": string, field1: ..., ... }, "done": boolean, // Union field |
Methode: tuneModels.generateContent
- Endpunkt
- Pfadparameter
- Anfragetext
<ph type="x-smartling-placeholder">
- </ph>
- JSON-Darstellung
- Antworttext
- Autorisierungsbereiche
- Beispielanfrage <ph type="x-smartling-placeholder">
Erzeugt eine Modellantwort anhand einer GenerateContentRequest
-Eingabe. Ausführliche Informationen finden Sie im Leitfaden zur Textgenerierung. Die Eingabefunktionen unterscheiden sich zwischen den Modellen, einschließlich der abgestimmten Modelle. Weitere Informationen finden Sie in der Modellanleitung und im Abstimmungsleitfaden.
Endpunkt
<ph type="x-smartling-placeholder"></ph> <ph type="x-smartling-placeholder"></ph> Beitrag
https://generativelanguage.googleapis.com/v1beta/{model=tunedModels/*}:generateContent
Pfadparameter
model
string
Erforderlich. Der Name des Model
, der zum Generieren der Vervollständigung verwendet werden soll.
Format: name=models/{model}
. Sie hat das Format tunedModels/{tunedmodel}
.
Anfragetext
Der Anfragetext enthält Daten mit folgender Struktur:
<ph type="x-smartling-placeholder">contents[]
object (Content
)
Erforderlich. Der Inhalt der aktuellen Unterhaltung mit dem Modell.
Bei Einzelabfragen ist dies eine einzelne Instanz. Bei Abfragen mit mehreren Antworten wie chat ist dies ein wiederkehrendes Feld, das den Unterhaltungsverlauf und die letzte Anfrage enthält.
tools[]
object (Tool
)
Optional. Eine Liste von Tools
, die der Model
verwenden kann, um die nächste Antwort zu generieren.
Eine Tool
ist ein Code-Snippet, das dem System die Interaktion mit externen Systemen ermöglicht, um eine Aktion oder eine Reihe von Aktionen auszuführen, die außerhalb des Wissens und des Umfangs der Model
liegen. Unterstützte Tool
s sind Function
und codeExecution
. Weitere Informationen finden Sie unter Funktionsaufrufe und Codeausführung.
toolConfig
object (ToolConfig
)
Optional. Toolkonfiguration für eine in der Anfrage angegebene Tool
. Ein Anwendungsbeispiel finden Sie im Leitfaden zu Funktionsaufrufen.
safetySettings[]
object (SafetySetting
)
Optional. Eine Liste einzelner SafetySetting
-Instanzen zum Blockieren unsicherer Inhalte.
Dies wird am GenerateContentRequest.contents
und GenerateContentResponse.candidates
erzwungen. Es darf nicht mehr als eine Einstellung für jeden SafetyCategory
-Typ vorhanden sein. Die API blockiert alle Inhalte und Antworten, die die in diesen Einstellungen festgelegten Grenzwerte nicht erreichen. Diese Liste überschreibt die Standardeinstellungen für jeden in „safetySettings“ festgelegten SafetyCategory
. Wenn für eine bestimmte SafetyCategory
in der Liste keine SafetySetting
angegeben ist, verwendet die API die standardmäßige Sicherheitseinstellung für diese Kategorie. Die schädlichen Kategorien HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT und HARM_CATEGORY_HARASSMENT werden unterstützt. Ausführliche Informationen zu den verfügbaren Sicherheitseinstellungen findest du im Leitfaden. In den Sicherheitshinweisen erfahren Sie, wie Sie Sicherheitsaspekte in Ihren KI-Anwendungen berücksichtigen können.
systemInstruction
object (Content
)
Optional. Vom Entwickler festgelegte Systemanweisung(en). Derzeit nur Text.
generationConfig
object (GenerationConfig
)
Optional. Konfigurationsoptionen für Modellgenerierung und -ausgaben.
cachedContent
string
Optional. Der Name des im Cache gespeicherten Inhalts, der als Kontext für die Vorhersage verwendet werden soll. Format: cachedContents/{cachedContent}
Beispielanfrage
Text
Python
Node.js
Ok
Muschel
Kotlin
Swift
Dart
Java
Bild
Python
Node.js
Ok
Muschel
Kotlin
Swift
Dart
Java
Audio
Python
Node.js
Muschel
Video
Python
Node.js
Ok
Muschel
Python
Muschel
Chat
Python
Node.js
Ok
Muschel
Kotlin
Swift
Dart
Java
Cache
Python
Node.js
Abgestimmtes Modell
Python
JSON-Modus
Python
Node.js
Ok
Muschel
Kotlin
Swift
Dart
Java
Codeausführung
Python
Kotlin
Java
Funktionsaufrufe
Python
Node.js
Muschel
Kotlin
Swift
Dart
Java
Generierungskonfiguration
Python
Node.js
Ok
Muschel
Kotlin
Swift
Dart
Java
Sicherheitseinstellungen
Python
Node.js
Ok
Muschel
Kotlin
Swift
Dart
Java
Systemanweisung
Python
Node.js
Ok
Muschel
Kotlin
Swift
Dart
Java
Antworttext
Wenn der Vorgang erfolgreich abgeschlossen wurde, enthält der Antworttext eine Instanz von GenerateContentResponse
.
Methode: tuneModels.get
- Endpunkt
- Pfadparameter
- Anfragetext
- Antworttext
- Autorisierungsbereiche
- Beispielanfrage
<ph type="x-smartling-placeholder">
- </ph>
- Abrufen
Ruft Informationen zu einer bestimmten TunedModel ab.
Endpunkt
<ph type="x-smartling-placeholder"></ph> <ph type="x-smartling-placeholder"></ph> erhalten
https://generativelanguage.googleapis.com/v1beta/{name=tunedModels/*}
Pfadparameter
name
string
Erforderlich. Der Ressourcenname des Modells.
Format: tunedModels/my-model-id
. Das Format hat das Format tunedModels/{tunedmodel}
.
Anfragetext
Der Anfragetext muss leer sein.
Beispielanfrage
Python
Antworttext
Wenn der Vorgang erfolgreich abgeschlossen wurde, enthält der Antworttext eine Instanz von TunedModel
.
Methode: tuneModels.list
- Endpunkt
- Anfrageparameter
- Anfragetext
- Antworttext
<ph type="x-smartling-placeholder">
- </ph>
- JSON-Darstellung
- Autorisierungsbereiche
- Beispielanfrage
<ph type="x-smartling-placeholder">
- </ph>
- Liste
Listet erstellte abgestimmte Modelle auf.
Endpunkt
<ph type="x-smartling-placeholder"></ph> <ph type="x-smartling-placeholder"></ph> erhalten
https://generativelanguage.googleapis.com/v1beta/tunedModels
Abfrageparameter
pageSize
integer
Optional. Die maximale Anzahl von TunedModels
, die pro Seite zurückgegeben werden sollen. Der Dienst gibt möglicherweise weniger abgestimmte Modelle zurück.
Wenn nicht angegeben, werden maximal 10 abgestimmte Modelle zurückgegeben. Diese Methode gibt maximal 1.000 Modelle pro Seite zurück, selbst wenn Sie eine größere „pageSize“ übergeben.
pageToken
string
Optional. Ein Seitentoken, das von einem vorherigen tunedModels.list
-Aufruf empfangen wurde.
Geben Sie die von einer Anfrage zurückgegebene pageToken
als Argument für die nächste Anfrage an, um die nächste Seite abzurufen.
Beim Paginieren müssen alle anderen für tunedModels.list
bereitgestellten Parameter mit dem Aufruf übereinstimmen, der das Seitentoken bereitgestellt hat.
filter
string
Optional. Ein Filter ist eine Volltextsuche über die Beschreibung und den Anzeigenamen des abgestimmten Modells. Standardmäßig enthalten die Ergebnisse keine abgestimmten Modelle, die für alle freigegeben sind.
Zusätzliche Operatoren: - owner:me - writers:me - reader:me - reader:alle
Beispiele: „owner:ich“ gibt alle abgestimmten Modelle zurück, bei denen der Aufrufer die Inhaberrolle "readers:me" hat gibt alle abgestimmten Modelle zurück, für die der Aufrufer die Leserrolle "readers:Everyone" hat gibt alle abgestimmten Modelle zurück, die für alle freigegeben sind
Anfragetext
Der Anfragetext muss leer sein.
Beispielanfrage
Python
Antworttext
Antwort von tunedModels.list
, die eine paginierte Liste von Modellen enthält.
Bei Erfolg enthält der Antworttext Daten mit der folgenden Struktur:
tunedModels[]
object (TunedModel
)
Die zurückgegebenen Modelle.
nextPageToken
string
Ein Token, das als pageToken
gesendet werden kann, um die nächste Seite abzurufen.
Wenn dieses Feld weggelassen wird, sind keine Seiten mehr vorhanden.
JSON-Darstellung |
---|
{
"tunedModels": [
{
object ( |
Methode: tuneModels.patch
Aktualisiert ein abgestimmtes Modell.
Endpunkt
<ph type="x-smartling-placeholder"></ph> <ph type="x-smartling-placeholder"></ph> Patch
https://generativelanguage.googleapis.com/v1beta/{tunedModel.name=tunedModels/*}
PATCH https://generativelanguage.googleapis.com/v1beta/{tunedModel.name=tunedModels/*}
Pfadparameter
tunedModel.name
string
Nur Ausgabe. Der Name des abgestimmten Modells. Bei der Erstellung wird ein eindeutiger Name generiert. Beispiel: tunedModels/az2mb0bpw6i
Wenn „displayName“ beim Erstellen festgelegt wird, wird der ID-Teil des Namens festgelegt, indem die Wörter von „displayName“ mit Bindestrichen verkettet und zur Eindeutigkeit ein zufälliger Teil hinzugefügt wird.
Beispiel:
- displayName =
Sentence Translator
- name =
tunedModels/sentence-translator-u3b7m
Sie hat das FormattunedModels/{tunedmodel}
.
Abfrageparameter
updateMask
string (FieldMask
format)
Erforderlich. Die Liste der zu aktualisierenden Felder.
Dies ist eine durch Kommas getrennte Liste vollständig qualifizierter Feldnamen. Beispiel: "user.displayName,photo"
.
Anfragetext
Der Anfragetext enthält eine Instanz von TunedModel
.
displayName
string
Optional. Der Name, der für dieses Modell in Benutzeroberflächen angezeigt werden soll. Der Anzeigename darf maximal 40 Zeichen (einschließlich Leerzeichen) lang sein.
description
string
Optional. Eine kurze Beschreibung dieses Modells.
tuningTask
object (TuningTask
)
Erforderlich. Die Abstimmungsaufgabe, mit der das abgestimmte Modell erstellt wird.
source_model
. Das Modell, das als Ausgangspunkt für die Abstimmung verwendet wird. Für source_model
ist nur einer der folgenden Werte zulässig:
tunedModelSource
object (TunedModelSource
)
Optional. TunedModel, das als Ausgangspunkt zum Trainieren des neuen Modells verwendet wird.
temperature
number
Optional. Steuert die Zufälligkeit der Ausgabe.
Werte können über [0.0,1.0]
(einschließlich) liegen. Ein Wert, der näher bei 1.0
liegt, führt zu unterschiedlichen Antworten, während ein Wert, der näher bei 0.0
liegt, in der Regel zu weniger überraschenden Antworten des Modells führt.
Mit diesem Wert wird der Standardwert angegeben, der vom Basismodell beim Erstellen des Modells verwendet wird.
topP
number
Optional. Für Nucleus-Stichproben.
Bei der Nucleus-Stichprobe wird die kleinste Gruppe von Tokens berücksichtigt, deren Wahrscheinlichkeitssumme mindestens topP
beträgt.
Mit diesem Wert wird der Standardwert angegeben, der vom Basismodell beim Erstellen des Modells verwendet wird.
topK
integer
Optional. Für Top-K-Sampling.
Beim Top-K-Sampling wird die Gruppe der topK
wahrscheinlichsten Tokens berücksichtigt. Dieser Wert gibt die Standardeinstellung an, die vom Back-End beim Aufruf des Modells verwendet werden soll.
Mit diesem Wert wird der Standardwert angegeben, der vom Basismodell beim Erstellen des Modells verwendet wird.
Antworttext
Wenn der Vorgang erfolgreich abgeschlossen wurde, enthält der Antworttext eine Instanz von TunedModel
.
Methode: tuneModels.delete
Löscht ein abgestimmtes Modell.
Endpunkt
<ph type="x-smartling-placeholder"></ph> <ph type="x-smartling-placeholder"></ph> Löschen
https://generativelanguage.googleapis.com/v1beta/{name=tunedModels/*}
Pfadparameter
name
string
Erforderlich. Der Ressourcenname des Modells. Format: tunedModels/my-model-id
. Sie hat das Format tunedModels/{tunedmodel}
.
Anfragetext
Der Anfragetext muss leer sein.
Antworttext
Wenn der Vorgang erfolgreich ist, ist der Antworttext leer.
REST-Ressource: tuneModels
- Ressource: TunedModel
<ph type="x-smartling-placeholder">
- </ph>
- JSON-Darstellung
- TunedModelSource
<ph type="x-smartling-placeholder">
- </ph>
- JSON-Darstellung
- Bundesland
- TuningTask
<ph type="x-smartling-placeholder">
- </ph>
- JSON-Darstellung
- TuningSnapshot
<ph type="x-smartling-placeholder">
- </ph>
- JSON-Darstellung
- Datensatz
<ph type="x-smartling-placeholder">
- </ph>
- JSON-Darstellung
- TuningExamples
<ph type="x-smartling-placeholder">
- </ph>
- JSON-Darstellung
- TuningExample
<ph type="x-smartling-placeholder">
- </ph>
- JSON-Darstellung
- Hyperparameter
<ph type="x-smartling-placeholder">
- </ph>
- JSON-Darstellung
- Methoden
Ressource: TunedModel
Ein abgestimmtes Modell, das mit ModelService.CreateTunedModel erstellt wurde.
name
string
Nur Ausgabe. Der Name des abgestimmten Modells. Bei der Erstellung wird ein eindeutiger Name generiert. Beispiel: tunedModels/az2mb0bpw6i
Wenn „displayName“ beim Erstellen festgelegt wird, wird der ID-Teil des Namens festgelegt, indem die Wörter des displayName mit Bindestrichen verkettet und zur Eindeutigkeit ein zufälliger Teil hinzugefügt wird.
Beispiel:
- displayName =
Sentence Translator
- Name =
tunedModels/sentence-translator-u3b7m
displayName
string
Optional. Der Name, der für dieses Modell in Benutzeroberflächen angezeigt werden soll. Der Anzeigename darf maximal 40 Zeichen (einschließlich Leerzeichen) lang sein.
description
string
Optional. Eine kurze Beschreibung dieses Modells.
state
enum (State
)
Nur Ausgabe. Der Status des abgestimmten Modells.
createTime
string (Timestamp
format)
Nur Ausgabe. Der Zeitstempel für die Erstellung dieses Modells.
Ein Zeitstempel im Format RFC3339 UTC "Zulu" mit einer Auflösung im Nanosekundenbereich und bis zu neun Nachkommastellen. Beispiele: "2014-10-02T15:01:23Z"
und "2014-10-02T15:01:23.045123456Z"
.
updateTime
string (Timestamp
format)
Nur Ausgabe. Der Zeitstempel, zu dem dieses Modell aktualisiert wurde.
Ein Zeitstempel im Format RFC3339 UTC "Zulu" mit einer Auflösung im Nanosekundenbereich und bis zu neun Nachkommastellen. Beispiele: "2014-10-02T15:01:23Z"
und "2014-10-02T15:01:23.045123456Z"
.
tuningTask
object (TuningTask
)
Erforderlich. Die Abstimmungsaufgabe, mit der das abgestimmte Modell erstellt wird.
source_model
. Das Modell, das als Ausgangspunkt für die Abstimmung verwendet wird. Für source_model
ist nur einer der folgenden Werte zulässig:
tunedModelSource
object (TunedModelSource
)
Optional. TunedModel, das als Ausgangspunkt zum Trainieren des neuen Modells verwendet wird.
baseModel
string
Nicht veränderbar. Der Name des abzustimmenden Model
. Beispiel: models/gemini-1.5-flash-001
temperature
number
Optional. Steuert die Zufälligkeit der Ausgabe.
Werte können über [0.0,1.0]
(einschließlich) liegen. Ein Wert, der näher bei 1.0
liegt, führt zu unterschiedlichen Antworten, während ein Wert, der näher bei 0.0
liegt, in der Regel zu weniger überraschenden Antworten des Modells führt.
Mit diesem Wert wird der Standardwert angegeben, der vom Basismodell beim Erstellen des Modells verwendet wird.
topP
number
Optional. Für Nucleus-Stichproben.
Bei der Nucleus-Stichprobe wird die kleinste Gruppe von Tokens berücksichtigt, deren Wahrscheinlichkeitssumme mindestens topP
beträgt.
Mit diesem Wert wird der Standardwert angegeben, der vom Basismodell beim Erstellen des Modells verwendet wird.
topK
integer
Optional. Für Top-K-Sampling.
Beim Top-K-Sampling wird die Gruppe der topK
wahrscheinlichsten Tokens berücksichtigt. Dieser Wert gibt die Standardeinstellung an, die vom Back-End beim Aufruf des Modells verwendet werden soll.
Mit diesem Wert wird der Standardwert angegeben, der vom Basismodell beim Erstellen des Modells verwendet wird.
JSON-Darstellung |
---|
{ "name": string, "displayName": string, "description": string, "state": enum ( |
TunedModelSource
Abgestimmtes Modell als Quelle zum Trainieren eines neuen Modells.
tunedModel
string
Nicht veränderbar. Der Name des TunedModel
, der als Ausgangspunkt zum Trainieren des neuen Modells verwendet werden soll. Beispiel: tunedModels/my-tuned-model
baseModel
string
Nur Ausgabe. Der Name der Basis-Model
, über die dieser TunedModel
abgestimmt wurde. Beispiel: models/gemini-1.5-flash-001
JSON-Darstellung |
---|
{ "tunedModel": string, "baseModel": string } |
Status
Der Status des abgestimmten Modells.
Enums | |
---|---|
STATE_UNSPECIFIED |
Der Standardwert. Dieser Wert wird nicht verwendet. |
CREATING |
Das Modell wird erstellt. |
ACTIVE |
Das Modell ist einsatzbereit. |
FAILED |
Das Modell konnte nicht erstellt werden. |
TuningTask
Aufgaben abstimmen, die abgestimmte Modelle erstellen.
startTime
string (Timestamp
format)
Nur Ausgabe. Der Zeitstempel für den Start der Abstimmung dieses Modells.
Ein Zeitstempel im Format RFC3339 UTC "Zulu" mit einer Auflösung im Nanosekundenbereich und bis zu neun Nachkommastellen. Beispiele: "2014-10-02T15:01:23Z"
und "2014-10-02T15:01:23.045123456Z"
.
completeTime
string (Timestamp
format)
Nur Ausgabe. Der Zeitstempel für den Abschluss der Abstimmung dieses Modells.
Ein Zeitstempel im Format RFC3339 UTC "Zulu" mit einer Auflösung im Nanosekundenbereich und bis zu neun Nachkommastellen. Beispiele: "2014-10-02T15:01:23Z"
und "2014-10-02T15:01:23.045123456Z"
.
snapshots[]
object (TuningSnapshot
)
Nur Ausgabe. Während der Abstimmung erfasste Messwerte.
trainingData
object (Dataset
)
Erforderlich. Nur Eingabe. Nicht veränderbar. Die Trainingsdaten des Modells.
hyperparameters
object (Hyperparameters
)
Nicht veränderbar. Hyperparameter, die den Abstimmungsprozess steuern. Wenn keine Angabe erfolgt, werden Standardwerte verwendet.
JSON-Darstellung |
---|
{ "startTime": string, "completeTime": string, "snapshots": [ { object ( |
TuningSnapshot
Für einen einzelnen Abstimmungsschritt aufzeichnen.
step
integer
Nur Ausgabe. Der Abstimmungsschritt.
epoch
integer
Nur Ausgabe. Die Epoche, zu der dieser Schritt gehörte.
meanLoss
number
Nur Ausgabe. Der durchschnittliche Verlust der Trainingsbeispiele für diesen Schritt.
computeTime
string (Timestamp
format)
Nur Ausgabe. Der Zeitstempel, zu dem dieser Messwert berechnet wurde.
Ein Zeitstempel im Format RFC3339 UTC "Zulu" mit einer Auflösung im Nanosekundenbereich und bis zu neun Nachkommastellen. Beispiele: "2014-10-02T15:01:23Z"
und "2014-10-02T15:01:23.045123456Z"
.
JSON-Darstellung |
---|
{ "step": integer, "epoch": integer, "meanLoss": number, "computeTime": string } |
Dataset
Dataset für Training oder Validierung.
dataset
. Inline-Daten oder ein Verweis auf die Daten. Für dataset
ist nur einer der folgenden Werte zulässig:
examples
object (TuningExamples
)
Optional. Inline-Beispiele
JSON-Darstellung |
---|
{ // Union field |
TuningExamples
Eine Reihe von Abstimmungsbeispielen. Kann Trainings- oder Validierungsdaten sein.
examples[]
object (TuningExample
)
Erforderlich. Die Beispiele. Beispieleingaben können sich auf Text oder Diskussion beziehen, aber alle Beispiele in einer Reihe müssen vom gleichen Typ sein.
JSON-Darstellung |
---|
{
"examples": [
{
object ( |
TuningExample
Ein einzelnes Beispiel für die Abstimmung.
output
string
Erforderlich. Die erwartete Modellausgabe.
model_input
. Die Eingabe für das Modell in diesem Beispiel. Für model_input
ist nur einer der folgenden Werte zulässig:
textInput
string
Optional. Textmodelleingabe.
JSON-Darstellung |
---|
{ "output": string, // Union field |
Hyperparameter
Hyperparameter, die den Abstimmungsprozess steuern. Weitere Informationen finden Sie unter https://ai.google.dev/docs/model_tuning_guidance.
learning_rate_option
. Optionen zum Angeben der Lernrate während der Abstimmung. Für learning_rate_option
ist nur einer der folgenden Werte zulässig:
learningRate
number
Optional. Nicht veränderbar. Der Lernraten-Hyperparameter für die Abstimmung. Wenn die Richtlinie nicht konfiguriert ist, wird ein Standardwert von 0,001 oder 0,0002 basierend auf der Anzahl der Trainingsbeispiele berechnet.
learningRateMultiplier
number
Optional. Nicht veränderbar. Der Lernratenmultiplikator wird verwendet, um basierend auf dem Standardwert (empfohlen) eine endgültige Lernrate zu berechnen. Tatsächliche Lernrate := learningRateMultiplikator * Standardlernrate Die Standardlernrate ist vom Basismodell und der Dataset-Größe abhängig. Wenn die Richtlinie nicht konfiguriert ist, wird der Standardwert „1,0“ verwendet.
epochCount
integer
Nicht veränderbar. Die Anzahl der Trainingsphasen. Eine Epoche ist ein Durchlauf durch die Trainingsdaten. Wenn die Richtlinie nicht konfiguriert ist, wird der Standardwert 5 verwendet.
batchSize
integer
Nicht veränderbar. Der Batchgrößen-Hyperparameter für die Abstimmung. Wenn die Richtlinie nicht konfiguriert ist, wird je nach Anzahl der Trainingsbeispiele ein Standardwert von 4 oder 16 verwendet.
JSON-Darstellung |
---|
{ // Union field |