Update README.md
Browse files
README.md
CHANGED
|
@@ -1,202 +1,130 @@
|
|
| 1 |
---
|
| 2 |
base_model: llava-hf/llava-v1.6-mistral-7b-hf
|
| 3 |
library_name: peft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
|
| 12 |
## Model Details
|
| 13 |
|
| 14 |
### Model Description
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
| 17 |
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
|
| 20 |
-
- **Developed by:** [More Information Needed]
|
| 21 |
-
- **Funded by [optional]:** [More Information Needed]
|
| 22 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 23 |
-
- **Model type:** [More Information Needed]
|
| 24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
-
- **License:** [More Information Needed]
|
| 26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 27 |
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
-
|
| 31 |
|
| 32 |
-
- **Repository:** [
|
| 33 |
-
- **Paper [optional]:** [More Information Needed]
|
| 34 |
-
- **Demo [optional]:** [More Information Needed]
|
| 35 |
|
| 36 |
## Uses
|
| 37 |
|
| 38 |
-
|
|
|
|
| 39 |
|
| 40 |
### Direct Use
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
[More Information Needed]
|
| 45 |
-
|
| 46 |
-
### Downstream Use [optional]
|
| 47 |
-
|
| 48 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
| 49 |
-
|
| 50 |
-
[More Information Needed]
|
| 51 |
|
| 52 |
### Out-of-Scope Use
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
[More Information Needed]
|
| 57 |
|
| 58 |
## Bias, Risks, and Limitations
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
[More Information Needed]
|
| 63 |
-
|
| 64 |
-
### Recommendations
|
| 65 |
-
|
| 66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 67 |
-
|
| 68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 69 |
|
| 70 |
## How to Get Started with the Model
|
| 71 |
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
|
| 76 |
## Training Details
|
| 77 |
|
| 78 |
### Training Data
|
| 79 |
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
[More Information Needed]
|
| 83 |
|
| 84 |
### Training Procedure
|
| 85 |
|
| 86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 87 |
-
|
| 88 |
-
#### Preprocessing [optional]
|
| 89 |
-
|
| 90 |
-
[More Information Needed]
|
| 91 |
-
|
| 92 |
-
|
| 93 |
#### Training Hyperparameters
|
| 94 |
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
## Evaluation
|
| 104 |
|
| 105 |
-
|
|
|
|
| 106 |
|
| 107 |
### Testing Data, Factors & Metrics
|
| 108 |
|
| 109 |
#### Testing Data
|
| 110 |
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
[More Information Needed]
|
| 114 |
-
|
| 115 |
-
#### Factors
|
| 116 |
-
|
| 117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 118 |
-
|
| 119 |
-
[More Information Needed]
|
| 120 |
-
|
| 121 |
-
#### Metrics
|
| 122 |
-
|
| 123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 124 |
-
|
| 125 |
-
[More Information Needed]
|
| 126 |
-
|
| 127 |
-
### Results
|
| 128 |
-
|
| 129 |
-
[More Information Needed]
|
| 130 |
-
|
| 131 |
-
#### Summary
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
## Model Examination [optional]
|
| 136 |
-
|
| 137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 138 |
-
|
| 139 |
-
[More Information Needed]
|
| 140 |
-
|
| 141 |
-
## Environmental Impact
|
| 142 |
-
|
| 143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 144 |
-
|
| 145 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 146 |
-
|
| 147 |
-
- **Hardware Type:** [More Information Needed]
|
| 148 |
-
- **Hours used:** [More Information Needed]
|
| 149 |
-
- **Cloud Provider:** [More Information Needed]
|
| 150 |
-
- **Compute Region:** [More Information Needed]
|
| 151 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 152 |
-
|
| 153 |
-
## Technical Specifications [optional]
|
| 154 |
-
|
| 155 |
-
### Model Architecture and Objective
|
| 156 |
-
|
| 157 |
-
[More Information Needed]
|
| 158 |
|
| 159 |
### Compute Infrastructure
|
| 160 |
|
| 161 |
-
[More Information Needed]
|
| 162 |
-
|
| 163 |
#### Hardware
|
| 164 |
|
| 165 |
-
|
| 166 |
|
| 167 |
#### Software
|
| 168 |
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
## Citation [optional]
|
| 172 |
-
|
| 173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 174 |
-
|
| 175 |
-
**BibTeX:**
|
| 176 |
-
|
| 177 |
-
[More Information Needed]
|
| 178 |
-
|
| 179 |
-
**APA:**
|
| 180 |
-
|
| 181 |
-
[More Information Needed]
|
| 182 |
-
|
| 183 |
-
## Glossary [optional]
|
| 184 |
-
|
| 185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 186 |
-
|
| 187 |
-
[More Information Needed]
|
| 188 |
-
|
| 189 |
-
## More Information [optional]
|
| 190 |
-
|
| 191 |
-
[More Information Needed]
|
| 192 |
-
|
| 193 |
-
## Model Card Authors [optional]
|
| 194 |
-
|
| 195 |
-
[More Information Needed]
|
| 196 |
-
|
| 197 |
-
## Model Card Contact
|
| 198 |
|
| 199 |
-
[More Information Needed]
|
| 200 |
### Framework versions
|
| 201 |
|
| 202 |
- PEFT 0.13.1.dev0
|
|
|
|
| 1 |
---
|
| 2 |
base_model: llava-hf/llava-v1.6-mistral-7b-hf
|
| 3 |
library_name: peft
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
datasets:
|
| 6 |
+
- mirzaei2114/stackoverflowVQA-filtered-small
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
tags:
|
| 10 |
+
- llava
|
| 11 |
+
- llava-next
|
| 12 |
+
- fine-tuned
|
| 13 |
+
- stack-overflow
|
| 14 |
+
- qlora
|
| 15 |
+
- images
|
| 16 |
+
- vqa
|
| 17 |
+
- 4bit
|
| 18 |
---
|
| 19 |
|
| 20 |
# Model Card for Model ID
|
| 21 |
|
| 22 |
+
Finetuned LLaVA-Next model for Visual QA on Stack Overflow questions with images.
|
|
|
|
|
|
|
| 23 |
|
| 24 |
## Model Details
|
| 25 |
|
| 26 |
### Model Description
|
| 27 |
|
| 28 |
+
This model is a finetuned version of **LLaVA-Next (llava-hf/llava-v1.6-mistral-7b-hf)** specifically for visual question answering (VQA)
|
| 29 |
+
on Stack Overflow questions containing images. The model was finetuned using **QLoRA** with 4-bit quantization, optimized to handle both
|
| 30 |
+
text and image inputs.
|
| 31 |
|
| 32 |
+
The training dataset was filtered from the **mirzaei2114/stackoverflowVQA-filtered-small** dataset.
|
| 33 |
+
Only samples with a maximum input length of 1024 (for both question and answer combined) were used. Images were kept
|
| 34 |
+
to size to capture detail needed for methods such as optical character recognition.
|
| 35 |
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
+
- **Developed by:** Adam Cassidy
|
| 39 |
+
- **Model type:** Visual QA
|
| 40 |
+
- **Language(s) (NLP):** EN
|
| 41 |
+
- **License:** Apache License, Version 2.0
|
| 42 |
+
- **Finetuned from model [optional]:** llava-hf/llava-v1.6-mistral-7b-hf
|
| 43 |
|
| 44 |
+
### Model Sources
|
| 45 |
|
| 46 |
+
- **Repository:** [llava-hf/llava-v1.6-mistral-7b-hf](https://huggingface.co/llava-hf/llava-v1.6-mistral-7b-hf)
|
|
|
|
|
|
|
| 47 |
|
| 48 |
## Uses
|
| 49 |
|
| 50 |
+
Drag a snipping rectangle for a screenshot around the exact focus/context for a question related to software development(usually front end)
|
| 51 |
+
and accompany it with the question for inference.
|
| 52 |
|
| 53 |
### Direct Use
|
| 54 |
|
| 55 |
+
Visual Question Answering (VQA) on technical Stack Overflow (software-adjacent) questions with accompanying images.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
### Out-of-Scope Use
|
| 58 |
|
| 59 |
+
General-purpose VQA tasks, though performance on non-technical domains may vary.
|
|
|
|
|
|
|
| 60 |
|
| 61 |
## Bias, Risks, and Limitations
|
| 62 |
|
| 63 |
+
Model Capacity: The model was trained using 4-bit QLoRA.
|
| 64 |
+
Dataset Size: The training dataset is relatively small, and this may impact generalization to other VQA datasets or domains outside of Stack Overflow.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
## How to Get Started with the Model
|
| 67 |
|
| 68 |
+
To use this model, ensure you have the following dependencies installed:
|
| 69 |
+
torch==2.4.1+cu121
|
| 70 |
+
transformers==4.45.1
|
| 71 |
|
| 72 |
## Training Details
|
| 73 |
|
| 74 |
### Training Data
|
| 75 |
|
| 76 |
+
[mirzaei2114/stackoverflowVQA-filtered-small](https://huggingface.co/datasets/mirzaei2114/stackoverflowVQA-filtered-small/viewer/default/train)
|
|
|
|
|
|
|
| 77 |
|
| 78 |
### Training Procedure
|
| 79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
#### Training Hyperparameters
|
| 81 |
|
| 82 |
+
TrainingArguments(
|
| 83 |
+
per_device_train_batch_size=4,
|
| 84 |
+
per_device_eval_batch_size=4,
|
| 85 |
+
max_grad_norm=0.1,
|
| 86 |
+
evaluation_strategy="steps",
|
| 87 |
+
eval_steps=15,
|
| 88 |
+
group_by_length=True,
|
| 89 |
+
logging_steps=15,
|
| 90 |
+
gradient_checkpointing=True,
|
| 91 |
+
gradient_accumulation_steps=2,
|
| 92 |
+
num_train_epochs=3,
|
| 93 |
+
weight_decay=0.1,
|
| 94 |
+
warmup_steps=10,
|
| 95 |
+
lr_scheduler_type="cosine",
|
| 96 |
+
learning_rate=1e-5,
|
| 97 |
+
save_steps=15,
|
| 98 |
+
save_total_limit=5,
|
| 99 |
+
bf16=True,
|
| 100 |
+
remove_unused_columns=False
|
| 101 |
+
)
|
| 102 |
+
|
| 103 |
+
#### Speeds, Sizes, Times
|
| 104 |
+
|
| 105 |
+
checkpoint-240
|
| 106 |
|
| 107 |
## Evaluation
|
| 108 |
|
| 109 |
+
Evaluation Loss (Pre-finetuning): 2.93
|
| 110 |
+
Validation Loss (Post-finetuning): 1.78
|
| 111 |
|
| 112 |
### Testing Data, Factors & Metrics
|
| 113 |
|
| 114 |
#### Testing Data
|
| 115 |
|
| 116 |
+
[mirzaei2114/stackoverflowVQA-filtered-small](https://huggingface.co/datasets/mirzaei2114/stackoverflowVQA-filtered-small/viewer/default/test)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
|
| 118 |
### Compute Infrastructure
|
| 119 |
|
|
|
|
|
|
|
| 120 |
#### Hardware
|
| 121 |
|
| 122 |
+
L4 GPU
|
| 123 |
|
| 124 |
#### Software
|
| 125 |
|
| 126 |
+
Google Colab
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
|
|
|
|
| 128 |
### Framework versions
|
| 129 |
|
| 130 |
- PEFT 0.13.1.dev0
|