estimate_job
Calculate fine-tuning job costs before submission to manage budget and balance. Provides estimated cost, range, and balance sufficiency for models like Qwen, Llama, and Mistral.
Instructions
Get a cost estimate for a fine-tuning job before submitting it. Returns estimated cost, cost range, current balance, and whether balance is sufficient. Always estimate before creating a job.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base_model | No | HuggingFace model ID (e.g. 'Qwen/Qwen2.5-Coder-7B-Instruct'). Required unless base_user_model_id is provided. | |
| base_user_model_id | No | ID of a previously trained model. The base model is resolved automatically. | |
| num_epochs | No | Training epochs | |
| max_examples | No | Maximum examples | |
| repo_size_mb | No | Approximate repository size in MB (helps refine the estimate) |
Implementation Reference
- src/client.ts:76-84 (handler)The actual client method that sends the request to the backend for job estimation.
async estimateJob(params: { base_model?: string; num_epochs?: number; max_examples?: number; repo_size_mb?: number; base_user_model_id?: string; }): Promise<any> { return this.request("POST", "/api/v1/jobs/estimate", params); } - src/mcp.ts:427-441 (registration)The MCP request handler that maps the "estimate_job" MCP tool request to the `client.estimateJob` method.
case "estimate_job": if (!args?.base_model && !args?.base_user_model_id) { return { content: [{ type: "text", text: "Error: either base_model or base_user_model_id is required" }], isError: true, }; } result = await client.estimateJob({ base_model: args?.base_model as string | undefined, base_user_model_id: args?.base_user_model_id as string | undefined, num_epochs: args?.num_epochs as number | undefined, max_examples: args?.max_examples as number | undefined, repo_size_mb: args?.repo_size_mb as number | undefined, }); break; - src/mcp.ts:208-234 (schema)MCP tool definition (schema) for "estimate_job".
{ name: "estimate_job", description: "Get a cost estimate for a fine-tuning job before submitting it. Returns estimated cost, cost range, current balance, and whether balance is sufficient. Always estimate before creating a job.", inputSchema: { type: "object" as const, properties: { base_model: { type: "string", description: "HuggingFace model ID (e.g. 'Qwen/Qwen2.5-Coder-7B-Instruct'). Required unless base_user_model_id is provided.", }, base_user_model_id: { type: "string", description: "ID of a previously trained model. The base model is resolved automatically.", }, num_epochs: { type: "number", description: "Training epochs" }, max_examples: { type: "number", description: "Maximum examples" }, repo_size_mb: { type: "number", description: "Approximate repository size in MB (helps refine the estimate)", }, }, }, },