Applied generative systems
SVG Generation Competition Workflow
A structured-generation workflow for valid SVG output under competition constraints.
This project was less about image generation in the abstract and more about structured output discipline. The challenge was to generate SVG that was not only visually plausible but also syntactically valid and robust enough to score well under competition evaluation.
Problem
SVG generation exposes a different failure mode than ordinary text generation. A response can look close to correct while still breaking the format contract. That meant the workflow had to care about validity, repair, and constrained decoding rather than only “creative” output.
What I built
I fine-tuned Qwen2.5-Coder-3B-Instruct with LoRA and built an experimentation loop around prompt design, decoding choices, response validation, and simple repair logic. The work was iterative by design: run an experiment, inspect failure modes, tighten the checks, and repeat.
Why it belonged on the site
This project is one of the clearest GenAI engineering signals in the portfolio because it was not a one-shot prompt exercise. It was a repeated training and inference loop with 22 tracked runs, explicit output validation, and repair logic around the model whenever the raw generation path stopped respecting the SVG contract.
Training and validation loop
| Part of the workflow | What I did | Why it mattered |
|---|---|---|
| Base model | Qwen2.5-Coder-3B-Instruct | The model was already good at structured syntax, which made it a reasonable base for SVG output. |
| Fine-tuning | LoRA-based adaptation | Made it practical to iterate on a competition workflow without training a large model from scratch. |
| Validation | SVG and XML checks after generation | Separated visually plausible output from output that actually satisfied the format contract. |
| Repair | Retry and repair logic for malformed responses | Handled formatting fragility explicitly instead of pretending the model alone solved it. |
| Iteration | 22 tracked experiments | Made failure modes easier to compare instead of relying on one-off impressions. |
Experimentation
In total I ran 22 experiments. The value of that process was not only the final score, but the clearer sense of which errors came from model behavior, which came from formatting fragility, and which were better handled by post-generation validation.
What the score meant
The best run reached a competition score of 0.93762. I treat that number as useful but not magical. The stronger result was learning which improvements came from model changes, which came from decoding choices, and which were better solved by validation and repair around the model.
Outcome
This project taught me to treat structured generation as a systems problem: define the contract, validate the output, and keep the loop honest with repeated measurement. That is the same instinct I carry into backend and ML systems work elsewhere on the site.