Update README.md
Browse files
README.md
CHANGED
@@ -74,105 +74,6 @@ The dataset was preprocessed to fit the model's input requirements, with special
|
|
74 |
|
75 |
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
76 |
|
77 |
-
[More Information Needed]
|
78 |
-
|
79 |
-
## Evaluation
|
80 |
-
|
81 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
82 |
-
|
83 |
-
### Testing Data, Factors & Metrics
|
84 |
-
|
85 |
-
#### Testing Data
|
86 |
-
|
87 |
-
<!-- This should link to a Data Card if possible. -->
|
88 |
-
|
89 |
-
[More Information Needed]
|
90 |
-
|
91 |
-
#### Factors
|
92 |
-
|
93 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
94 |
-
|
95 |
-
[More Information Needed]
|
96 |
-
|
97 |
-
#### Metrics
|
98 |
-
|
99 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
100 |
-
|
101 |
-
[More Information Needed]
|
102 |
-
|
103 |
-
### Results
|
104 |
-
|
105 |
-
[More Information Needed]
|
106 |
-
|
107 |
-
#### Summary
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
## Model Examination [optional]
|
112 |
-
|
113 |
-
<!-- Relevant interpretability work for the model goes here -->
|
114 |
-
|
115 |
-
[More Information Needed]
|
116 |
-
|
117 |
-
## Environmental Impact
|
118 |
-
|
119 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
120 |
-
|
121 |
-
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).
|
122 |
-
|
123 |
-
- **Hardware Type:** [More Information Needed]
|
124 |
-
- **Hours used:** [More Information Needed]
|
125 |
-
- **Cloud Provider:** [More Information Needed]
|
126 |
-
- **Compute Region:** [More Information Needed]
|
127 |
-
- **Carbon Emitted:** [More Information Needed]
|
128 |
-
|
129 |
-
## Technical Specifications [optional]
|
130 |
-
|
131 |
-
### Model Architecture and Objective
|
132 |
-
|
133 |
-
[More Information Needed]
|
134 |
-
|
135 |
-
### Compute Infrastructure
|
136 |
-
|
137 |
-
[More Information Needed]
|
138 |
-
|
139 |
-
#### Hardware
|
140 |
-
|
141 |
-
[More Information Needed]
|
142 |
-
|
143 |
-
#### Software
|
144 |
-
|
145 |
-
[More Information Needed]
|
146 |
-
|
147 |
-
## Citation [optional]
|
148 |
-
|
149 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
150 |
-
|
151 |
-
**BibTeX:**
|
152 |
-
|
153 |
-
[More Information Needed]
|
154 |
-
|
155 |
-
**APA:**
|
156 |
-
|
157 |
-
[More Information Needed]
|
158 |
-
|
159 |
-
## Glossary [optional]
|
160 |
-
|
161 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
162 |
-
|
163 |
-
[More Information Needed]
|
164 |
-
|
165 |
-
## More Information [optional]
|
166 |
-
|
167 |
-
[More Information Needed]
|
168 |
-
|
169 |
-
## Model Card Authors [optional]
|
170 |
-
|
171 |
-
[More Information Needed]
|
172 |
-
|
173 |
-
## Model Card Contact
|
174 |
-
|
175 |
-
[More Information Needed]
|
176 |
|
177 |
|
178 |
## Training procedure
|
@@ -193,4 +94,26 @@ The following `bitsandbytes` quantization config was used during training:
|
|
193 |
### Framework versions
|
194 |
|
195 |
|
196 |
-
- PEFT 0.6.2.dev0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
|
79 |
## Training procedure
|
|
|
94 |
### Framework versions
|
95 |
|
96 |
|
97 |
+
- PEFT 0.6.2.dev0
|
98 |
+
|
99 |
+
### Code
|
100 |
+
|
101 |
+
```python
|
102 |
+
from peft import PeftModel, PeftConfig
|
103 |
+
|
104 |
+
peft_model_id='ckandemir/idefics-9b-pokemon-peft'
|
105 |
+
quantization_config = BitsAndBytesConfig(
|
106 |
+
load_in_4bit=True,
|
107 |
+
bnb_4bit_use_double_quant=True,
|
108 |
+
bnb_4bit_quant_type="nf4",
|
109 |
+
bnb_4bit_compute_dtype=torch.float16,
|
110 |
+
llm_int8_skip_modules=["lm_head", "embed_tokens"],
|
111 |
+
)
|
112 |
+
config = PeftConfig.from_pretrained(peft_model_id)
|
113 |
+
# Load the model with the appropriate configuration for inference
|
114 |
+
model = IdeficsForVisionText2Text.from_pretrained(config.base_model_name_or_path, quantization_config=quantization_config, device_map="auto")
|
115 |
+
processor = AutoProcessor.from_pretrained(config.base_model_name_or_path)
|
116 |
+
|
117 |
+
model = PeftModel.from_pretrained(model, peft_model_id, device_map={"":0})
|
118 |
+
|
119 |
+
```
|