Run this model with HF Jobs

Run mindfossil/pkmodel-mistral-layout-merged on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/mindfossil/pkmodel-mistral-layout-merged. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/mindfossil/pkmodel-mistral-layout-merged on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/mindfossil/pkmodel-mistral-layout-merged. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/mindfossil/pkmodel-mistral-layout-merged. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

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:

  1. This model β€” prompt β†’ slide layout JSON
  2. FLUX.1 LoRA (mindfossil/pkmodel-flux-lora, coming soon) β€” visual style generation
  3. python-pptx renderer β€” JSON β†’ editable .pptx
Downloads last month
-
Safetensors
Model size
7B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for mindfossil/pkmodel-mistral-layout-merged

Adapter
(1,209)
this model