app.nzapp
AppsProjectsReposPullsChatIntegrationsGatewayModelsEvalsToolsDatasetsMCPDeploysPricingBlogDocsAssistantsCharactersArtMusic
Sign inStart building
Agent stack
Cloud coding agentAgents SDKIntegrationsBrowser agentMonitors & auto-agentsSchedulersAgent skillsMCP serversDeep research
Models & API
AI GatewayModel catalogModel evalsModel spacesPlaygroundText to imageImage to 3DText to 3DMusic & SFXAudio editorMedia optimizerAI art & libraryChatAPI referenceSchemaBecome a provider
Compute & hosting
DeploysAddonsPostgres hostinggobed vector searchSite hostingAnalyticsCog GPU hostingRL trainingBuilds & CIWorkersTask queuesDomainsGit hosting
Tools
AI toolsDrawDiffusion canvasLive DrawWriteSheetsArtifactsVideo studioNotebooksDatasets
Learn
DocsBlogEval guidesPrompt libraryCLIAlternativesPapersAI charactersArt gallerySecurityConsulting
Company
PricingEnterpriseSettingsBillingStatusInvestorsCreate accountTerms of ServicePrivacy Policy
app.nzapp.nz

AI agent cloud for coding, deploys, model routing, and research. Built for teams shipping software.

Built in New Zealand by App AI NZ.

Social
X / TwitterGitHubYouTube
The app.nz network
GpuBrainPapersReading TimemojojojoNetwrckText-Generator.ioCodex InfinityOpenPathsCuteDSLAI Art GeneratorAIArt-Generator.artSiteSimSimplexGenDictatorFlowWebFiddleRing.nzChatGibidyBitBankExperimentFlowEvangelerHires.nzHow.nzV5 GamesAddicting Word GamesBig Multiplayer ChessWord SmashingreWord GameMultiplication Master
© 2026 App AI NZ Ltd. All rights reserved.All systems normalTermsPrivacy
Blog
July 7, 2026·6 min read·app.nz

Keeping training GPUs busy without wasting memory

The app.nz training worker checklist: conservative VRAM floors, bf16/TF32 defaults, efficient attention, dataloaders, direct artifact I/O, torch.compile tradeoffs, and phase-by-phase memory release.

Listen to this article

On-device voice

Uses the voice built into your browser; no article text leaves this page.

Audio narration is not supported by this browser.

The expensive part of hosted training is not the API request. It is the GPU sitting under a trainer container. The control plane can pick the right machine, but the trainer has to keep that machine fed and release memory as soon as large phases are over.

This is the checklist we use for app.nz trainer images and adjacent GPU workers.

Fit first, then go fast

A run that OOMs at step 20 is the worst possible utilization. The model catalog gives every trainable model three VRAM floors:

  • LoRA training VRAM
  • full fine-tune VRAM
  • inference VRAM

Those are conservative floors, not leaderboard claims. They assume bf16 where possible, fp16 fallback where needed, and memory-saving optimizer choices for larger runs. Once a job fits, the trainer can spend remaining memory on batch size, workers, compile, and checkpointing choices.

Defaults that reduce GPU seconds

Trainer images built on app-trainer-sdk advertise these defaults through GET /api/training/models:

DefaultEffect
TF32 matmul/cudnnFaster matmuls on Ampere+ without changing model format
bf16 with fp16 fallbackBetter stability and throughput on modern NVIDIA GPUs
Flash or mem-efficient attentionLess attention memory and faster long-context steps
Fused AdamWLess optimizer overhead
Pinned, persistent, multi-worker dataloadersFewer GPU bubbles waiting for CPU input
Parallel weight download/uploadLess paid wall-clock time outside the training loop

The goal is not to expose every PyTorch flag. The goal is to make the no-config path good, then leave explicit hyperparams for users who know their workload.

Memory should be released by phase

Many GPU jobs have phases:

  1. Load a large helper model.
  2. Extract features, poses, latents, captions, or embeddings.
  3. Train the actual small adapter or downstream representation.
  4. Export artifacts.

If phase 1 keeps tensors alive while phase 3 starts, utilization gets worse even if the code eventually calls torch.cuda.empty_cache(). The cache can only release blocks that no live tensor still references.

The pattern we want is:

with torch.inference_mode(), torch.autocast("cuda", dtype=dtype):
    outputs = helper_model(inputs_cuda)

cpu_outputs = move_only_needed_outputs_to_cpu(outputs)
helper_model.cpu()
del outputs, inputs_cuda
torch.cuda.empty_cache()
start_training(cpu_outputs)

That is especially important for pipelines such as splat generation, where a large vision model estimates geometry and then a separate optimizer needs the GPU for Gaussian training.

Utilization is also I/O

GPU utilization drops when the trainer waits on the network or CPU. The hosted system handles the obvious control-plane pieces:

  • mirror base weights to R2 where possible
  • use ranged, resumable, parallel downloads
  • use presigned upload URLs so the worker uploads directly
  • avoid routing large artifacts through the web server
  • keep progress callbacks small

Inside the trainer, the equivalent is to keep dataset decoding predictable. A bigger dataloader is only useful if CPU, memory, and storage can keep up. For small image LoRAs, too many workers can add overhead; for large video datasets, too few can starve the GPU.

Compile is a throughput trade

torch.compile can make steady-state steps faster, but it moves time into startup. That is good for long training runs and bad for tiny smoke tests. app.nz exposes compile-related hyperparams rather than forcing one answer:

  • torch_compile
  • compile_mode
  • gradient_checkpointing
  • gradient_accumulation_steps
  • dataloader_workers
  • optim_8bit

The right default is workload-dependent. The product default should be fast enough for common runs; the escape hatch should be explicit for teams doing serious tuning.

The control plane still matters

Even perfect PyTorch code wastes money if the control plane is vague. app.nz keeps the job lifecycle explicit, cancels provider jobs on context cancellation, stamps terminal cost once, and stores output size for storage billing.

That is the boring work behind better cloud training: pick hardware conservatively, move bytes directly, make callbacks idempotent, free memory between phases, and expose the few knobs that actually change GPU seconds.

Build what you just read

Ship agents, models, and apps on one cloud.

Start with free credits, then use the same platform from the web app, CLI, desktop app, or MCP.

Start building freeRead the docs

Keep reading

Throughput on a shared GPU: fused kernels and a priority scheduler

How we serve chat, image, video, TTS, STT and a LoRA army on shared GPUs — 2× LLM tok/s (fp8+MTP), a fused multi-LoRA kernel (up to 2.4×), a 10.4× admission gate, tier-based VRAM arbitration, and cheaper building blocks (916k embeds/sec, Gemini STT).

How app.nz hosted training works

The control plane behind app.nz fine-tuning: model catalogues, hardware offers, durable jobs, signed trainer specs, progress callbacks, R2 artifacts, publishing, and deploys.

Accelerating MiniMax H3 carefully: signed EasyCache sweeps and audiovisual gates

How app.nz tests H3 denoising caches with private signed controls, fixed-seed A/B jobs, runtime telemetry, and first/last-frame, audio, and loop quality gates.