This study presents the first unified training and inference study for text-to-code-to-video transformation with Manim, and shows that the correlation between code and visual metrics strengthens with SFT but weakens with inference-time enhancements, highlighting the complementary roles of training and agentic inference strategies in Manim animation generation.
Abstract
Generating programmatic animation using libraries such as Manim presents unique challenges for Large Language Models (LLMs), requiring spatial reasoning, temporal sequencing, and familiarity with domain-specific APIs that are underrepresented in general pre-training data. A systematic study of how training and inference strategies interact in this setting is lacking in current research. This study introduces ManimTrainer, a training pipeline that combines Supervised Fine-tuning (SFT) with Reinforcement Learning (RL) based Group Relative Policy Optimisation (GRPO) using a unified reward signal that fuses code and visual assessment signals, and ManimAgent, an inference pipeline featuring Renderer-in-the-loop (RITL) and API documentation-augmented RITL (RITL-DOC) strategies. Using these techniques, this study presents the first unified training and inference study for text-to-code-to-video transformation with Manim. It evaluates 17 open-source sub-30B LLMs across nine combinations of training and inference strategies using ManimBench. Results show that SFT generally improves code quality, while GRPO enhances visual outputs and increases the models'responsiveness to extrinsic signals during self-correction at inference time. The Qwen 3 Coder 30B model with GRPO and RITL-DOC achieved the highest overall performance, with a 94% Render Success Rate (RSR) and 85.7% Visual Similarity (VS) to reference videos, surpassing the baseline GPT-4.1 model by +3 percentage points in VS. Additionally, the analysis shows that the correlation between code and visual metrics strengthens with SFT and GRPO but weakens with inference-time enhancements, highlighting the complementary roles of training and agentic inference strategies in Manim animation generation.
These experiments provide empirical evidence that reasoning gains from gameplay can yield stronger transfer than math or code, and highlight GlyphBench's value as a testbed for systematic research on how language-model agents learn, interact, and generalize.
Roger Creus Castanyer, Marc-Alexandre Côté, Matthew J. Sargent et al.· 0 citations
UnifiedPlayers, a cooperative framework comprising a Planning Player that generates tasks, an Execution Player that produces multi-turn trajectories with Python tool calls, and an Evaluation Player that constructs executable verifiers, highlights cooperation among specialized players as a promising path toward self-enh...
This work dissects advantage-guided VLA post-training through a controlled empirical study that separates these design choices while accounting for their distinct estimands, and develops stage-specific offline evaluation methods to screen alternative choices efficiently, without requiring extensive real-robot policy ev...
Jia-Hang Cao, Han-Ye Zhao, Hang Lai et al.· 0 citations
A coherent map of the rapidly expanding landscape of visual RL is provided to provide researchers and practitioners with a coherent map of the rapidly expanding landscape of visual RL and to highlight promising directions for future inquiry.
Through PlayTrain, an RL framework that combines the abilities of large language models to robustly generate JavaScript games from a minimal human prompt, and an efficient pipeline that can run any JS game in a standard'gym'environment, this work reimagine RL VGE development.
R. Truong, Lance Ying, Samuel Gershman et al.· 0 citations
This work isolates the RL-stage update, retains its dominant matrix-wise directions with magnitude preservation, and transfers them to the language modules of a VLM, which improves full-update interpolation in 12 of 15 comparisons, including an 8.55 percentage-point MathVision gain on the Qwen recipient.
Su-Xin Ji, Hung-Tao Wan, Ming-Jun Liu et al.· 0 citations