In the rapidly evolving landscape of AI, multilingual reasoning models are crucial for expanding accessibility and improving performance across different languages. German-R1 is a groundbreaking AI model designed to bring the latest advanced reasoning capabilities to the German language, offering performance comparable to OpenAI’s o3 or DeepSeek’s R1. Unlike many large-scale AI models, German-R1 was built with extreme efficiency, trained on legally imported H100s in under five minutes and without any government funding. This makes it a unique and independent alternative for those looking to harness high-level reasoning capabilities in native German contexts, whether for academic research, business applications, or AI-driven automation.
In this guide, we’ll walk you through the installation process step by step, so you can unlock the full potential of German-R1 on your own machine locally or using Cloud GPUs.
Prerequisites
The minimum system requirements for this use case are:
- GPUs: RTX 4090 or RTX A6000 (for smooth execution).
- Disk Space: 100 GB
- RAM: At least 16 GB.
- Jupyter Notebook installed.
Note: The prerequisites for this are highly variable across use cases. A high-end configuration could be used for a large-scale deployment.
Step-by-step process to install & run German-R1
For the purpose of this tutorial, we’ll use a GPU-powered Virtual Machine by NodeShift since it provides high compute Virtual Machines at a very affordable cost on a scale that meets GDPR, SOC2, and ISO27001 requirements. Also, it offers an intuitive and user-friendly interface, making it easier for beginners to get started with Cloud deployments. However, feel free to use any cloud provider of your choice and follow the same steps for the rest of the tutorial.
Step 1: Setting up a NodeShift Account
Visit app.nodeshift.com and create an account by filling in basic details, or continue signing up with your Google/GitHub account.
If you already have an account, login straight to your dashboard.
Step 2: Create a GPU Node
After accessing your account, you should see a dashboard (see image), now:
- Navigate to the menu on the left side.
- Click on the GPU Nodes option.
- Click on Start to start creating your very first GPU node.
These GPU nodes are GPU-powered virtual machines by NodeShift. These nodes are highly customizable and let you control different environmental configurations for GPUs ranging from H100s to A100s, CPUs, RAM, and storage, according to your needs.
Step 3: Selecting configuration for GPU (model, region, storage)
- For this tutorial, we’ll be using the RTX 4090 GPU; however, you can choose any GPU of your choice based on your needs.
- Similarly, we’ll opt for 200GB storage by sliding the bar. You can also select the region where you want your GPU to reside from the available ones.
Step 4: Choose GPU Configuration and Authentication method
- After selecting your required configuration options, you’ll see the available VMs in your region and according to (or very close to) your configuration. In our case, we’ll choose a 1x RTX 4090 GPU node with 12 vCPUs/96GB RAM/200 GB SSD.
2. Next, you’ll need to select an authentication method. Two methods are available: Password and SSH Key. We recommend using SSH keys, as they are a more secure option. To create one, head over to our official documentation.
Step 5: Choose an Image
The final step would be to choose an image for the VM, which in our case is Jupyter Notebook, where we’ll deploy and run the inference of our model.
That’s it! You are now ready to deploy the node. Finalize the configuration summary, and if it looks good, click Create to deploy the node.
Step 6: Connect to active Compute Node using SSH
- As soon as you create the node, it will be deployed in a few seconds or a minute. Once deployed, you will see a status Running in green, meaning that our Compute node is ready to use!
- Once your GPU shows this status, navigate to the three dots on the right and click on Connect with SSH. This will open a new tab with a Jupyter Notebook session in which we can run our model.
Step 7: Setting up Python Notebook
Start by creating a .ipynb notebook by clicking on Python 3 (ipykernel).
Next, If you want to check the GPU details, run the following command in the Jupyter Notebook cell:
!nvidia-smi
Output:
Step 8: Download model files with dependencies.
- Install Python dependencies to run the model.
!pip install torch
!pip install git+https://github.com/huggingface/transformers
!pip install git+https://github.com/huggingface/accelerate
!pip install huggingface_hub
Output:
2. Download model files.
import torch
from transformers import pipeline, set_seed
import json
set_seed(42)
pipe = pipeline("text-generation", "malteos/german-r1")
Output:
Step 9: Run and test the model
Finally, run and test the model using the following snippet.
In the below code snippet, the question we ask to the model is as follows:
Question in German: “James beschließt, 3-mal pro Woche 3 Sprints zu laufen. Er läuft 60 Meter pro Sprint. Wie viele Meter läuft er insgesamt pro Woche?”
Translation: “James decides to run 3 sprints 3 times a week. He runs 60 meters per sprint. How many meters does he run in total per week?”
You may replace the question with any question of your choice.
question = "James beschließt, 3-mal pro Woche 3 Sprints zu laufen. Er läuft 60 Meter pro Sprint. Wie viele Meter läuft er insgesamt pro Woche?"
system_prompt = """
Antworte auf deutsch und in diesem Format:
<reasoning>
...
</reasoning>
<answer>
...
</answer>
"""
messages = [
{
"role": "system",
"content": system_prompt,
},
{"role": "user", "content": question},
]
response = pipe(messages, max_new_tokens=256)
output = response[0]["generated_text"][2]["content"]
print(output)
Output:
Here’s the translated version of the output generated by the model:
James lurks 3 times per week, so that's the number of weeks per week that he lurks.
He runs 3 sprints per week, which is the number of sprints per week.
Each sprint is 60 meters.
To determine the total amount, multiply the number of weeks per week by the number of sprints per week by the length value of each sprint.
Total running distance per week = number of weeks per week * number of sprints per week * length of a sprint
= 1 * 3 * 60 meters
= 180 meters
Conclusion
Installing German-R1 locally provides a powerful, independent reasoning model optimized for the German language. Its efficient design ensures high-speed processing. With NodeShift’s cloud infrastructure, deploying such models at scale becomes much easier with the help of optimized compute resources, whether on a single machine or across distributed environments.