Running AI Models on Your Own Infrastructure

When a private language-model server makes sense, which hardware it needs and what it costs.

40 articles Clearly sourced Verifiable sources
Questions from first calls

Concise, dependable answers

Question

What is a private LLM server?

A private LLM server runs a language model on owned or rented hardware instead of using a provider like OpenAI or Anthropic. Requests do not leave the local environment. This addresses data protection issues but shifts effort and costs to the organization – and open models are weaker than the large commercial ones for demanding tasks.

Read answer
Question

Which open language models are suitable for in-house use?

Common models include Llama from Meta, Qwen from Alibaba, and Mistral from France. For German-language tasks, it is more important how well the model handles German than the model's name – this varies significantly and should be tested with your own texts, not rankings.

Read answer
Question

Cloud AI or Own Server – Which is Cheaper?

For low and medium volumes, the cloud is almost always cheaper because you only pay for actual usage. An own server only pays off with consistently high utilization – and only if operational costs and personnel are taken into account. When it comes to sensitive data, often the decision is not based on price, but on legality.

Read answer
Question

How to Run a Language Model In-House?

For beginners and individual users, Ollama is suitable – easy to set up, runs on a desktop computer. For productive multi-user operation, vLLM is common as it batches requests and thus serves significantly more simultaneous users. Both offer an OpenAI-compatible interface.

Read answer
Question

How to Keep Your Own AI Server Up to Date?

With a fixed rhythm for three things: system security updates, updating the software in use, and – less frequently – a model change. The model change is the most labor-intensive part because it cannot be evaluated without a collection of test cases.

Read answer
Question

How to Secure Your Own AI Server?

Do not expose it directly to the internet. A model server typically does not come with authentication by default – anyone who knows the address can use it. Necessary measures include: access only from the internal network or via VPN, a front-end authentication, limiting requests per user, and logging.

Read answer
Question

When is it worth renting graphics performance?

In cases of uneven load and during the testing phase, almost always. Renting is cost-effective as long as utilization fluctuates or is unclear – purchase only when there is consistently high, even utilization. As a rough guideline: If you utilize the hardware for less than about half the time, renting is the better option.

Read answer
Question

How to Integrate Internal Documents with RAG to an LLM Server?

In RAG, documents are extracted, divided into traceable sections, indexed as vectors, and retrieved according to the question. The process becomes productive only with source citation, version status, and server-side access filters; a vector index without rights verification can deliver confidential text passages to unauthorized users.

Read answer
Question

When is Fine-Tuning more sensible than RAG?

RAG is particularly suitable for variable knowledge and verifiable answers; Fine-Tuning is more appropriate for stable behavior, technical language, or a fixed output format. New facts alone are rarely a good reason for Fine-Tuning. First, Prompt and RAG are measured, then an adapter is only considered with versioned training and regression tests.

Read answer
Question

How to Manage Users, Roles, and Tenants on a Private AI System?

A central identity provider authenticates users via OIDC; roles and tenant are checked server-side in each request. At least user, editorial, and administrative rights should be separated. Tenant separation must also apply in the document index, logs, and tool accesses – a tenant name in the prompt is not sufficient.

Read answer
Question

How to Log AI Requests Compliantly?

Only what is necessary for operation, security, and proof is logged: time, pseudonymous user ID, model and prompt version, status, token counts, and correlation ID. Complete prompts and responses are excluded from the log by default; if content is necessary, purpose, legal basis, access protection, and a fixed deletion period are required.

Read answer
Question

What requirements apply to power supply, cooling, and server location?

Sizing is based on the data sheet of the specific server and a measurement under realistic full load – not on the average power consumption at idle. Power connection, UPS, power paths, waste heat, airflow, temperature, noise, fire protection, and access are planned together; 1 watt of electrical power is almost equal to 1 watt of heat.

Read answer
Question

How does the AI service remain available during model or server failures?

Availability is achieved through separate failure domains: at least 2 service instances, health checks, load balancers, replicated state data, and a tested fallback. Two processes on the same server do not protect against its failure. For model errors, versioned artifacts, canary rollout, and immediate rollback are additionally required.

Read answer
Question

Can an LLM Server Operate Completely Without Internet Access?

Yes, an LLM server can operate completely without internet access, provided that all necessary models, data, and software are installed locally. However, this requires careful planning and implementation to ensure that all dependencies and resources are available. Offline operation may also complicate the updating and maintenance of the models, as there is no connection to external data sources.

