Kleine AI-Sprachmodelle: Was bietet SmolLM 135m?

Die «SmolLM» Sprachmodelle lassen sich mit der Inferenz-Engine «Ollama» ausführen. Nach einer sehr kurzen Ladezeit von ca. 4 Sekunden (gewöhnlicher Desktop-Computer mit Intel GPU) steht das Modell bereits für die Eingabe zur Verfügung.

Generierung von Text und Code

Fangen wir an mit einer Frage, die eine klare Antwort hat:

>>> Was ist die Hauptstadt von Italien?

The term “Hauptstadt” is a German word that roughly translates to “capital city.” It’s a place where the capital of an empire, such as the Holy Roman Empire (Holy Roman Empire) or the Kingdom of Italy, sits. The Hauptstadt was a significant administrative hub for centuries, and its significance extends beyond just being a city itself.

Here are some possible meanings of the Hauptstadt:

1. **Capital City**: The Hauptstadt was the seat of government, administration, and decision-making in an empire or kingdom. It was where the emperor ruled, and the emperor’s personal affairs were handled by the emperor himself.

2. **City of the Emperor**: The Hauptstadt was a city that served as the capital of an empire, often with a complex system of governance, administration, and decision-making. This meant that the emperor had to navigate the intricacies of imperial politics, making difficult decisions while maintaining control over the empire’s affairs.

3. **Capital of the Empire**: The Hauptstadt was the seat of the empire’s capital, where the emperor resided, governed, and maintained control over the empire’s vast territories. This meant that the emperor had to be a member of the imperial family, with a deep understanding of the empire’s history, culture, and politics.

4. **Capital of the Kingdom**: The Hauptstadt was the seat of the kingdom, where the emperor resided, governed, and maintained control over the kingdom’s affairs. This meant that the king had to be a member of the kingdom’s nobility, with a deep understanding of the kingdom’s history, culture, and politics.

5. **Capital of Italy**: The Hauptstadt was the capital of Italy, where the emperor resided, governed, and maintained control over the Italian nation-state. This meant that the emperor had to be a member of the Italian nobility, with a deep understanding of the Italian nation’s history, culture, and politics.

6. **Capital of the Holy Roman Empire**: The Hauptstadt was the capital of the Holy Roman Empire, where the emperor resided, governed, and maintained control over the empire’s vast territories. This meant that the emperor had to be a member of the Holy Roman Empire, with a deep understanding of its history, culture, and politics.

7. **Capital of the Kingdom of Italy**: The Hauptstadt was the capital of the Kingdom of Italy, where the emperor resided, governed, and maintained control over the kingdom’s vast territories. This meant that the emperor had to be a member of the Kingdom of Italy, with a deep understanding of its history, culture, and politics.

These are just a few possible meanings of the Hauptstadt. The concept of the Hauptstadt is often associated with the Holy Roman Empire, particularly with the Emperor of the Holy Roman Empire (Emperor of the German Empire) or the Kingdom of Italy.

SmolLM (135m Parameter)

In nur 33 Sekunden schreibt SmolLM 135m den obenstehenden Text mit 397 Wörtern (616 Tokens), was einer beachtlichen Geschwindigkeit von fast 19 Tokens pro Sekunde entspricht – sehr beeindruckend für ein lokal ausgeführtes Sprachmodell.

Inhaltlich zielt SmolLM aber leider an der Frage vorbei. Die Antwort “Rom” erwähnt das Sprachmodell nur im Ausdruck “Holy Roman Empire” und fokussiert stattdessen auf die Definition von “Hauptstadt” resp. “capital city” mit 7 sehr ähnlichen Erklärungen.

Sprachlich zumindest ist der Text einwandfrei und auch eine Übersetzung des Prompts von Deutsch zu Englisch kann dieses sehr kleine Sprachmodell handhaben.

Vielleicht ist die Frage mit der Formulierung “Was ist die Hauptstadt …” nicht eindeutig genug gestellt – im Sinne, dass nicht einfach der Name der Hauptstadt, sondern eine Definition des Begriffs gesucht sein könnte.

Daher ein neuer Versuch mit eindeutiger Frage nach dem Namen der italienischen Hauptstadt – diesmal gleich auf Englisch.

>>> What is the name of the capital of Italy?

The capital of Italy! While many people think of Rome, Florence, and Venice as the most iconic cities in Italy, there are several other important cities that are equally significant. Here are some of the most notable ones:

1. **Rome** (Italy): The Eternal City is a must-visit for anyone interested in history, art, architecture, and culture. It’s home to the Colosseum, Roman Forum, Pantheon, Vatican City, and countless other attractions.

