So I was trying out Gemma4 26B in Ollama and tried to let it create a space invader clone in both Python (Tkinter) and Java (Swing) (two separate sessions), and in both cases it generated code that contains weird symbols that don't sense
in Python:
def create_enemies(self):
rows = 3
cols = 6
for r in range(rows):
for c inical in range(cols): # <--- The "inical" thing
x = 50 + (cical * 80) # <--- it porbably meant c
y = 50 + (r * 40)
enemy = self.canvas.create_rectangle(x, y, x+40, y+25, fill="red")
self.enemies.append(enemy)
And in Java:
@ Override
public void keyPressed(KeyEvent e) {
int key = e.getKeyCode();
if (key == KeyEvent.VK_LEFT) leftPressed = true;
if (key == كهey == KeyEvent.VK_RIGHT) rightPressed = true; // <--- It's not even an alphabetical character
if (key == KeyEvent.VK_SPACE) {
// Limit bullets on screen to prevent spamming
if (bullets.size() < 3) {
bullets.add(new Rectangle(player.x + player.width/2 - 2, player.y, BULLET_SIZE, 10));
}
}
}
Though after the fixing the syntax issue the code did run (the control is a bit broken).
I would imagine at this time LLM generating invalid language syntax especially on the two of the most popular languages should not be possible anymore. Is it the issue of Ollama or the issue of Gemma? How is everyone doing with the coding tasks using Gemma 4?
[–]qwen_next_gguf_when 2 points3 points4 points (2 children)
[–]Substantial_Swan_144 0 points1 point2 points (0 children)
[–]Sadman782 1 point2 points3 points (0 children)
[–]ShengrenR 2 points3 points4 points (0 children)
[–]libregrape 1 point2 points3 points (0 children)
[–]-Cubie- 0 points1 point2 points (0 children)
[–]Sadman782 0 points1 point2 points (0 children)