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."
SmolLM (135m Parameter)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 ```
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.




