• Compute
  • Customers
  • Pricing
Sign In
More Blog Posts
XDiscordLinkedInYouTube

Products

  • GPUs
  • Inference
  • Studio

Developers

  • Model library
  • Documentation
  • Glossary

Company

  • About Us
  • Blog
  • Events
  • Partnership
  • Scale
  • Career
  • Ambassador program
  • Mission & Vision

Popular models

    Stay in the loop

    By submitting, you acknowledge that we may collect and use the information you provide, which may include personal information.

    XDiscordLinkedInYouTube

    Copyright ©2026 All rights reserved.

    Privacy PolicyTerms of UseLegal Documentation
    More Blog Posts
    Other

    Which Providers Would You Recommend to Move an OpenAI SDK Prototype to a Managed Custom Model and Tune Its Runtime?

    October 22, 2026

    Only the connection settings change when an OpenAI SDK prototype moves to GMI Cloud: for basic chat calls, the base URL, the API key and the model name, because the API is OpenAI-compatible and the client library stays. Prime Inference then runs your own or fine-tuned weights on dedicated, single-tenant GPUs, loaded from Hugging Face, S3 or your own storage, and GMI's inference engineers tune the runtime for your model.

    The connection change sits in a config file. Engine choice, quantization, multi-GPU layout and keep-warm behavior are handled on GMI's side of the line.

    Four requirements for leaving a hosted frontier model

    • Your weights, not a catalog. The platform serves weights you trained or fine-tuned, from the storage where they already live.
    • Your existing client keeps working. The endpoint speaks the OpenAI request format, so the SDK stays and only its connection settings change.
    • Tuning is part of the service. Engine selection, quantization, multi-GPU layout and kernel work belong to the platform's engineers, applied to your model.
    • Isolation and a way to test first. Dedicated GPUs for your traffic only, no minimum contract, and trial capacity to measure on your own prompts.

    What changes in your code

    With the OpenAI Python SDK, the connection is three values: the base URL, the API key and the model name. The quickstart shows the pattern:

    from openai import OpenAI
    
    client = OpenAI(
        base_url="https://api.gmi-serving.com/v1",
        api_key="YOUR_GMI_API_KEY",
    )
    
    response = client.chat.completions.create(
        model="YOUR_MODEL_ID",
        messages=[{"role": "user", "content": "Hello"}],
    )

    GMI's Python and TypeScript clients are drop-in for the OpenAI SDK, and the developers page lists /v1/chat/completions, /v1/responses (the OpenAI Responses API) and /v1/messages (the Anthropic Messages API) behind one base URL and one key. In the console, Settings is where the API key for this migration gets created.

    The base URL above is the serverless endpoint. When your model runs on a dedicated deployment, the console shows that deployment's own endpoint URL and an example request once it reaches Running status, and you configure the client from that example. Pass the SDK's base_url the part of the example's address that comes before /chat/completions (for the serverless endpoint above, that is https://api.gmi-serving.com/v1), since a full request path such as .../v1/chat/completions is the form for direct HTTP calls. Take the model value from the example when you replace YOUR_MODEL_ID. Treat the base URL, key and model name as configuration read from the environment, so the connection change stays in one place. If the prototype also calls other providers, put each behind its own client object so only the custom-model client changes.

    These request behaviors, from GMI's LLM API reference, shape how you configure the client:

    Area What the API does What it means for your app
    Parameters Documented fields include tools, temperature, top_p, top_k, stop, response_format and stream Pass the fields your code already sets, as far as the target model supports them, through the same SDK calls
    JSON output response_format: {"type": "json_object"} turns on JSON mode Set it in the same create call your prototype uses
    Streaming The final chunk carries usage statistics Read token usage for accounting from that chunk
    Long inputs context_length_exceeded_behavior controls what happens when input exceeds the context length: truncate (the default) or error Set it to error if your app should handle oversized prompts itself
    Rate limits The serverless API applies tokens-per-minute limits by usage tier. Dedicated endpoints have no rate limit; the ceiling is the hardware you provision On dedicated endpoints, remove client-side throttling that only existed to respect the old provider's limits; on serverless, pace traffic to your organization's tier

    The OpenAI Python SDK passes fields it does not define through its extra_body request option, so provider-specific fields such as context_length_exceeded_behavior and top_k go there.

    From weights to a live endpoint

    Seven steps take your weights from storage to a live endpoint.

    1. Prove the client path on the API first. Create a key and send requests to a catalog model through the serverless endpoint. This exercises the connection change in your app while your weights are still being prepared.
    2. Put the weights where the platform can read them. Prime Inference loads from Hugging Face, S3 or your own storage. Keep the tokenizer and config files with the weights, and have the evaluation set that you froze for the previous provider ready.
    3. Register the model. Open My Models in the console, where your own fine-tuned or custom models are kept for deployments to target, and click Create Model.
    4. Create the deployment. On the Deployments page, the Create Deployment wizard takes the model, region, GPU type and scaling. The next screen confirms GPU type, deployment name and auto-scaling policy. The Dedicated Endpoint guide walks through each screen. You can also deploy from the CLI or API.
    5. Wait for Running. A deployment moves through Queued, Deploying and Running. Billing applies only while it is Running, and a Stopped deployment can be restarted later. Archived is permanent.
    6. Swap the config and replay. Point a staging copy of your app at the new endpoint and replay the evaluation set. Compare output quality first, then time to first token, tokens per second and error rate.
    7. Shift traffic in stages. Send a small share, watch tail latency and errors, then raise it. Keep the old provider configured until the numbers hold.

    Sizing the GPUs

    Weight memory sets your first GPU choice. In 16-bit precision, each parameter takes 2 bytes, so a 70-billion-parameter model needs about 140 GB for weights alone. That does not fit on one 80 GB H100, and it leaves almost nothing on a 141 GB H200 for the KV cache that grows with context length and concurrency. Two or more GPUs per replica, or a quantized build, are the realistic options. An 8-billion-parameter model needs about 16 GB for weights, which leaves room for KV cache and runtime overhead on a single GPU, with the exact headroom depending on context length and concurrency.

    The Prime setup step asks for GPU type, GPUs per replica and replica count. Memory for weights and KV cache drives the first two together, and the traffic you need to serve drives replica count.

    Runtime tuning for a fine-tuned model

    On Prime Inference, GMI's engineers cover:

    • Engine selection. vLLM, TensorRT-LLM and SGLang, pre-tuned per GPU class, so a deployment starts from a tuned baseline and model-specific work builds on it. Models load on this stack without re-engineering the serving layer.
    • Per-model optimization. Kernel, scheduling and routing work for your model.
    • Quantization. Configurable; your test set decides whether a lower-precision build is good enough.
    • Multi-GPU orchestration. Handled by the platform.
    • Warm capacity. Reserved GPUs keep weights pre-loaded, so calls do not hit a cold start.
    • Scaling. Burst capacity absorbs spikes on top of the reserved baseline, and capacity scales down gracefully.

    Four inputs come from your team:

    • The evaluation set and quality threshold. A fine-tuned model can behave differently after quantization in exactly the areas you fine-tuned for, and your test set decides whether a lower-precision build is acceptable.
    • The latency budget. First-token latency and per-user speed targets, set before tuning begins, so the work has a stopping point.
    • The base architecture and any custom components. Tell GMI's engineers what the model is derived from and what you changed, so engine and kernel choices start from the right place.
    • The traffic forecast. Peak concurrency, input and output lengths and daily shape set replica counts and region choices.

    GPU classes and regions for custom weights

    The hardware options for custom weights are:

    GPU Memory Where it fits
    H100 80 GB HBM3 General LLM and multimodal inference for small and mid-size custom models
    H200 141 GB HBM3e Larger weights, long context, big KV cache and batch sizes
    B200 Blackwell, pre-order Frontier-size models and FP4 inference
    B300 288 GB HBM3e, pre-order Very large models and ultra-long context

    H100 and H200 are available now. B200 and B300 are available for pre-order. Build the first deployment on Hopper, and use the same evaluation set when you add Blackwell capacity.

    Data for a custom model may be tied to a jurisdiction, so region is part of the first deployment: endpoints can be pinned to a region for latency or locked to one for data residency, across Prime's Asia-Pacific, North America and Europe locations. Prime Inference also offers isolated runtimes, audit logs and zero-retention serving for regulated workloads.

    Commitment and reliability

    Prime Inference has no minimum contract and bills on demand by the GPU-hour. Steady traffic can move to seasonal or annual reserved capacity at a lower hourly rate, and qualified prospects receive free GPU-hour trial credits for testing on their own workload. The committed uptime SLA, which starts from a 99.9% figure, is settled in the contract discussion.

    Per-token serverless pricing and per-GPU-hour dedicated pricing cross over at a utilization point that depends on your traffic. For custom weights, size the decision on GPU-hours and the throughput you measure in step 6.

    First week: client, weights, tuning

    Point the prototype's client at GMI's serverless endpoint with a catalog model to exercise the connection change. In parallel, register your weights in My Models and create a deployment on H100 or H200 sized by the memory arithmetic above. Replay your evaluation set, then bring the results to GMI's engineers for runtime tuning before traffic moves.

    GMI sales can set up custom tuning, reserved capacity and trial credits alongside it.

    Colin Mo

    Build AI Without Limits

    GMI Cloud helps you architect, deploy, optimize, and scale your AI strategies

    Ready to build?

    Explore powerful AI models and launch your project in just a few clicks.

    Get Started