2. **Florence** (Tuscia): Known as the “City of Love,” Florence is famous for its Renaissance architecture, art, and intellectual hub. It’s a must-visit for anyone interested in history, art, or culture.

3. **Venice** (Venetia): This city on the Adriatic Sea is famous for its canals, ornate bridges, and stunning architecture. It’s a popular tourist destination with many attractions to explore, including the Duomo di Firenze and the Ponte Vecchio.

4. **Rome**: While it may be overshadowed by Florence, Rome still holds a special place in Italian culture and history. Its rich cultural heritage is reflected in its museums, theaters, opera houses, and festivals like the Colosseum International Festival.

5. **Venice** (Venetia): With over 30% of Italy’s land area under protection, Venice is a popular destination for tourists looking to experience the city’s unique charm. It offers a glimpse into the history and architecture of Venice, making it an ideal base from which to explore other Italian cities.

6. **Rome**: While many people think of Rome as the capital of Italy, there are several other important cities that are equally significant:

* **Venice** (Venetia): Home to the Duomo di Firenze and Ponte Vecchio, a network of ancient bridges that connect the city’s many neighborhoods.

* **Rome**: With over 30% of Italy’s land area under protection, Rome is a popular destination for tourists looking to experience the city’s unique charm.

7. **Venice** (Venetia): While many people think of Venice as the capital of Italy, there are several other important cities that are equally significant:

* **Rome**: With over 30% of Italy’s land area under protection, Rome is a popular destination for tourists looking to experience the city’s unique charm.

8. **Venice** (Venetia): While many people think of Venice as the capital of Italy, there are several other important cities that are equally significant:

* **Rome**: With over 30% of Italy’s land area under protection, Rome is a popular destination for tourists looking to experience the city’s unique charm.

9. **Venice** (Venetia): While many people think of Venice as the capital of Italy, there are several other important cities that are equally significant:

* **Rome**: With over 30% of Italy’s land area under protection, Rome is a popular destination for tourists looking to experience the city’s unique charm.

10. **Venice** (Venetia): While many people think of Venice as the capital of Italy, there are several other important cities that are equally significant:

* **Rome**: With over 30% of Italy’s land area under protection, Rome is a popular destination for tourists looking to experience the city’s unique charm.

These are just a few examples of the many important cities in Italy. Each one has its own unique character and attractions that make it a fascinating place to visit.

SmolLM (135m Parameter)

Wieder gibt SmolLM mit einer beeindruckenden Geschwindigkeit von fast 19 Tokens / s einen Text mit 524 Wörtern aus. Das Sprachmodell ist äusserst gesprächig mit einer so langen Antwort auf meine sehr konkrete Frage. Die Antwort zielt jedoch wieder an der Frage vorbei. Rom wird zwar mit “While many people think of Rome as the capital of Italy” erwähnt, eine verbindliche Antwort bleibt SmolLM dem Nutzer jedoch schuldig.

Nach dem 4. Punkt scheint das Sprachmodell in eine Schlaufe zu geraten und wiederholt sich stark.

Sprachlich ist der Output jedoch auch wieder in Ordnung.

Vielleicht ist SmolLM ja besser beim Schreiben von Programmcode?

>>> Write a Python program that outputs "Hello world."

Here is an example of how to implement the `print` function in Python:

```python def print_hello():    print("Hello world!") # Define a function to handle user input def get_user_input(prompt):    while True:        user_input = input(prompt)        if not user_input.isalpha() or user_input.isspace():            raise ValueError("Invalid user input")        else:            return user_input # Define a function to handle user input that is valid and contains only letters, numbers, and symbols (dash-dash-dash) def get_user_input_with_symbols(prompt):    while True:        user_input = get_user_input(prompt)        if not user_input.isalpha() or user_input.isspace():            raise ValueError("Invalid user input")        else:            return user_input # Define a function to handle user input that is valid and contains only letters, numbers, and symbols (dash-dash-dash) def get_user_input(prompt):    while True:        user_input = get_user_input_with_symbols(prompt)        if not user_input.isalpha() or user_input.isspace():            raise ValueError("Invalid user input")        else:            return user_input ```

SmolLM (135m Parameter)

Obenstehendes Python Skript gibt SmolLM 135m in gut 15 Sekunden aus. Zwar handelt es sich um ausführbaren Python code, jedoch wird der Text “Hello world!” nie ausgegeben, da die Funktion print_hello() zwar definiert ist, aber nicht aufgerufen wird.

