Field-Adaptive Description Generator
A fine-tuned text generation model for generating SEO-friendly descriptions from presentation template metadata. This model uses LoRA adapters to efficiently fine-tune Google Gemma-3-4B-IT for generating descriptions as part of the Field-Adaptive Dense Retrieval framework.
Model Description
This model generates 50-80 word SEO-friendly descriptions from presentation template metadata including titles, visual elements, industries, categories, and tags. It serves as a key component in the Field-Adaptive Dense Retrieval system for structured documents.
Base Model: unsloth/gemma-3-4b-it-unsloth-bnb-4bit
Model Type: Causal Language Model with LoRA
Language: English
License: Apache 2.0
Usage
With Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"mudasir13cs/Field-adaptive-description-generator"
)
tokenizer = AutoTokenizer.from_pretrained(
"mudasir13cs/Field-adaptive-description-generator"
)
# Format prompt using Gemma chat template
prompt = """<start_of_turn>user
Generate a 50-80 word SEO-friendly description for this presentation template:
Title: Modern Business Presentation
Visual Elements: minimalist design, blue gradient background, geometric shapes
Industries: Business, Marketing
Categories: Corporate, Professional
Tags: Modern, Clean, Professional
Requirements:
- Describe visual style naturally
- Mention 2-3 specific use cases
- Integrate keywords organically (no markdown/bold formatting)
- Professional yet engaging tone
- Exactly 50-80 words
- Start directly with the description (no prefixes)
<end_of_turn>
<start_of_turn>model
"""
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=512, temperature=0.7, do_sample=True)
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generated_text)
With llama.cpp
# Download the GGUF model
huggingface-cli download mudasir13cs/Field-adaptive-description-generator-gguf \
description-generator-q4_k_m.gguf --local-dir . --local-dir-use-symlinks False
# Run inference
./llama-cli -m description-generator-q4_k_m.gguf \
-p "<start_of_turn>user
Generate a 50-80 word SEO-friendly description for this presentation template:
Title: Modern Business Presentation
Visual Elements: minimalist design, blue gradient background, geometric shapes
Industries: Business, Marketing
Categories: Corporate, Professional
Tags: Modern, Clean, Professional
<end_of_turn>
<start_of_turn>model
"
With Ollama
# Import model to Ollama
ollama create field-adaptive-description-generator -f Modelfile
# Run inference
ollama run field-adaptive-description-generator "<start_of_turn>user
Generate a 50-80 word SEO-friendly description for this presentation template:
Title: Modern Business Presentation
Visual Elements: minimalist design, blue gradient background, geometric shapes
Industries: Business, Marketing
Categories: Corporate, Professional
Tags: Modern, Clean, Professional
<end_of_turn>
<start_of_turn>model
"
Expected Output Format
The model generates a 50-80 word description starting directly with the content (no prefixes):
This modern business presentation template features a minimalist design with a sleek blue gradient background and geometric shapes. Perfect for corporate presentations, marketing pitches, and professional meetings. The clean, professional aesthetic makes it ideal for executive briefings, client proposals, and team updates. With its contemporary style, this template suits various business contexts while maintaining a polished, engaging appearance.
Prompt Format
Always use the Gemma chat template format:
<start_of_turn>user
Generate a 50-80 word SEO-friendly description for this presentation template:
Title: [Template Title]
Visual Elements: [element1, element2, element3]
Industries: [Industry1, Industry2]
Categories: [Category1, Category2]
Tags: [Tag1, Tag2, Tag3]
Requirements:
- Describe visual style naturally
- Mention 2-3 specific use cases
- Integrate keywords organically (no markdown/bold formatting)
- Professional yet engaging tone
- Exactly 50-80 words
- Start directly with the description (no prefixes)
<end_of_turn>
<start_of_turn>model
Model Details
- Architecture: Google Gemma-3-4B-IT with LoRA adapters
- Training: Parameter-Efficient Fine-Tuning (PEFT) with LoRA
- LoRA Rank: 16
- LoRA Alpha: 32
- Training Epochs: 3
- Learning Rate: 2e-4
- Batch Size: 4
Evaluation
- BLEU Score: ~0.75
- ROUGE Score: ~0.80
- Performance: Optimized for description generation quality in structured document retrieval
Citation
Paper
@article{field_adaptive_dense_retrieval,
title={Field-Adaptive Dense Retrieval of Structured Documents},
author={Mudasir Syed},
journal={DBPIA},
year={2024},
url={https://www.dbpia.co.kr/journal/articleDetail?nodeId=NODE12352544}
}
Model
@misc{field_adaptive_description_generator,
title={Field-adaptive-description-generator for Presentation Template Description Generation},
author={Mudasir Syed},
year={2024},
howpublished={Hugging Face},
url={https://huggingface.co/mudasir13cs/Field-adaptive-description-generator}
}
Base Model
@misc{gemma_3_4b_it,
title={Gemma: Open Models Based on Gemini Research and Technology},
author={Gemma Team and others},
year={2024},
howpublished={Hugging Face},
url={https://huggingface.co/google/gemma-3-4b-it}
}
Related Models
- Field-Adaptive Query Generator - Generates search queries from template metadata
Author
Mudasir Syed (mudasir13cs)
- GitHub: https://github.com/mudasir13cs
- HuggingFace: https://huggingface.co/mudasir13cs
- LinkedIn: https://pk.linkedin.com/in/mudasir-sayed
- Downloads last month
- 78
Model tree for mudasir13cs/Field-adaptive-description-generator-gguf
Base model
google/gemma-3-4b-pt