Views
No views yet
unsloth/gemma-3-4b-it-unsloth-bnb-4bit1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained(
4 "mudasir13cs/Field-adaptive-description-generator"
5)
6tokenizer = AutoTokenizer.from_pretrained(
7 "mudasir13cs/Field-adaptive-description-generator"
8)
9
10# Format prompt using Gemma chat template
11prompt = """<start_of_turn>user
12Generate a 50-80 word SEO-friendly description for this presentation template:
13 Title: Modern Business Presentation
14 Visual Elements: minimalist design, blue gradient background, geometric shapes
15 Industries: Business, Marketing
16 Categories: Corporate, Professional
17 Tags: Modern, Clean, Professional
18
19 Requirements:
20 - Describe visual style naturally
21 - Mention 2-3 specific use cases
22 - Integrate keywords organically (no markdown/bold formatting)
23 - Professional yet engaging tone
24 - Exactly 50-80 words
25 - Start directly with the description (no prefixes)
26<end_of_turn>
27<start_of_turn>model
28"""
29
30inputs = tokenizer(prompt, return_tensors="pt")
31outputs = model.generate(**inputs, max_length=512, temperature=0.7, do_sample=True)
32generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
33print(generated_text)1# Download the GGUF model
2huggingface-cli download mudasir13cs/Field-adaptive-description-generator-gguf \
3 description-generator-q4_k_m.gguf --local-dir . --local-dir-use-symlinks False
4
5# Run inference
6./llama-cli -m description-generator-q4_k_m.gguf \
7 -p "<start_of_turn>user
8Generate a 50-80 word SEO-friendly description for this presentation template:
9 Title: Modern Business Presentation
10 Visual Elements: minimalist design, blue gradient background, geometric shapes
11 Industries: Business, Marketing
12 Categories: Corporate, Professional
13 Tags: Modern, Clean, Professional
14<end_of_turn>
15<start_of_turn>model
16"1# Import model to Ollama
2ollama create field-adaptive-description-generator -f Modelfile
3
4# Run inference
5ollama run field-adaptive-description-generator "<start_of_turn>user
6Generate a 50-80 word SEO-friendly description for this presentation template:
7 Title: Modern Business Presentation
8 Visual Elements: minimalist design, blue gradient background, geometric shapes
9 Industries: Business, Marketing
10 Categories: Corporate, Professional
11 Tags: Modern, Clean, Professional
12<end_of_turn>
13<start_of_turn>model
14"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.<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>model1@article{field_adaptive_dense_retrieval,
2 title={Field-Adaptive Dense Retrieval of Structured Documents},
3 author={Mudasir Syed},
4 journal={DBPIA},
5 year={2024},
6 url={https://www.dbpia.co.kr/journal/articleDetail?nodeId=NODE12352544}
7}1@misc{field_adaptive_description_generator,
2 title={Field-adaptive-description-generator for Presentation Template Description Generation},
3 author={Mudasir Syed},
4 year={2024},
5 howpublished={Hugging Face},
6 url={https://huggingface.co/mudasir13cs/Field-adaptive-description-generator}
7}1@misc{gemma_3_4b_it,
2 title={Gemma: Open Models Based on Gemini Research and Technology},
3 author={Gemma Team and others},
4 year={2024},
5 howpublished={Hugging Face},
6 url={https://huggingface.co/google/gemma-3-4b-it}
7}