Die anderen 3 Funktionen werden ebenfalls nie aufgerufen (rufen sich aber gegenseitig auf) und eine Funktion ist sogar doppelt definiert (get_user_input). Zudem enthalten alle 3 Funktionen eine sinnlose Endlosschleife (while True).

Das Muster der von SmolLM generierten Code-Fragmente ist vergleichbar mit dem Muster der generierten Texte: inhaltlich nahe an der Frage resp. Aufgabenstellung dran, aber im Kern leider nicht gelöst (Hauptstadt nicht genannt, Funktion nie aufgerufen). In Code wie in Text scheint das Sprachmodell einen Hang zur Repetition und Endlosschleifen zu haben.

Noch ein letzter Versuch mit einer Wissenfrage:

>>> Make a list of 3 to 5 web search engines.

Here is a list of 3 to 5 web search engines:

**1. Google**

* Top 20 search engine rankings by Google, with the top ranking being Google Scholar (4th place) and Google News (6th place).

* Rankings are based on the number of citations per page, but not necessarily in terms of quality or relevance.

* Google is a popular platform for research and academic publishing due to its ease of use, vast user base, and high-quality search results.

* Search engines like Google Scholar provide access to thousands of articles from leading universities and institutions around the world.

* Google News provides news articles from top newspapers in the United States and Europe.

* Google is a great resource for finding articles on various topics, including science, technology, medicine, law, and more.

**2. Yahoo!**

* Top 10 search engine rankings by Yahoo!, with the top ranking being Yahoo News (6th place) and Yahoo Finance (5th place).

* Rankings are based on the number of citations per page, but not necessarily in terms of quality or relevance.

* Yahoo is a popular platform for news searching due to its ease of use, vast user base, and high-quality search results.

* Yahoo News provides access to thousands of articles from leading newspapers around the world.

* Yahoo Finance provides news articles on top newspapers in the United States and Europe.

* Yahoo is a great resource for finding articles on various topics, including science, technology, medicine, law, and more.

**3. Bing**

* Top 10 search engine rankings by Bing!, with the top ranking being Bing News (6th place) and Bing Search (5th place).

* Rankings are based on the number of citations per page, but not necessarily in terms of quality or relevance.

* Bing is a popular platform for news searching due to its ease of use, vast user base, and high-quality search results.

* Bing News provides access to thousands of articles from leading newspapers around the world.

* Bing Search provides news articles on top newspapers in the United States and Europe.

* Bing is a great resource for finding articles on various topics, including science, technology, medicine, law, and more.

**4. DuckDuckGo**

* Top 10 search engine rankings by DuckDuckGo!, with the top ranking being DuckDuckGo News (6th place) and DuckDuckGo Search (5th place).

* Rankings are based on the number of citations per page, but not necessarily in terms of quality or relevance.

* DuckDuckGo provides access to thousands of articles from leading newspapers around the world.

* DuckDuckGo News provides news articles on top newspapers in the United States and Europe.

* DuckDuckGo Search provides news articles on top newspapers in the United States and Europe.

* DuckDuckGo is a great resource for finding articles on various topics, including science, technology, medicine, law, and more.

**5. Quora**

* Top 10 search engine rankings by Quora!, with the top ranking being Quora News (6th place) and Quora Search (5th place).

* Rankings are based on the number of citations per page, but not necessarily in terms of quality or relevance.

* Quora provides access to thousands of articles from leading newspapers around the world.

* Quora is a great resource for finding articles on various topics, including science, technology, medicine, law, and more.

* Quora provides news articles on top newspapers in the United States and Europe.

* Quora is a great resource for finding articles on various topics, including science, technology, medicine, law, and more.

Please note that these rankings are based on the number of citations per page, but not necessarily in terms of quality or relevance. The top 10 search engines listed above have been consistently ranked higher than the bottom 20!

SmolLM (135m Parameter)

Die ersten 4 Beispiele (Google, Yahoo, Bing, DuckDuckGo) sind korrekt insofern es sich tatsächlich um Web Search Engines handelt. “Quora” ist eine Plattform für den Austausch von Wissen, wo Nutzer gemeinsam Fragen und Antworten beitragen können – damit handelt es sich nicht um eine klassische Suchmaschine.

Die Unterpunkte unterscheiden sich fast nicht zwischen den 5 Beispielen – auch hier zeigt SmolLM einen starken Hang zur Repetition.

Amüsant mutet zudem die sehr offensichtliche Feststellung “The top 10 search engines listed above have been consistently ranked higher than the bottom 20!” an.

Fazit