Read answer
Question

How are models, prompts, and documents encrypted at rest?

The encryption of models, prompts, and documents at rest is typically achieved through the use of symmetric or asymmetric encryption methods. Symmetric methods use a shared key, while asymmetric methods use a key pair consisting of a public and a private key. The choice of method depends on specific security requirements and infrastructure. Additionally, keys should be securely managed and regularly updated to ensure data integrity.

Read answer
Question

What License Terms Apply to Locally Operated Language Models?

The license terms for locally operated language models vary depending on the provider and model. These models are often available under open-source licenses or commercial licenses. Open-source models typically have less restrictive terms, while commercial licenses specify usage rights and restrictions. It is important to carefully review the respective license to understand the legal framework.

Read answer
Question

How to Size GPU Memory for a Specific Model?

The sizing of GPU memory for a model depends on several factors, including the size of the model, the batch size, and the type of data processing. First, the number of parameters in the model should be determined, as each parameter requires memory. Additionally, the batch size is crucial, as it multiplies the memory requirements. Finally, temporary memory requirements during computations can also influence the overall demand.

Read answer
Question

Can a Language Model Be Effectively Run on CPUs Only?

Yes, a language model can fundamentally be run on CPUs, but performance and processing time are significantly limited compared to GPUs. CPUs are capable of performing the calculations required to run a language model; however, the parallel processing that GPUs offer is more efficient for many tasks. This can lead to longer wait times, especially with large models or extensive datasets.

Read answer
Question

How to separate development, test, and production environments of an LLM system?

The separation of development, test, and production environments in an LLM system is achieved by implementing separate environments that each utilize specific resources and configurations. Development environments are often local and allow for rapid prototyping, while test environments are used for validating models and functions. The production environment, on the other hand, is stable and optimized for live operation. This separation minimizes risks and ensures that changes in development do not unintentionally affect the production environment.

Read answer
Question

How to Protect an Internal Retrieval-Augmented Generation (RAG) System from Manipulated Documents?

Protecting an internal Retrieval-Augmented Generation (RAG) system from manipulated documents requires several measures. First, documents should be encrypted during storage and transmission to prevent unauthorized access. Additionally, implementing integrity checks, such as hash functions, is useful to detect changes to the documents. Regular audits and access controls also contribute to the security of the system.

Read answer
Question

How to prevent credentials from ending up in prompts or logs?

To prevent credentials from ending up in prompts or logs, sensitive information should never be written directly into the code or logs. Instead, it is advisable to use environment variables to store credentials. Additionally, logging mechanisms should be configured to mask or completely exclude sensitive data. Regularly reviewing logs for accidentally stored credentials is also recommended.

Read answer
Question

How to Delete Personal Data from Vector Database and Logs?

Deleting personal data from vector databases and logs requires specific steps. First, the data that needs to be deleted should be identified. Then, it is important to apply the appropriate deletion methods to ensure that the data cannot be restored. Additionally, all logs referencing this data should also be cleaned to ensure compliance with data protection regulations.

Read answer
Question

When is the parallel operation of multiple language models beneficial?

The parallel operation of multiple language models can be beneficial when there are different requirements for language processing. For example, specialized models can be used for specific domains or tasks to increase accuracy. Additionally, parallel operation can enhance robustness, as different models have varying strengths and weaknesses. In scenarios where high availability and flexibility are required, using multiple models is advantageous.

Read answer
Question

How to Choose an Embedding Model for German Specialized Documents?

The selection of an embedding model for German specialized documents depends on several factors, including the specific domain, the availability of training data, and the desired accuracy. Models like BERT or its variants, specifically trained for the German language, are often a good choice. Additionally, the complexity of the texts and the type of tasks, such as classification or similarity search, should be considered. Evaluation using metrics like F1-Score or accuracy can also be helpful.

Read answer
Question

Which vector database is suitable for an internal knowledge system?

The choice of a vector database for an internal knowledge system depends on various factors, including the type of data, scalability, and integration capabilities. Popular options include Pinecone, Weaviate, and Milvus, each with different strengths. Pinecone offers a user-friendly API and high scalability, while Weaviate has integrated knowledge graph functionality. Milvus, on the other hand, is particularly suitable for large datasets and supports various indexing strategies.

Read answer
Question

When Does a Reranker Improve the Quality of RAG Answers?

