I tried Qwen2.5-Coder-7B-Instruct.Q6_K locally with Ollama as the loader, asking it to create a simple Snake game in Python with Pygame and as an extra challenge, the instructions were given in German.

The game works well: the snake grows correctly, the grid and colors are fine. I just had to give the model a little nudge in two places:

- Don’t change the food color every frame
- Avoid recursive gameLoop() for "Play Again"

Qwen2.5 is a great co-pilot that handles most of the work, leaving only minor bugs to correct. German works surprisingly well ("Schlankkörpers" instead of "Schlangenkörper" does not matter, such errors can also occur in large models from time to time...) even though the main language is English. The model supports many programming languages such as: Python, C, C++, Java, JavaScript, HTML/CSS, Bash, SQL… and more.

Conclusion: It still doesn't work completely without programming knowledge, but as a local assistant Qwen2.5-Coder is excellent.

btw my prompt was: "write the game again."

Video workflow:

- Recorded with OBS
- Edited in Kdenlive
- Transcoded with VAAPI (H.264)

No cloud, real hardware.
Everything runs on Linux + Text Generation Web UI (FOSS), so anyone can set this up.
No GPU? No problem, you can also run it using PyTorch’s CPU backend, just much slower.

Background music: ALICE - CROSS THE BORDER (https://www.youtube.com/watch?v=dcqbWgxW4oU)

#Qwen2 #LLM #LocalAI #Ai #vibecoding #Python #Pygame #CodingAI #FOSS #Linux #SnakeGame #Ollama #AIcoPilot #MultilingualAI #TextGenerationWebUI #OBS #Kdenlive #VAAPI #NoCloud #LocalAIWorkflow
FOSS Advent Calendar - Door 23: Generating Text with Text-Generation-WebUI

Today we explore Text-Generation-WebUI, a FOSS tool that lets us run large language models locally through a simple web interface. For this demo, I am using 20B GPT-OSS from OpenAI in 4-bit quantization.

I tested it with a physics/chemistry prompt: "Derive the general formula for the energy levels of a particle confined in a 2D infinite square well potential (a 'quantum box') with side length L. Start from the time-independent Schrödinger equation and apply the appropriate boundary conditions." The model produced correct results, although LaTeX rendering had minor issues. You also get full access to its reasoning, so you can follow step by step how the model arrives at the solution.

Everything runs locally, so our data stays private and no cloud services are required. Text-Generation-WebUI is perfect for experimenting with AI, studying, or nerdy fun.

Pro tip: try giving the model a challenging physics, math, or coding problem and check its reasoning along with the answer.

Link: https://github.com/oobabooga/text-generation-webui

What problem would you test with your local language model, a math derivation, a story, or code snippet?

#FOSS #OpenSource #Linux #CLI #Terminal #TextGenerationWebUI #LocalAI #LanguageModels #GPTOSS #4bitQuant #NLP #NerdContent #AdventCalendar #OpenTools #FOSSAdvent #CommandLine #CreativeAI #AI #Fediverse #TechNerds #adventkalender #adventskalender #KI #ArtificialIntelligence #KünstlicheIntelligenz #llm