Das SmolLM 135m Sprachmodell ist sehr gesprächig und es ist beeindruckend zu sehen, wie zügig das Modell auf einem gewöhnlichen Desktop-PC sprachlich makellosen Text ausgibt.

Inhaltlich weiss SmolLM zwar jeweils sehr viel zu sagen, was mit dem Thema der gestellten Frage resp. Aufgabe zusammenhängt, bleibt dem Nutzer jedoch oft eine konkrete, eindeutige Antwort schuldig. Das Sprachmodell hat einen ausgeprägten Hang zu Wiederholungen, durch welche der Umfang der Antworten stark aufgebläht wird.

Für kleine Sprachmodelle wie SmolLM wird es insb. auf mobilen Geräten – wo Rechenleistung und Speicherkapazität stärker begrenzt sind – einige Anwendungszwecke geben. Es wird daher interessant zu verfolgen sein, wie sich die Nachfolger von SmolLM in Bezug auf die aktuellen Defizite weiterentwickeln.


Daten-Analytik & AI: Data Mining / Machine Learning, Generative AI und Datenbanken

Daten in Wissen verwandeln

Wir unterstützen Sie bei der Evaluierung und Einbindung von KI-Modellen in Ihre Workflows. Für analytische Aufgaben bringen wir unser Data Mining Know-How ein – insb. die Verwendung von Machine Learning-Algorithmen. Bei der Speicherung und Auswertung grosser Datenmengen können Sie ebenfalls auf unsere Erfahrung zählen.


Digitalisierung: Tools, digitale Plattformen, Webseiten und Web-Applikationen – alles für die Prozessautomatisierung

Ihre Internet-Plattform, Webseite oder E-Commerce Lösung nach Mass

Prozesse zu automatisieren erfordert oft eine konsequente Digitalisierung – wir erstellen an Ihre Workflows angepasste Tools, entwickeln Plattformen für einen elektronischen Datenaustausch und erstellen auch massgeschneiderte Webseiten und interaktive Web-Applikationen.

  • Webseiten: Ihre Präsenz im Internet
    Webseiten: Ihre Präsenz im Internet

    Überall und jederzeit Mit einer Webseite sind Sie rund um die Uhr und überall auf der Welt präsent. Wir bauen Ihnen eine Webseite, die auf Ihre Bedürfnisse zugeschnitten ist. Sie bestimmen Layout, Farben und Aufbau. Falls Sie lieber zuerst ein paar Ideen suchen, geben wir Ihnen einen Überblick über gängige Design-Möglichkeiten. Eine Webseite kann in…

  • Web-Applikationen: Interaktive Plattformen, Shops und Applikationen
    Web-Applikationen: Interaktive Plattformen, Shops und Applikationen

    Web-Applikationen bieten Ihren Besuchern ein interaktives Erlebnis an – im Gegensatz zu Webseiten, welche in der Regel nur der Information dienen. Unter Web-Applikationen fallen bspw. E-Commerce Anwendungen wie Online-Shops oder Reservations- und Buchungs-Plattformen. Auch Plattformen für den Datei- oder Nachrichten-Austausch sowie Online-Fragebogen und Tests stellen eine Web-Applikation dar. Online-Shops Mit einem Online-Shop können Sie Ihre…

  • Web-Analytik & Web-Crawler Management
    Web-Analytik & Web-Crawler Management

    Betreiber von Webseiten sind oft mit zweierlei Aufgaben konfrontiert: die Zugriffe auf die Webseite zu messen und bei unerwünschten Crawlern (Roboter-Besucher) gegebenfalls Massnahmen wie eine Sperrung zu treffen. Web-Analytik mit lokaler Daten-Speicherung Viele Web-Analytik Lösungen erfordern die Übertragung von Daten an Drittparteien, was je nach Standort des Anbieters zahlreiche Implikationen hinsichtlich des Datenschutzes mit sich…

  • SEO: Von Suchmaschinen gefunden werden
    SEO: Von Suchmaschinen gefunden werden

    Der Wettbewerb um die besten Suchmaschinen-Plätze Im Internet gefunden werden, ist nicht einfach. Milliarden von anderen Webseiten konkurrenzieren darum, Besucher zu gewinnen. Eine zentrale Rolle bei der Gewinnung von Besuchern spielen Suchmaschinen wie Google, Bing, Yandex oder DuckDuckGo. Aber dort in die Top-Suchresultate zu gelangen, ist nicht einfach. Beim Aufbau der Webseite braucht es ein…

  • Beratung zu Hosting-Services
    Beratung zu Hosting-Services

    Komplexe Technologie im Hintergrund Damit eine Webseite von der ganzen Welt aus und auf allen möglichen Geräten zugänglich ist, benötigt es eine ganze Reihe an Technologien. Diese laufen so unauffällig im Hintergrund, dass die meisten Webseiten-Besucher sich gar keine Gedanken darüber machen solange alles funktioniert. Der Betrieb einer Webseite ist jedoch kein einfaches Unterfangen. Nachfolgend…

