Optimizing Non-English LLMs

How to Effectively Use non English LLMs Eliminating Its Weaknesses

For many months, one of the main topics on LinkedIn in the AI category has been comparing and benchmarking different LLMs. Continuous discussions about their results and comparisons – although needed – take up too much time, in my opinion. For this reason, I usually avoid this trend, returning to it only when the tools I use cease to meet my needs.

This time, I found myself in such a situation again. When working with the English language, most LLMs perform excellently, but when it comes to generating content in Polish, challenges arise. Although leading models and their economical versions handle Polish grammar, they are not entirely reliable. There are often minor errors, such as unexpected language switches to English, making the results not always meet professional standards.

What is the solution?

There are many options, and I have tested some with better or worse results. One promising option is the Bielik model, trained on a large amount of Polish text. Bielik 7B is a generative model based on the Mistral-7B-v0.1 architecture, created using texts containing about 70 billion Polish words.

At first glance, Bielik is impressive – linguistically, it presents itself as the best Polish model, as confirmed by my usage experience, although this is not supported by systematic tests. However, Bielik has some limitations. It is a relatively small model (7 billion parameters), which in itself is not a problem, but the lack of function calling makes it difficult to perform more advanced tasks.

Bielik Eagle

What are function calling in LLMs?

Function calling is a technique that allows models to invoke programming functions to obtain more precise answers or perform specific tasks, such as data processing, calculations, or information retrieval. The model recognizes when and what function should be called and then passes the appropriate data to that function.

So how to overcome this problem?

It can be achieved by forcing two models to work together – one handles logic and knowledge integration, while the other (Bielik) is responsible for the final linguistic quality of the responses.

Of course, such model cooperation involves solving several additional problems, but it is possible and allows achieving three goals:

  1. Incorporating private knowledge through RAG mechanisms and functions.
  2. Ensuring logical consistency and advanced reasoning capabilities through the use of a larger model.
  3. Ensuring linguistic correctness, guaranteed by Bielik.

Great respect to the creators of the first Polish language model from SpeakLeash.org. Thanks to you, we can build truly excellent AI solutions!

More details about this model: Bielik

Author: Mariusz Jażdżyk

FirstScore