Hugging FacePraveen Venkateswaran, Anupama Murthi, Hamid AdebayoProblem & solution
Palette: teaching a small model to build decks in your design language
Summary
Frontier models impose their own house style and cannot handle confidential content, while small open models produce broken layouts with overlapping shapes and text overflow. Palette splits generation into a designer that creates a structured JSON brief and a coder that writes pptxgenjs JavaScript for each slide, trained via LoRA on synthetic data with counterfactual reasoning. The designer handles editorial judgment and the coder handles geometry. Directives allow user control, and a harness checks and repairs slides using a geometry checker and an editor model that rewrites code only when it improves, adding 3.5 points on average on PresentBench. On PresentBench, Palette ranks first on Economics and Education, third on Talk, and second overall among systems including NotebookLM, as a single 20B open-weight model.
Context
The post addresses the challenge of generating slide decks that adhere to a specific design language using small open-weight models, which typically produce broken layouts. It presents Palette, a system that fine-tunes a 20B model to generate decks by splitting the task into a designer and coder, trained on synthetic data with counterfactual reasoning, and uses a harness to check and repair output.
Approach / What changed
Palette splits deck generation into two roles: a designer that creates a structured JSON brief (palette, type, layout, content) and a coder that writes pptxgenjs JavaScript for each slide. The model is fine-tuned with LoRA on synthetic data generated by a large open teacher, with counterfactual reasoning included. A harness checks rendered slides for overlaps and overflow, and an editor model rewrites broken slides only if the fix improves the slide. Directives allow user control over design choices.
Takeaways
Splitting deck generation into a designer (editorial judgment) and coder (geometry) allows small models to handle both aspects effectively, with the brief being editable.
Training on counterfactual reasoning (why a choice was made and what was rejected) teaches the model the rule behind a choice, not just the choice.
A repair harness that only keeps fixes that measurably improve the slide makes it safe to run on every output, adding 3.5 points on average on PresentBench.
FAQ
How does Palette ensure the deck follows a specific design language?
Palette fine-tunes a 20B model on synthetic data that follows the IBM Design Language, and the training includes counterfactual reasoning about design choices. The harness also checks for consistency.
What happens when the model produces a broken slide?
The harness checks each slide for overlaps and overflow, and an editor model rewrites the code only if the fix improves the slide; otherwise the original is kept.
How are user directives incorporated?
Users add directives in [[ ]] in the plan, and the designer builds them into the brief. The model is trained on 12 categories of directives to learn intent.
Source and freshness
- Source
- huggingface.co
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.