---
title: "How good are LLMs at fixing their mistakes? A chatbot arena experiment with Keras and TPUs"
description: "Small instruction-tuned LLMs were given a calendar-assistant task that translates spoken requests into single-line Python API calls, then corrected in plain English when they made mistakes."
url: "https://swe.quest/articles/how-good-are-llms-at-fixing-their-mistakes-a-chatbot-arena-experiment-with-adf023c40d56214c"
canonical: "https://huggingface.co/blog/keras-chatbot-arena"
source: "Hugging Face"
published: "2024-12-05"
difficulty: "medium"
kind: "Research"
reading_minutes: 15
tags: ["llms","evals","inference","python"]
---

# How good are LLMs at fixing their mistakes? A chatbot arena experiment with Keras and TPUs

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2024-12-05, 15 min read, Research. Original: [https://huggingface.co/blog/keras-chatbot-arena](https://huggingface.co/blog/keras-chatbot-arena)

## Summary

Small instruction-tuned LLMs were given a calendar-assistant task that translates spoken requests into single-line Python API calls, then corrected in plain English when they made mistakes. Gemma 2 9B and Llama 3.1 8B completed the dialog reliably and fixed errors when told, while 1–3B models, Vicuna and Mistral 7B often failed or compounded mistakes. CodeGemma had sticky recurring errors, and online Gemini was not better despite its size. The test harness is a Gradio app on Hugging Face Spaces that shards eight models across a TPU v5e 2x4 (128GB) using Keras layout maps on JAX, keeping seven or eight sub-10B models in memory at once in bfloat16.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- LLM prompting basics ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- instruction-tuned chat models

## Keywords

Keras, KerasHub, JAX, TPU v5e, Gradio, Gemma 2, Llama 3.1, Hugging Face Spaces

## Related posts

- [“Llama 3.2 in Keras”](https://swe.quest/articles/llama-3-2-in-keras-c28d5e4494723a08.md): Hugging Face · 2024-10-21 · Medium · 5 min read · Model training, LLMs, Python, Inference & serving
  Keras (via keras\_hub) loads Llama 3.2 directly from standard safetensors Hugging Face checkpoints with on-the-fly conversion, so it has worked since day one.
- [Building LLMs for Code Repair](https://swe.quest/articles/building-llms-for-code-repair-56ef089519b9fe77.md): Replit · 2024-04-02 · Hard · 14 min read · Model training, AI for coding, LLMs, Evaluation, Data pipelines
  Replit finetuned a 7B code model (DeepSeek-Coder-Instruct-v1.5) to repair Python errors flagged by LSP diagnostics.
- [Code Llama: Llama 2 learns to code](https://swe.quest/articles/code-llama-llama-2-learns-to-code-bbc6e9367fb26138.md): Hugging Face · 2023-08-25 · Medium · 12 min read · LLMs, AI for coding, Inference & serving, Python, Evaluation
  Code Llama is a family of 7B, 13B and 34B Llama 2 derivatives trained on 500B tokens of code.
- [📚 3LM: A Benchmark for Arabic LLMs in STEM and Code](https://swe.quest/articles/3lm-a-benchmark-for-arabic-llms-in-stem-and-code-45eb24e056a94df9.md): Hugging Face · 2025-08-01 · Medium · 5 min read · Evaluation, LLMs
  3LM is a benchmark for evaluating Arabic LLMs on STEM reasoning and code generation, built from three datasets: 865 native MCQs extracted from Arabic grade 8–12 educational materials via OCR (with Pix2Tex for math) and LLM-assisted extraction, 1,744 synthetic mid-to-high difficulty MCQs generated with the YourBench pipeline, and Arabic translations of HumanEval+ and MBPP+ validated by backtranslation with a ROUGE-L F1 cutoff of 0.8.
- [CodeGemma - an official Google release for code LLMs](https://swe.quest/articles/codegemma-an-official-google-release-for-code-llms-3ae6555e4222e566.md): Hugging Face · 2024-04-09 · Medium · 8 min read · LLMs, AI for coding, Inference & serving
  CodeGemma is a family of Gemma-based code models from Google: a 2B base model trained only on fill-in-the-middle infilling for fast, low-latency completion, a 7B base model mixing infilling (80%) with natural language, and a 7B instruct model for conversational coding.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
