DEV Community

Cover image for Building for Europe? Meet Bielik (Open-Source LLM Made in Poland).
Pawel Janda
Pawel Janda

Posted on

Building for Europe? Meet Bielik (Open-Source LLM Made in Poland).

When you build for the European market—especially if you have Polish users—you need a model that handles language nuance, not just English-first patterns. Many teams default to the biggest global LLMs, but there’s a strong open-source alternative worth knowing: Bielik.

Bielik is a Polish-developed open-source LLM that performs especially well in Polish and holds its own across European languages in public evaluations. That makes it a great fit for apps that serve Polish-speaking markets—or multilingual products across Europe.

If you’re building chatbots, translation, content workflows, or any AI feature where language quality matters, Bielik is a compelling model to evaluate.

Getting Started with Bielik in .NET

The good news is that integrating Bielik into your .NET applications is straightforward, thanks to the MaIN.NET library. Let's walk through setting up a simple console application step by step.

Step 1: Create a New Console Application

First, let's create a new .NET console project. Open your terminal and run:

dotnet new console -n BielikExample
cd BielikExample
Enter fullscreen mode Exit fullscreen mode

This command creates a new console application project named "BielikExample" and navigates into the project directory.

Step 2: Add the MaIN.NET Package

Next, we need to add the MaIN.NET package, which provides a convenient .NET interface for working with Bielik and other compatible models:

dotnet add package main.net
Enter fullscreen mode Exit fullscreen mode

This command will add the MaIN.NET package to your project, making all the necessary APIs available for interacting with Bielik models.

Step 3: Create Your Application Code

Now let's create a simple chat application that uses Bielik. We'll break this down into several substeps to understand each part of the code.

Step 3.1: Add Necessary Using Statements

First, we need to import the required namespaces for MaIN.NET:

using MaIN.Core;
using MaIN.Core.Hub;
using MaIN.Domain.Configuration;
Enter fullscreen mode Exit fullscreen mode

These imports give us access to the MaIN.NET framework classes and methods we'll need for model initialization and chat functionality. Note that with modern C# and implicit usings enabled, we don't need to explicitly import System and System.IO for basic operations.

Step 3.2: Set Up the Model Path

Next, we configure where the model files are stored:

string projectRoot = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "..", "..", ".."));
string modelsFolder = Path.Combine(projectRoot, "Models");
Enter fullscreen mode Exit fullscreen mode

This code determines the project root directory and creates a path to the Models folder where your Bielik model files should be placed.

Step 3.3: Initialize the MaIN Bootstrapper

The bootstrapper initializes the MaIN framework with your configuration:

MaINBootstrapper.Initialize(configureSettings: settings => {
    settings.BackendType = BackendType.Self;
    settings.ModelsPath = modelsFolder;
});

AIHub.Extensions.DisableLLamaLogs();
Enter fullscreen mode Exit fullscreen mode

Here, we're telling MaIN to use a self-hosted backend (running the model locally) and specifying the path to our models folder. The DisableLLamaLogs() call suppresses verbose logging from the underlying LLama library, keeping your console output clean and focused on your application's messages.

Step 3.4: Configure the Model Name and Path

Specify which Bielik model to use:

var modelName = "Bielik-11B-v3.0-Instruct.Q8_0";
var fullPath  = Path.Combine(
    modelsFolder,
    $"{modelName}.gguf");
Enter fullscreen mode Exit fullscreen mode

This sets up the model name and constructs the full path to the model file, which will be used when creating the chat instance.

Step 3.5: Create the Chat Loop

Finally, implement the interactive chat interface. We'll create the chat instance once and reuse it in the loop for better performance:

Console.WriteLine("🗨️  Chat with Bielik (type 'exit' to quit)");

var chat = AIHub.Chat()
        .WithCustomModel(modelName, fullPath);

while (true)
{
    Console.Write("\nYou: ");
    var input = Console.ReadLine();
    if (string.IsNullOrWhiteSpace(input) || input.Equals("exit", StringComparison.OrdinalIgnoreCase))
        break;

    await chat
        .WithMessage(input)
        .CompleteAsync(interactive: true);
}
Enter fullscreen mode Exit fullscreen mode

This creates a chat instance configured with your Bielik model before entering the loop. The loop reads user input and sends it to Bielik, reusing the same chat context. The interactive: true parameter enables real-time streaming of the model's response. By creating the chat instance outside the loop, we ensure better performance and maintain conversation context across multiple exchanges.

Step 4: Download the Bielik Model

Before running your application, you'll need to download the Bielik model file. The model files (in GGUF format) need to be placed in a Models folder within your project directory.

The example above uses the Bielik-11B-v3.0-Instruct.Q8_0 model, which is an 11 billion parameter instruct-tuned model with 8-bit quantization. This provides an excellent balance between performance and resource requirements.

You can download it from HuggingFace.

Step 5: Run Your Application

Once you have the model file in place, you can run your application:

dotnet run
Enter fullscreen mode Exit fullscreen mode

You'll now have a working chat interface that communicates with Bielik!

Why Choose Bielik?

Bielik represents a significant achievement in European language processing. The model has been specifically trained and optimized for European languages, with particular strength in Polish. This makes it invaluable for:

  • Multilingual European Applications: Build applications that serve customers across the EU with native-level language understanding
  • Polish Market Solutions: Create applications specifically tailored for the Polish-speaking market with confidence
  • Localization Services: Power translation and localization tools with models that understand cultural and linguistic nuances
  • Content Generation: Generate natural, contextually appropriate content in European languages

The open-source nature of Bielik means you have full control over your implementation, and you're not locked into proprietary APIs or usage restrictions. Combined with the ease of use provided by MaIN.NET, integrating Bielik into your .NET applications is both powerful and straightforward.

MaIN.NET is being built with the .NET community. If you’re experimenting with Bielik (or any local/open model), join in: star the project, drop feedback in issues, or share your use case so others can learn from it. Check out the repo on GitHub.

Conclusion

If you're building for the European market, especially for Polish-speaking audiences, Bielik offers a compelling, high-performing alternative to other language models. With MaIN.NET, getting started is just two commands away. Give it a try and experience the difference that a model optimized for European languages can make in your applications.

The best part? This is pure .NET. Once you have Bielik integrated into your project, you can leverage the full power of the .NET ecosystem to build any type of solution—whether it's a web API with ASP.NET Core, a desktop application with WPF or MAUI, a microservice architecture, or even cloud-native applications on Azure. You have complete flexibility to extend this foundation and build sophisticated, production-ready applications tailored to your European market needs.

Top comments (0)