A reranker improves the quality of Retrieval-Augmented Generation (RAG) answers when it can better assess the relevance of the retrieved information than the original retrieval system. This often occurs through the application of more complex models that consider contextual and semantic aspects of the queries and documents. Particularly for ambiguous or complex questions, a reranker can significantly enhance the accuracy and relevance of the answers by prioritizing the best results. However, the improvement heavily depends on the quality of the underlying data and the training methods of the reranker.

Read answer
Question

How are scanned PDFs and tables prepared for RAG?

The preparation of scanned PDFs and tables for Retrieval-Augmented Generation (RAG) involves several steps. First, Optical Character Recognition (OCR) is applied to extract text from the scanned documents. Next, the extracted text is structured to identify and categorize relevant information. Tables are converted into a machine-readable format, taking into account the structure and relationships between data points. Finally, data validation is performed to ensure quality and accuracy.

Read answer
Question

How to Force a Private AI Assistant to Cite Sources?

To get a private AI assistant to cite its sources, it is important to make clear requests that target the sources of the information. Many AI models are programmed to generate information without specifying sources. One way to circumvent this is to ask about the data used or the underlying models. Additionally, implementing citation protocols in software development can help increase transparency.

Read answer
Question

How does a RAG system take access rights from DMS or SharePoint?

A Retrieval-Augmented Generation (RAG) system can take access rights from document management systems (DMS) or SharePoint by accessing the permissions stored in these systems. This typically occurs via APIs or integrations that allow the RAG system to read user roles and rights. The transfer of access rights often happens in real-time, so changes in the DMS or SharePoint are immediately reflected in the RAG system. Careful configuration is necessary to ensure that the correct permissions are applied.

Read answer
Question

How to Create a Robust Test Set for an Internal Language Model?

A robust test set for an internal language model should cover a variety of test cases that examine different aspects of language processing. This includes syntactic, semantic, and pragmatic dimensions. The selection of test data should include both representative examples and edge cases to evaluate the model's robustness. Additionally, it is important to regularly update and adjust the test data to account for new developments and use cases.

Read answer
Question

How to Conduct Controlled Attack and Abuse Tests Against the AI Assistant?

Controlled attack and abuse tests against AI assistants require a structured approach. First, a test plan should be created that defines the objectives, methods, and scope of the tests. Next, appropriate test environments should be set up to simulate real conditions. The tests should cover various attack scenarios to identify vulnerabilities. After execution, a comprehensive analysis of the results is necessary to develop measures for improving security.

Read answer
Question

How to Roll Back After a Failed Model Update?

A rollback after a failed model update requires careful planning and execution. First, a backup of the previous model should be available to ensure a smooth return. The rollback procedure includes stopping the current model, restoring the previous version, and testing functionality to ensure everything works properly. Documentation and logging are crucial to make the process traceable.

Read answer
Question

Container, Virtual Machine, or Kubernetes – How Should an LLM Server Be Operated?

The choice of operating environment for an LLM server depends on various factors, including scalability, resource management, and use case. Containers provide a flexible and lightweight way to isolate and scale applications. Virtual machines offer stronger isolation and are suitable for complex applications that require extensive resources. Kubernetes enables the orchestration of containers and is ideal for dynamic environments with high traffic.

Read answer
Question

How to Update Models Without Long Downtime?

Updating models without long downtime requires careful planning and the use of appropriate techniques. A common method is Blue-Green Deployment, which uses two identical production environments. While one environment is active, the other is updated with the new version. After successful testing, traffic can be seamlessly switched, minimizing downtime.

Read answer
Question

How to Enable Secure Remote Access to an Internal LLM Server?

To enable secure remote access to an internal LLM server, several measures are necessary. First, a VPN connection should be established to encrypt the traffic. Additionally, authentication mechanisms such as Multi-Factor Authentication (MFA) should be implemented. Firewalls should be configured to restrict access to authorized users only. Finally, it is important to conduct regular security updates and audits to identify and address potential vulnerabilities.

Read answer
Question

How to Measure and Limit the Energy Consumption of an AI Server?

The energy consumption of an AI server can be captured using monitoring tools that measure power usage in real-time. These tools often provide detailed analyses and reports that help optimize consumption. To limit energy consumption, strategies such as load shifting, efficient hardware selection, and the implementation of power-saving modes can be employed. Regular review and adjustment of system settings are also important to sustainably reduce energy consumption.

Read answer

Ready for your next project?

Free initial consultation - no sales pressure, just clear answers.

Request consultation