A woman monitors a secure, cloud-based AI data pipeline on her laptop in a futuristic server room.
Microsoft has put Programmed Training in Microsoft Foundry into public preview. It's a way for ML teams to write the training loop themselves while Microsoft supplies the GPUs. Microsoft describes it as letting you write the training loop while Foundry runs the GPUs. The Azure Updates entry carries a November 20, 2026 date. Microsoft's Foundry blog announcement is dated November 18, which was also Ignite week.

"Public preview" is not the same as "open to everyone." Microsoft Learn says the feature requires explicit access approval, and you must wait for that approval before creating a training session. Plan accordingly.

A woman monitors a secure, cloud-based AI data pipeline on her laptop in a futuristic server room. What Programmed Training is​

Programmed Training is an API for building your own post-training loop over open-weight models. Your Python program, called the training driver, runs the experiment. It prepares examples, samples responses, scores them, picks batches and decides when to update.

Foundry holds the model and adapter state. It also runs sampling and low-rank adaptation (LoRA) updates on serverless GPUs. The driver can run on a CPU, including a laptop. If you add a reward model or a tool environment, that component may need its own compute.

The preview includes the Fine-Tuning Sessions Python SDK, a public cookbook of training recipes, and LoRA training for four open-weight models.

The building blocks​

The SDK keeps each step of training as a separate call, so your code decides what happens between them:

OperationWhat it doesWhat your driver decides
sampleGenerates responses from a chosen sampler checkpointWhich prompts, how many responses, rollout or evaluation
forward_backwardComputes the selected objective and accumulates gradientsBatch, loss, which tokens count
optim_stepApplies accumulated gradients to the LoRA adapterWhen to update, optimizer settings
save_weights_for_samplerRefreshes sampler weights from the current adapterWhen sampling should use the update
save_weightsSaves adapter and optimizer stateCheckpoint frequency

Two details trip people up:

  • forward_backward does not update the model. Only optim_step applies the accumulated gradients.
  • After an update, you must refresh the sampler weights before sampling from the updated adapter.

Token masks let you choose which tokens contribute to learning. For example, you can train on assistant tokens and exclude prompts or tool observations.

Methods supported, and what isn't​

The same primitives cover supervised learning, reinforcement learning, preference learning, distillation and custom-loss workflows. Microsoft's blog says the loss_fn setting accepts cross_entropy, importance_sampling, ppo, cispo and sapo.

These are loss primitives, not finished algorithms. Your driver supplies the grouping, grading and advantage computation. Microsoft also says the service does not accept uploaded arbitrary training code. For objectives outside the built-in list, the cookbook offers a custom-loss helper that combines the service's forward outputs with a differentiable loss you compute in Python.

Models at launch​

The announcement lists four models with Global support:

  • Qwen3.8-27B
  • Qwen3.6-35B-A3B
  • gpt-oss-120b
  • Muse-Glimmer-30B

Nemotron Ultra, including a 256K-context variant, is available on request. Long-context variants of Muse-Glimmer-30B and Qwen3.8-27B are described as coming soon. For on-request models, Microsoft says to work with your Microsoft account team when requesting preview access.

Two exclusions matter. MAI-Code-1.1-Flash is available only through Managed Training for RFT and is not part of this preview. The Learn model table also marks Programmed Training as supported for gpt-oss-20b, which the blog's launch list doesn't mention. Treat the Learn table as the check to run before you plan anything.

Regions are limited too. The Learn page lists Foundry project regions for Programmed Training, including:

  • Australia East
  • Canada East
  • East US
  • East US 2
  • Korea Central
  • North Central US
  • Sweden Central
  • Switzerland North
  • UAE North
  • UK South
  • West US 3

Many regions that support Managed Training, such as West Europe and West US, are marked unsupported for Programmed Training.

Data residency: Learn notes that global training doesn't offer data residency. Data and weights are copied to the region where training occurs. Regulated teams should review this before sending data.

Managed Training or Programmed Training?​

Microsoft's guidance is that Managed Training is the starting point for newcomers. You submit data and settings, and Foundry runs a supported method such as SFT, DPO or RFT. Managed Training already supports reinforcement fine-tuning with graders.

Choose Programmed Training when the learning logic is the differentiator. Examples include:

  • Custom rewards, such as running a test suite.
  • Multi-turn tool environments.
  • Curricula that chain SFT and then RL.
  • Control over rollout collection, batch construction and update timing.

