from mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.fine_tuning.create(model="meetkai:functionary-medium", training_file="file_abc123", suffix="my-model", method={
"type": "supervised",
"supervised": {
"hyperparameters": {
"n_epochs": 3,
},
},
})
# Handle response
print(res){
"id": "ftjob_aa87e2b1112a455b8deabed784372198",
"object": "fine_tuning.job",
"created_at": 1704067200,
"model": "meetkai:functionary-medium",
"training_file": "file_abc123",
"validation_file": null,
"fine_tuned_model": null,
"organization_id": "org-123",
"status": "running",
"result_files": [],
"seed": 42,
"hyperparameters": {
"n_epochs": 3,
"batch_size": "auto",
"learning_rate_multiplier": "auto"
},
"method": {
"type": "supervised",
"supervised": {
"hyperparameters": {
"n_epochs": 3
}
}
},
"finished_at": null,
"estimated_finish": null,
"trained_tokens": null,
"error": null,
"integrations": null,
"metadata": {
"experiment": "v1"
},
"suffix": "my-model"
}Creates a fine-tuning job which begins the process of training a new model from a given dataset.
from mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.fine_tuning.create(model="meetkai:functionary-medium", training_file="file_abc123", suffix="my-model", method={
"type": "supervised",
"supervised": {
"hyperparameters": {
"n_epochs": 3,
},
},
})
# Handle response
print(res){
"id": "ftjob_aa87e2b1112a455b8deabed784372198",
"object": "fine_tuning.job",
"created_at": 1704067200,
"model": "meetkai:functionary-medium",
"training_file": "file_abc123",
"validation_file": null,
"fine_tuned_model": null,
"organization_id": "org-123",
"status": "running",
"result_files": [],
"seed": 42,
"hyperparameters": {
"n_epochs": 3,
"batch_size": "auto",
"learning_rate_multiplier": "auto"
},
"method": {
"type": "supervised",
"supervised": {
"hyperparameters": {
"n_epochs": 3
}
}
},
"finished_at": null,
"estimated_finish": null,
"trained_tokens": null,
"error": null,
"integrations": null,
"metadata": {
"experiment": "v1"
},
"suffix": "my-model"
}Documentation Index
Fetch the complete documentation index at: https://docs.mka1.com/llms.txt
Use this file to discover all available pages before exploring further.
Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
The base model to fine-tune
File ID of the training data JSONL file
File ID of the validation data JSONL file
Suffix appended to the fine-tuned model name
64Seed for reproducibility
-9007199254740991 <= x <= 9007199254740991Deprecated: use method instead
Show child attributes
Fine-tuning method configuration
Show child attributes
External integrations
Show child attributes
Up to 16 key-value pairs
Show child attributes
OK
-9007199254740991 <= x <= 9007199254740991validating_files, queued, running, succeeded, failed, cancelled -9007199254740991 <= x <= 9007199254740991Show child attributes
Show child attributes
-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991Show child attributes
Show child attributes
Show child attributes
Was this page helpful?