• About us
    About us
    question mark
    Who we are

    Learn more about Mantu values, governance and offices.

    hexagon
    Our brands

    11 brands united by a shared vision.

    leave
    Sustainability

    Our strategy through diversity, environment and innovation.

    bookshelf
    Pressroom

    Breakthroughs, partnerships, and voices behind the transformation.

  • What we do
    What we do
    mantu
    PRACTICES

    Four practices designed to empower organizations, connect talent, and shape sustainable growth.

    cpu
    Technology

    Deep industry knowledge & cutting edge technology to co-create meaningful solutions.

    handshake
    Total Talent Management

    Tech to boost talent and create strong links between companies and the minds they need.

    digital qr
    Creative Intelligence

    Ensure continuity between decision, activation, and adoption. One team, one trajectory, through to lasting impact.

    medal
    Leadership & Advocacy

    Equip executive teams to define their purpose, shape their positioning and drive their strategy.

  • Insights
    Insights
    book open 4
    Blog

    Bold thinking. Fresh perspectives.

    book check
    Client Stories

    Where audacious ideas turn into real stories.

    mantu best managed companies award
    Mantu awarded one of Switzerland’s Best Managed Companies 2025 by Deloitte

    This award highlights the exceptional performance of privately held Swiss companies that demonstrate excellence in strategy, governance, innovation, and long-term results.

    Read more
    WeMeet 2025-2772 1 1
    Mantu signs the DEI Charter

    At the beginning of July 2025, Mantu’s Executive Committee signed the DEI Charter to foster diversity, equity, and inclusion at Mantu.

    Read more
  • Careers
    Careers
    binoculars
    Life at Mantu

    Mantu, as seen by its team members.

    building
    Find a company

    Mantu brings together complementary brands that cover many sectors, all around the world.

how-to-build-ml-infrastructure-components-architecture-and-best-practices

How to Build ML Infrastructure: Components, Architecture, and Best Practices

ML infrastructure connects the data, training, and serving components that turn a model into a production system. Its design depends on the workload: a fraud model answering in milliseconds needs a different setup from a demand model that runs once a day.

Start with the workload before choosing a machine learning platform


A machine learning platform should support a defined business process. Technology choices come after the team understands how predictions will be produced, consumed, and maintained.

Start with a few concrete questions:

  • How quickly does the business need a prediction?

  • How much data arrives each day?

  • How often will the model be retrained?

  • Which systems provide the input data?

  • Who owns the model after release?

  • What happens when the model or one of its dependencies fails?

  • Which security, privacy, and audit rules apply?

These answers shape the architecture. A customer-facing recommendation service may need online inference, low response times, traffic controls, and an application-facing API. A weekly risk-scoring process may work better with batch inference and scheduled processing.

The model itself also affects the design. A small tabular model may run on standard CPU resources. A large language or vision model may require GPUs, distributed training, larger artifact storage, and different serving methods.

Build data pipelines around feature ownership


Data pipelines carry information from source systems into training datasets, feature services, and inference jobs. Their quality directly affects the model because a prediction is only as reliable as the data available at the time of inference.

A production pipeline should handle:

  • Ingestion from databases, applications, files, and event streams

  • Schema checks and data validation

  • Missing values and unexpected categories

  • Feature transformations

  • Data freshness

  • Dataset versioning

  • Access permissions

  • Failed jobs and recovery

The team should define who owns each dataset and feature. A customer segment, transaction score, or product attribute needs a clear source, update schedule, and business definition.

A feature store can help when several models use the same features or when training and inference need consistent transformations. It should also support point-in-time correctness. Training records must contain the information that would have been available when the original prediction was made. Future information leaking into the training set can produce strong test results and weak production results.

The pipeline should record lineage from source data to feature, training run, model version, and prediction. That record helps engineers investigate unexpected outputs and gives business teams a way to trace how a decision was produced.

When data ownership is spread across several systems, machine learning engineering support can help teams define feature responsibilities, data contracts, and handoffs between data engineering and model operations.

Use orchestration to connect training and delivery


Training, validation, registration, and deployment depend on one another. Orchestration connects these steps and controls when each one runs.

A typical workflow looks like this:

  1. New data arrives and passes schema and quality checks.

  2. The pipeline prepares features and creates a versioned training dataset.

  3. A training job produces a candidate model.

  4. The system records parameters, metrics, dependencies, and dataset versions.

  5. Automated tests compare the candidate with the current production model.

  6. An approved model moves into a staging environment.

  7. Integration and load tests run against production-like inputs.

  8. The release process promotes the model to production.

  9. Monitoring starts immediately after deployment.

