Update README.md
Browse files
README.md
CHANGED
|
@@ -8,6 +8,12 @@ tags:
|
|
| 8 |
- peft
|
| 9 |
- presentation-templates
|
| 10 |
- information-retrieval
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
# Field-adaptive-query-generator
|
|
@@ -15,7 +21,7 @@ tags:
|
|
| 15 |
## Model Details
|
| 16 |
|
| 17 |
### Model Description
|
| 18 |
-
A fine-tuned text generation model for query generation from presentation template metadata. This model uses LoRA adapters to efficiently fine-tune
|
| 19 |
|
| 20 |
**Developed by:** Mudasir Syed (mudasir13cs)
|
| 21 |
|
|
@@ -25,35 +31,42 @@ A fine-tuned text generation model for query generation from presentation templa
|
|
| 25 |
|
| 26 |
**License:** Apache 2.0
|
| 27 |
|
| 28 |
-
**Finetuned from model:**
|
|
|
|
|
|
|
| 29 |
|
| 30 |
### Model Sources
|
| 31 |
-
**Repository:** https://github.com/mudasir13cs/hybrid-search
|
|
|
|
|
|
|
| 32 |
|
| 33 |
## Uses
|
| 34 |
|
| 35 |
### Direct Use
|
| 36 |
-
This model is designed for generating
|
| 37 |
|
| 38 |
### Downstream Use
|
| 39 |
- Content generation systems
|
| 40 |
- SEO optimization tools
|
| 41 |
- Template recommendation engines
|
| 42 |
- Automated content creation
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
### Out-of-Scope Use
|
| 45 |
- Factual information generation
|
| 46 |
- Medical or legal advice
|
| 47 |
- Harmful content generation
|
| 48 |
-
- Tasks unrelated to presentation templates
|
| 49 |
|
| 50 |
## Bias, Risks, and Limitations
|
| 51 |
- The model may generate biased or stereotypical content based on training data
|
| 52 |
- Generated content should be reviewed for accuracy and appropriateness
|
| 53 |
- Performance depends on input quality and relevance
|
|
|
|
| 54 |
|
| 55 |
## How to Get Started with the Model
|
| 56 |
-
|
| 57 |
```python
|
| 58 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 59 |
import torch
|
|
@@ -75,65 +88,85 @@ print(generated_text)
|
|
| 75 |
|
| 76 |
### Training Data
|
| 77 |
- **Dataset:** Presentation template dataset with metadata
|
| 78 |
-
- **Size:** Custom dataset with template-
|
| 79 |
-
- **Source:** Curated presentation template collection
|
|
|
|
| 80 |
|
| 81 |
### Training Procedure
|
| 82 |
-
- **Architecture:**
|
|
|
|
| 83 |
- **Loss Function:** Cross-entropy loss
|
| 84 |
- **Optimizer:** AdamW
|
| 85 |
- **Learning Rate:** 2e-4
|
| 86 |
- **Batch Size:** 4
|
| 87 |
- **Epochs:** 3
|
|
|
|
| 88 |
|
| 89 |
### Training Hyperparameters
|
| 90 |
-
- **Training regime:** Supervised fine-tuning with LoRA
|
| 91 |
- **LoRA Rank:** 16
|
| 92 |
- **LoRA Alpha:** 32
|
| 93 |
- **Hardware:** GPU (NVIDIA)
|
| 94 |
- **Training time:** ~3 hours
|
|
|
|
| 95 |
|
| 96 |
## Evaluation
|
| 97 |
|
| 98 |
### Testing Data, Factors & Metrics
|
| 99 |
- **Testing Data:** Validation split from template dataset
|
| 100 |
-
- **Factors:** Content quality, relevance, diversity
|
| 101 |
- **Metrics:**
|
| 102 |
- BLEU score
|
| 103 |
- ROUGE score
|
| 104 |
- Human evaluation scores
|
|
|
|
|
|
|
| 105 |
|
| 106 |
### Results
|
| 107 |
- **BLEU Score:** ~0.75
|
| 108 |
- **ROUGE Score:** ~0.80
|
| 109 |
-
- **Performance:** Optimized for query generation quality
|
|
|
|
| 110 |
|
| 111 |
## Environmental Impact
|
| 112 |
- **Hardware Type:** NVIDIA GPU
|
| 113 |
- **Hours used:** ~3 hours
|
| 114 |
- **Cloud Provider:** Local/Cloud
|
| 115 |
-
- **Carbon Emitted:** Minimal (LoRA training)
|
| 116 |
|
| 117 |
## Technical Specifications
|
| 118 |
|
| 119 |
### Model Architecture and Objective
|
| 120 |
-
- **Architecture:**
|
| 121 |
-
- **
|
| 122 |
-
- **
|
| 123 |
-
- **
|
|
|
|
| 124 |
|
| 125 |
### Compute Infrastructure
|
| 126 |
- **Hardware:** NVIDIA GPU
|
| 127 |
-
- **Software:** PyTorch, Transformers, PEFT
|
| 128 |
|
| 129 |
## Citation
|
| 130 |
|
| 131 |
-
**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
```bibtex
|
| 133 |
@misc{field_adaptive_query_generator,
|
| 134 |
title={Field-adaptive-query-generator for Presentation Template Query Generation},
|
| 135 |
author={Mudasir Syed},
|
| 136 |
year={2024},
|
|
|
|
| 137 |
url={https://huggingface.co/mudasir13cs/Field-adaptive-query-generator}
|
| 138 |
}
|
| 139 |
```
|
|
@@ -147,8 +180,10 @@ Mudasir Syed (mudasir13cs)
|
|
| 147 |
## Model Card Contact
|
| 148 |
- **GitHub:** https://github.com/mudasir13cs
|
| 149 |
- **Hugging Face:** https://huggingface.co/mudasir13cs
|
|
|
|
| 150 |
|
| 151 |
## Framework versions
|
| 152 |
-
- Transformers: 4.35.0
|
| 153 |
-
- PEFT: 0.16.0
|
| 154 |
-
- PyTorch: 2.0.0
|
|
|
|
|
|
| 8 |
- peft
|
| 9 |
- presentation-templates
|
| 10 |
- information-retrieval
|
| 11 |
+
- gemma
|
| 12 |
+
base_model: unsloth/gemma-3-4b-it
|
| 13 |
+
datasets:
|
| 14 |
+
- cyberagent/crello
|
| 15 |
+
language:
|
| 16 |
+
- en
|
| 17 |
---
|
| 18 |
|
| 19 |
# Field-adaptive-query-generator
|
|
|
|
| 21 |
## Model Details
|
| 22 |
|
| 23 |
### Model Description
|
| 24 |
+
A fine-tuned text generation model for query generation from presentation template metadata. This model uses LoRA adapters to efficiently fine-tune Google Gemma-3-4B-IT for generating diverse and relevant search queries as part of the Field-Adaptive Dense Retrieval framework.
|
| 25 |
|
| 26 |
**Developed by:** Mudasir Syed (mudasir13cs)
|
| 27 |
|
|
|
|
| 31 |
|
| 32 |
**License:** Apache 2.0
|
| 33 |
|
| 34 |
+
**Finetuned from model:** unsloth/gemma-3-4b-it
|
| 35 |
+
|
| 36 |
+
**Paper:** [Field-Adaptive Dense Retrieval of Structured Documents](https://www.dbpia.co.kr/journal/articleDetail?nodeId=NODE12352544)
|
| 37 |
|
| 38 |
### Model Sources
|
| 39 |
+
- **Repository:** https://github.com/mudasir13cs/hybrid-search
|
| 40 |
+
- **Paper:** https://www.dbpia.co.kr/journal/articleDetail?nodeId=NODE12352544
|
| 41 |
+
- **Base Model:** https://huggingface.co/unsloth/gemma-3-4b-it
|
| 42 |
|
| 43 |
## Uses
|
| 44 |
|
| 45 |
### Direct Use
|
| 46 |
+
This model is designed for generating search queries from presentation template metadata including titles, descriptions, industries, categories, and tags. It serves as a key component in the Field-Adaptive Dense Retrieval system for structured documents.
|
| 47 |
|
| 48 |
### Downstream Use
|
| 49 |
- Content generation systems
|
| 50 |
- SEO optimization tools
|
| 51 |
- Template recommendation engines
|
| 52 |
- Automated content creation
|
| 53 |
+
- Field-adaptive search query generation
|
| 54 |
+
- Dense retrieval systems for structured documents
|
| 55 |
+
- Query expansion and reformulation
|
| 56 |
|
| 57 |
### Out-of-Scope Use
|
| 58 |
- Factual information generation
|
| 59 |
- Medical or legal advice
|
| 60 |
- Harmful content generation
|
| 61 |
+
- Tasks unrelated to presentation templates or structured document retrieval
|
| 62 |
|
| 63 |
## Bias, Risks, and Limitations
|
| 64 |
- The model may generate biased or stereotypical content based on training data
|
| 65 |
- Generated content should be reviewed for accuracy and appropriateness
|
| 66 |
- Performance depends on input quality and relevance
|
| 67 |
+
- Model outputs are optimized for presentation template domain
|
| 68 |
|
| 69 |
## How to Get Started with the Model
|
|
|
|
| 70 |
```python
|
| 71 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 72 |
import torch
|
|
|
|
| 88 |
|
| 89 |
### Training Data
|
| 90 |
- **Dataset:** Presentation template dataset with metadata
|
| 91 |
+
- **Size:** Custom dataset with template-query pairs
|
| 92 |
+
- **Source:** Curated presentation template collection from structured documents
|
| 93 |
+
- **Domain:** Presentation templates with field-adaptive metadata
|
| 94 |
|
| 95 |
### Training Procedure
|
| 96 |
+
- **Architecture:** Google Gemma-3-4B-IT with LoRA adapters
|
| 97 |
+
- **Base Model:** unsloth/gemma-3-4b-it
|
| 98 |
- **Loss Function:** Cross-entropy loss
|
| 99 |
- **Optimizer:** AdamW
|
| 100 |
- **Learning Rate:** 2e-4
|
| 101 |
- **Batch Size:** 4
|
| 102 |
- **Epochs:** 3
|
| 103 |
+
- **Framework:** Unsloth for efficient fine-tuning
|
| 104 |
|
| 105 |
### Training Hyperparameters
|
| 106 |
+
- **Training regime:** Supervised fine-tuning with LoRA (PEFT)
|
| 107 |
- **LoRA Rank:** 16
|
| 108 |
- **LoRA Alpha:** 32
|
| 109 |
- **Hardware:** GPU (NVIDIA)
|
| 110 |
- **Training time:** ~3 hours
|
| 111 |
+
- **Fine-tuning method:** Parameter-Efficient Fine-Tuning (PEFT)
|
| 112 |
|
| 113 |
## Evaluation
|
| 114 |
|
| 115 |
### Testing Data, Factors & Metrics
|
| 116 |
- **Testing Data:** Validation split from template dataset
|
| 117 |
+
- **Factors:** Content quality, relevance, diversity, field-adaptive retrieval performance
|
| 118 |
- **Metrics:**
|
| 119 |
- BLEU score
|
| 120 |
- ROUGE score
|
| 121 |
- Human evaluation scores
|
| 122 |
+
- Query relevance metrics
|
| 123 |
+
- Retrieval accuracy metrics
|
| 124 |
|
| 125 |
### Results
|
| 126 |
- **BLEU Score:** ~0.75
|
| 127 |
- **ROUGE Score:** ~0.80
|
| 128 |
+
- **Performance:** Optimized for query generation quality in structured document retrieval
|
| 129 |
+
- **Domain:** High performance on presentation template metadata
|
| 130 |
|
| 131 |
## Environmental Impact
|
| 132 |
- **Hardware Type:** NVIDIA GPU
|
| 133 |
- **Hours used:** ~3 hours
|
| 134 |
- **Cloud Provider:** Local/Cloud
|
| 135 |
+
- **Carbon Emitted:** Minimal (LoRA training with efficient Unsloth framework)
|
| 136 |
|
| 137 |
## Technical Specifications
|
| 138 |
|
| 139 |
### Model Architecture and Objective
|
| 140 |
+
- **Base Architecture:** Google Gemma-3-4B-IT transformer decoder
|
| 141 |
+
- **Adaptation:** LoRA adapters for parameter-efficient fine-tuning
|
| 142 |
+
- **Objective:** Generate relevant search queries from template metadata for field-adaptive dense retrieval
|
| 143 |
+
- **Input:** Template metadata (title, description, industries, categories, tags)
|
| 144 |
+
- **Output:** Generated search queries for structured document retrieval
|
| 145 |
|
| 146 |
### Compute Infrastructure
|
| 147 |
- **Hardware:** NVIDIA GPU
|
| 148 |
+
- **Software:** PyTorch, Transformers, PEFT, Unsloth
|
| 149 |
|
| 150 |
## Citation
|
| 151 |
|
| 152 |
+
**Paper:**
|
| 153 |
+
```bibtex
|
| 154 |
+
@article{field_adaptive_dense_retrieval,
|
| 155 |
+
title={Field-Adaptive Dense Retrieval of Structured Documents},
|
| 156 |
+
author={Mudasir Syed},
|
| 157 |
+
journal={DBPIA},
|
| 158 |
+
year={2024},
|
| 159 |
+
url={https://www.dbpia.co.kr/journal/articleDetail?nodeId=NODE12352544}
|
| 160 |
+
}
|
| 161 |
+
```
|
| 162 |
+
|
| 163 |
+
**Model:**
|
| 164 |
```bibtex
|
| 165 |
@misc{field_adaptive_query_generator,
|
| 166 |
title={Field-adaptive-query-generator for Presentation Template Query Generation},
|
| 167 |
author={Mudasir Syed},
|
| 168 |
year={2024},
|
| 169 |
+
howpublished={Hugging Face},
|
| 170 |
url={https://huggingface.co/mudasir13cs/Field-adaptive-query-generator}
|
| 171 |
}
|
| 172 |
```
|
|
|
|
| 180 |
## Model Card Contact
|
| 181 |
- **GitHub:** https://github.com/mudasir13cs
|
| 182 |
- **Hugging Face:** https://huggingface.co/mudasir13cs
|
| 183 |
+
- **LinkedIn:** https://pk.linkedin.com/in/mudasir-sayed
|
| 184 |
|
| 185 |
## Framework versions
|
| 186 |
+
- Transformers: 4.35.0+
|
| 187 |
+
- PEFT: 0.16.0+
|
| 188 |
+
- PyTorch: 2.0.0+
|
| 189 |
+
- Unsloth: Latest
|