Skip to main content
Glama

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
NameRequiredDescriptionDefault
base_modelNoHuggingFace model ID (e.g. 'Qwen/Qwen2.5-Coder-7B-Instruct'). Required unless base_user_model_id is provided.
base_user_model_idNoID of a previously trained model. The base model is resolved automatically.
num_epochsNoTraining epochs
max_examplesNoMaximum examples
repo_size_mbNoApproximate repository size in MB (helps refine the estimate)

Implementation Reference

  • 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;
  • 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)",
          },
        },
      },
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cerebrixos-org/tuning-engines-cli'

If you have feedback or need assistance with the MCP directory API, please join our Discord server