The tradeoff is that you take on more responsibility. Learn lists the driver, environments, tokenization, checkpoints and recovery logic as yours to maintain. It also warns that sampling inside a session isn't proof of how the model will behave in production serving.

Pricing​

Billing is by tokens your loop processes, in four categories: uncached prefill, cached prefill, sampling and training. Microsoft's list prices at publication, per 1 million tokens in USD:

ModelPrefillCached prefillSamplingTraining
Qwen3.6-35B-A3B$0.54$0.108$1.335$1.177
Qwen3.8-27B$1.86$0.372$5.595$4.103
gpt-oss-120b$0.33$0.066$0.84$0.737
Muse-Glimmer-30B$1.96$0.392$4.88$5.86

Microsoft says these reflect rates at publication and points readers to its fine-tuning pricing page for current figures.

Getting started​

Microsoft's steps:

  1. Request access through the preview form and wait for approval.
  2. Prepare the project. Use a Foundry project in a supported region with capacity for your chosen model. Assign the Foundry User role for training, or Foundry Owner if you also deploy.
  3. Install and authenticate. Clone the public training samples, install the cookbook, sign in with the Azure CLI, and set AZURE_AI_PROJECT_ENDPOINT to your Foundry project endpoint. Use the project endpoint, not a model deployment URL or the bare account hostname.
  4. Check the SDK version. The cookbook installs the public preview SDK, azure-ai-finetuningsessions==1.0.0b1.
  5. Run the quickstart. It's a small math reinforcement-learning recipe on Qwen3.8-27B. It needs Python 3.11 or later, Git and the Azure CLI.
  6. Make it yours. Swap in your own data or reward function, and compare against a held-out baseline before scaling.

Guardrails from the quickstart​

  • max_steps=2 limits training iterations, not model-loading time, evaluation calls, tokens or cost.
  • Keep the terminal and network connection open while the recipe runs.
  • A successful local setup doesn't prove Azure admitted a session. Check for session creation and loop progress.
  • Keep the local dashboard on its default loopback address. It has no authentication and may display prompts and responses.
  • A printed "Session closed" message doesn't confirm remote compute was released. Check for cleanup warnings and inspect the recorded session ID.
  • Deleting local files doesn't release remote compute.
  • The example doesn't create a serving deployment.

Deployment and the agent-training angle​

Training is separate from serving. A trained adapter stays tied to a compatible base model. Microsoft points to Managed Compute for serving, where several adapters can share one base-model deployment through Multi-LoRA. Learn notes that adapter serving on managed compute remains a preview capability. Check the compatibility matrix before choosing a configuration.

For agent training, Microsoft pairs this with RL Environments (RLE). RLE is now in private preview. Access is by request and is separate from the Programmed Training public preview. Neither depends on the other.

What to make of it​

Microsoft's blog describes a case study. Whitney AI used Programmed Training to train a code-review agent, and the blog says about 250 training examples nearly doubled review quality. It also says the tuned model used 4.5x fewer tokens than a leading frontier model. These are Microsoft's own figures about a customer, and I haven't verified them independently. Don't treat them as typical results.

Learn itself says benefits aren't guaranteed and that held-out evaluation is how you compare against your baseline.

The preview terms are the biggest caveat. Learn says preview features come without a service-level agreement and aren't recommended for production workloads. Combine that with the approval gate, the short model list, the limited regions and the lack of data residency. This is a research tool for experienced ML practitioners right now, not a drop-in production service.

For teams that already run TRL, verl or prime-rl, the pitch is about infrastructure. Microsoft says it removes the GPU access, efficiency and idle-cost problems while you keep loop-level control. Whether that beats your own cluster depends on your workload, the token prices above and how well the preview behaves.

If you're new to model customization, Microsoft's own advice is to start with Managed Training and move to Programmed Training only when you need the control.

 

References

  1. (In preview) Public Preview: Programmed Training in Microsoft Foundry Azure Updates 2026-11-20T22:58:28Z
  2. What is Programmed Training (preview) in Microsoft Foundry? - Microsoft Foundry | Microsoft Learn learn.microsoft.com
  3. Programmed Training: You write the loop, Foundry runs the GPUs | Microsoft Community Hub techcommunity.microsoft.com