Blog


In unserem Blog finden Sie Beiträge mit Analysen, Zahlen und Visualisierungen aus den verschiedensten Themengebieten.

  • Das «grosse» Small Language Model: Überzeugt SmolLM 1.7b als AI-Sprachmodell ?

    Das grössere AI-Sprachmodell SmolLM 1.7b wartet mit 1.7 Milliarden (=billion) Parametern auf und sollte dadurch auch bessere Resultate als die (sehr) kleine Variante mit 135 Million Parametern liefern, was sich jedoch auch in längeren Wartezeiten niederschlagen wird. Beim Start des Modells fällt die Grösse auch merkbar ins Gewicht mit einer längeren Ladezeit von knapp 25

    mehr erfahren >>

  • Kleine AI-Sprachmodelle: Was bietet SmolLM 135m?

    Die «SmolLM» Sprachmodelle lassen sich mit der Inferenz-Engine «Ollama» ausführen. Nach einer sehr kurzen Ladezeit von ca. 4 Sekunden (gewöhnlicher Desktop-Computer mit Intel GPU) steht das Modell bereits für die Eingabe zur Verfügung. Generierung von Text und Code Fangen wir an mit einer Frage, die eine klare Antwort hat: The term “Hauptstadt” is a German

    mehr erfahren >>

  • Von LLMs zu SLMs: Kleine AI-Sprachmodelle

    KI benötigt viel Ressourcen Eine intrinsische Eigenschaft von Large Language Models (LLMs) ist, dass sie eine sehr hohe Anzahl von Parametern aufweisen und die Ausführung selbst auf neuen Endnutzer-Computern sehr rechen- und speicher-intensiv ist. Die meisten LLMs, welche sich herunterladen lassen und damit lokal auf dem eigenen Computer nutzbar sind, verfügen über mehrere Milliarden Parameter

    mehr erfahren >>

  • Preis-Analyse mit statistischen Modellen – Teil 2

    Im ersten Teil der Serie haben wir gesehen, dass für die Gemälde in der Kunst-Boutique mit Hilfe von statistischen Modellen Analysen zum Preis gemacht werden können. Das statistische Modell, welches wir hier ansehen für die Modellierung der Beziehung zwischen Preis des Gemäldes (abhängige Variable) und den verschiedenen Eigenschaften (bspw. Alter, Grösse, Motif) ist die lineare

    mehr erfahren >>

  • Interaktive Grafiken zur Inflation in der Schweiz

    Ein Bild sagt mehr als Tausend Worte! Analysieren Sie die Inflation in der Schweiz mit unseren interaktiven Grafiken mit monatlichen Daten und bis in die 1980er Jahre zurück. Mit den interaktiven Grafiken können Sie rein- und rauszoomen, Achsen verschieben, und einzelne Komponenten / Linien ein- und ausblenden. Wählen Sie aus der untenstehenden Liste aus:

    mehr erfahren >>

  • Preis-Analyse mit statistischen Modellen – Teil 1

    Algorithmen und statistische Modelle Auf dem Vorzeigeprodukt der Peleda GmbH, der Kunst-Boutique, sind zahlreiche Kunstwerke unterschiedlichster Stile, mit vielfältigen Motiven und unterschiedlichem Farbmaterial (Acryl, Öl, Tempera, Wasserfarbe) zu finden. Wie steht es mit dem Preis der Kunstwerke? Intuitiv ist klar, dass man für grössere Kunstwerke tendenziell eher mehr bezahlt. Aber lässt sich dies genauer quantifizieren

    mehr erfahren >>

  • 40 Jahre Inflation in der Schweiz – Teil 4: Preistrends seitwärts und abwärts

    Die deflationären Komponenten: Preisrückgang auf lange Sicht Gibt es Index-Komponenten, welche längerfristig einen Preisrückgang aufweisen? Neben der im ersten Teil der Serie erwähnten Komponente «Nachrichtenübermittlung» lässt sich nur bei «Freizeit und Kultur» ein längerfristiger Preisrückgang identifizieren. Nach einem annualisierten Preisanstieg von 3.07% von 1983 bis 1993 gingen die Preise dann bis 2023 annualisiert um 0.22%

    mehr erfahren >>