Dataset Viewer
Auto-converted to Parquet Duplicate
messages
listlengths
3
3
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
[ { "role": "system", "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```py...
End of preview. Expand in Data Studio

AOS-Manim-SFT (AOS ManimCE SFT Dataset)

Curated, high-quality Supervised Fine-Tuning (SFT) dataset for training Qwen3-8B and frontier code models to generate executable, visually appealing mathematical animations using Manim Community Edition (ManimCE).

Derived and refined from authentic multi-turn code agent execution trajectories in nabin2004/AOS-Trajectories.


Key Characteristics

  • 100% AST Syntax Verified: Every single code snippet passes Python ast.parse() with zero syntax errors.
  • Pure Standard ManimCE: All scenes inherit from Scene and use community-standard ManimCE imports (from manim import *). Standalone and executable via manim -ql scene.py.
  • LaTeX Escape Sequence Clean: All mathematical expressions (\mathbf, \frac, \lambda, \sum) are properly formatted as raw string literals to prevent escape sequence warnings.
  • Pedagogical Spatial Reasoning: Assistant responses feature a visual and pedagogical planning outline prior to the code fence, boosting model spatial reasoning and visual accuracy.
  • Qwen Chat Template: Formatted cleanly with system, user, and assistant message objects.

Dataset Splits

Split Rows Format Description
train 333 JSONL & Parquet Training split for SFT
validation 38 JSONL & Parquet Evaluation split for validation loss & generation
Total 371 Curated, unique educational trajectories

Sample Format

{
  "messages": [
    {
      "role": "system",
      "content": "You are an expert Python programmer specializing in the Manim Community Edition (ManimCE) library. You write clean, executable, and visually appealing mathematical animations. Always plan your spatial layout and animation sequence, then wrap your complete Python code in ```python ... ``` blocks."
    },
    {
      "role": "user",
      "content": "Create a Manim animation explaining eigenvectors and eigenvalues with 2D transformations and dynamic coordinate labels."
    },
    {
      "role": "assistant",
      "content": "Here is the visual and pedagogical plan for the animation:\n1. Introduction - Opening title\n2. The Defining Equation - Shows A v = lambda v\n...\n\n```python\nfrom manim import *\n\nclass EigenvalueScene(Scene):\n    def construct(self):\n        ...\n```"
    }
  ]
}

Quickstart & Training

1. Load with Hugging Face Datasets

from datasets import load_dataset

dataset = load_dataset("nabin2004/AOS-Manim-SFT")
print(dataset)
# DatasetDict({
#     train: Dataset({ features: ['messages'], num_rows: 333 }),
#     validation: Dataset({ features: ['messages'], num_rows: 38 })
# })

2. Finetune Qwen3-8B with Unsloth / SFTTrainer

from datasets import load_dataset
from trl import SFTTrainer
from unsloth import FastLanguageModel

# Load Qwen3-8B
model, tokenizer = FastLanguageModel.from_pretrained(
    model_name="Qwen/Qwen3-8B",
    max_seq_length=2048,
    load_in_4bit=True,
)

# Apply LoRA
model = FastLanguageModel.get_peft_model(
    model,
    r=32,
    target_modules=["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"],
    lora_alpha=16,
    lora_dropout=0.05,
    bias="none",
)

# Format with Qwen chat template
def formatting_prompts_func(examples):
    texts = tokenizer.apply_chat_template(
        examples["messages"],
        tokenize=False,
        add_generation_prompt=False,
    )
    return {"text": texts}

dataset = load_dataset("nabin2004/AOS-Manim-SFT", split="train")
dataset = dataset.map(formatting_prompts_func, batched=True)

Curation Pipeline

Engineered in apps/new_dataset of the AOS (Agentic Orchestration System) repository.

Downloads last month
114