Text Generation
PEFT
Safetensors
English
mistral
lora
presentation
powerpoint
slide-design
conversational
Instructions to use mindfossil/pkmodel-mistral-layout-merged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mindfossil/pkmodel-mistral-layout-merged with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
pkmodel-mistral-layout-merged
Fine-tuned version of Mistral-7B-Instruct-v0.2 trained to generate structured slide layout JSON from natural language prompts.
What it does
Give it a prompt like:
"Create a 5-slide pitch deck for a SaaS startup with dark blue and orange colors"
It returns a structured JSON object describing the full deck layout β titles,
slide types, color themes, element positions β ready to pass into a python-pptx
rendering pipeline to produce an editable .pptx file.
Training
- Base model: Mistral-7B-Instruct-v0.2
- Method: QLoRA (4-bit) β merged to full BF16
- Dataset: SlideModel template library metadata (titles, descriptions, tags, categories, colors, layouts)
- Hardware: A100 40GB (Google Colab Pro)
- Epochs: 3
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch, json
model_id = "mindfossil/pkmodel-mistral-layout-merged"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, dtype=torch.bfloat16, device_map="auto"
)
SYSTEM = """You are pkmodel, an expert presentation designer.
Given a user request, output a valid JSON object describing the slide deck layout.
Output only valid JSON. No explanation, no markdown fences."""
prompt = f"<s>[INST] <<SYS>>\n{SYSTEM}\n<</SYS>>\n\nCreate a 3-slide overview deck for a fintech product. [/INST]"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
out = model.generate(**inputs, max_new_tokens=800, temperature=0.7, do_sample=True)
response = tokenizer.decode(out[0], skip_special_tokens=True)
layout = json.loads(response.split("[/INST]")[-1].strip())
print(json.dumps(layout, indent=2))
Part of the pkmodel pipeline
This model is the layout brain in a two-model pipeline:
- This model β prompt β slide layout JSON
- FLUX.1 LoRA (
mindfossil/pkmodel-flux-lora, coming soon) β visual style generation - python-pptx renderer β JSON β editable
.pptx
- Downloads last month
- -
Model tree for mindfossil/pkmodel-mistral-layout-merged
Base model
mistralai/Mistral-7B-Instruct-v0.2