The automated generation of educational videos based on Large Language Models (LLMs) holds promising potential to enhance pedagogy. This study investigates the use of compact LLMs with fewer than 10 billion parameters, utilising Parameter-Efficient Fine-Tuning (PEFT) techniques to generate Manim Python code that produces images and videos for educational visualisations from natural language narratives. This approach is highly resource-efficient compared to diffusion-based video generation, which is often infeasible on consumer-level hardware. Due to the lack of data availability, this study curated and reviewed the first benchmarking dataset for Manim code generation, ManimBench. ManimBench features 417 paired descriptions and corresponding Manim code samples categorised as basic, intermediate, and advanced, sourced directly from the official ManimCE documentation. The curated dataset was then used to fine-tune seven open-source compact LLMs using LoRA and QLoRA. Subsequently, their performances were evaluated comparatively against their base models using both functional and semantic metrics. The results indicate that the LoRA Fine-Tuned (FT) models consistently outperform the base models, achieving a 62% Manim render success rate. By leveraging ManimBench, further comparisons were made between the FT models and larger 14B parameter LLMs, finding that the PEFT-tuned FT coder models perform comparably well in accurate Manim code generation. However, it was also discovered that LLMs frequently make hallucination-related API errors in the generated code.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Large Language Model Approaches to Educational Video Generation Using Manim

  • Ravidu Suien Rammuni Silva,
  • Ahmad Lotfi,
  • Isibor Kennedy Ihianle,
  • Golnaz Shahtahmassebi,
  • Jordan J. Bird

摘要

The automated generation of educational videos based on Large Language Models (LLMs) holds promising potential to enhance pedagogy. This study investigates the use of compact LLMs with fewer than 10 billion parameters, utilising Parameter-Efficient Fine-Tuning (PEFT) techniques to generate Manim Python code that produces images and videos for educational visualisations from natural language narratives. This approach is highly resource-efficient compared to diffusion-based video generation, which is often infeasible on consumer-level hardware. Due to the lack of data availability, this study curated and reviewed the first benchmarking dataset for Manim code generation, ManimBench. ManimBench features 417 paired descriptions and corresponding Manim code samples categorised as basic, intermediate, and advanced, sourced directly from the official ManimCE documentation. The curated dataset was then used to fine-tune seven open-source compact LLMs using LoRA and QLoRA. Subsequently, their performances were evaluated comparatively against their base models using both functional and semantic metrics. The results indicate that the LoRA Fine-Tuned (FT) models consistently outperform the base models, achieving a 62% Manim render success rate. By leveraging ManimBench, further comparisons were made between the FT models and larger 14B parameter LLMs, finding that the PEFT-tuned FT coder models perform comparably well in accurate Manim code generation. However, it was also discovered that LLMs frequently make hallucination-related API errors in the generated code.