Orchestration also manages retries, timeouts, failed dependencies, and manual approvals. A failed quality check should stop the workflow and create a clear review point.

Distributed training makes sense when the model size, dataset volume, or training time requires several machines. It introduces extra work around compute allocation, network traffic, data access, checkpointing, and job recovery. A smaller workload may run more reliably on a single machine.

Keep the workflow visible. A long chain of hidden scripts creates problems when the original author leaves, a data source changes, or the model needs to run on a new schedule.

Keep versions traceable with a model registry


A model registry records the models created during development and production operations. It should show which version is approved, which data produced it, and where that version is running.

Useful registry metadata includes:

  • Model version and creation date

  • Training dataset

  • Parameters and evaluation metrics

  • Code and runtime dependencies

  • Feature definitions

  • Approval status

  • Deployment history

  • Known limitations

  • Rollback reference

The registry usually works with an artifact store. The registry describes the model and its status, while the artifact store holds model files, preprocessing packages, logs, test results, and other outputs.

Promotion between environments should follow a defined process. A candidate model can move from development to testing, staging, and production after it passes the checks assigned to each stage.

This gives the team a reliable rollback path. If the new version affects approval rates, latency, or prediction quality, engineers can return to the previous approved version and investigate without rebuilding the entire system.

Choose the right model serving pattern


Model serving determines how applications and business processes receive predictions. The pattern should match the timing of the decision.

Serving pattern

How it works

Suitable use cases

Online inference

An application sends a request and receives a prediction through an endpoint.

Fraud checks, recommendations, search ranking, and interactive products

Batch inference

The system scores a defined dataset on a schedule or after a trigger.

Customer scoring, demand planning, document classification, and daily reporting

Streaming inference

Events are processed as they arrive.

Payments, sensor readings, logistics events, and user activity

Online serving needs a clear endpoint contract. Define the request format, response structure, timeout, error behavior, authentication method, and model version.

Batch inference suits processes where a result can be prepared in advance. It can reduce service complexity and make resource planning easier. A daily customer score does not need a live endpoint if the business only reads it during the morning planning cycle.

Streaming inference brings different concerns. The system needs procedures for duplicate events, late messages, ordering problems, temporary interruptions, and replay.

A clear production ML architecture connects the serving pattern to the application, data source, security model, and operating process.

Build an MLOps platform that controls change


An MLOps platform gives teams a repeatable way to test, approve, release, and monitor models. Its purpose is control, traceability, and safe change.

Core capabilities may include source control, experiment tracking, automated tests, environment management, model registration, deployment approvals, monitoring, access controls, and rollback.

Keep development, testing, staging, and production separate. Each environment should have its own permissions, configuration, secrets, and data access rules.

Automation should stop at meaningful control points. A new training run should not reach production solely because one evaluation metric improved. The team should also review data quality, business impact, resource use, explainability, and changes in the operating environment.

Monitoring should cover more than server health. Track latency, errors, queue depth, resource use, data freshness, feature distributions, prediction patterns, and business outcomes. Ground-truth labels may arrive days or weeks after a prediction, so the monitoring plan needs both immediate technical signals and later quality checks.

Best practices for ML infrastructure architecture


Good architecture comes from a small number of clear decisions.

Keep interfaces explicit. Define the inputs and outputs between data pipelines, feature services, training jobs, registries, and serving endpoints.

Design for failure. Include retries, timeouts, alerts, fallback behavior, and recovery procedures for unavailable data sources or failed jobs.

Protect data and models. Apply identity controls, encryption, secrets management, audit logs, and environment-specific permissions.

Document ownership. Every pipeline, feature, model, endpoint, and alert should have a named owner.

Keep complexity proportional. A platform with many services creates more work for the team. Add components when the number of models, traffic, data volume, or compliance requirements justify them.

When external support makes sense


ML infrastructure becomes difficult when data pipelines, applications, cloud resources, and model operations belong to different teams. The same problem appears when several models share features, deployment rules, or production environments.

External support can help with architecture reviews, feature management, model serving, orchestration, release workflows, and operating procedures. The goal is a platform that teams can understand, run, and change without relying on manual handoffs.

Mantu’s machine learning consulting team can help connect model development with the infrastructure and business systems required for production use.

A well-designed ML platform gives each model a clear path from source data to prediction. It records the decisions made along the way, controls how changes reach production, and gives the team a practical response when the workload or the model changes.