111
Browse files- README.md +4 -0
- modeling_fegeo_llama.py +0 -1
README.md
CHANGED
|
@@ -36,6 +36,7 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
| 36 |
trust_remote_code=True)
|
| 37 |
tokenizer = AutoTokenizer.from_pretrained(
|
| 38 |
'NaughtyDog97/FormalEnhencedGPS-9B',
|
|
|
|
| 39 |
trust_remote_code=True)
|
| 40 |
|
| 41 |
# text prompt
|
|
@@ -140,6 +141,8 @@ formalization_model = AutoModelForCausalLM.from_pretrained(
|
|
| 140 |
|
| 141 |
formalization_tokenizer = AutoTokenizer.from_pretrained(
|
| 142 |
'NaughtyDog97/GeoFormalizer',
|
|
|
|
|
|
|
| 143 |
trust_remote_code=True)
|
| 144 |
|
| 145 |
|
|
@@ -150,6 +153,7 @@ reason_model = AutoModelForCausalLM.from_pretrained(
|
|
| 150 |
trust_remote_code=True)
|
| 151 |
reason_tokenizer = AutoTokenizer.from_pretrained(
|
| 152 |
'NaughtyDog97/FormalEnhencedGPS-9B',
|
|
|
|
| 153 |
trust_remote_code=True)
|
| 154 |
|
| 155 |
|
|
|
|
| 36 |
trust_remote_code=True)
|
| 37 |
tokenizer = AutoTokenizer.from_pretrained(
|
| 38 |
'NaughtyDog97/FormalEnhencedGPS-9B',
|
| 39 |
+
use_fast=False,
|
| 40 |
trust_remote_code=True)
|
| 41 |
|
| 42 |
# text prompt
|
|
|
|
| 141 |
|
| 142 |
formalization_tokenizer = AutoTokenizer.from_pretrained(
|
| 143 |
'NaughtyDog97/GeoFormalizer',
|
| 144 |
+
use_fast=True,
|
| 145 |
+
padding_side="right",
|
| 146 |
trust_remote_code=True)
|
| 147 |
|
| 148 |
|
|
|
|
| 153 |
trust_remote_code=True)
|
| 154 |
reason_tokenizer = AutoTokenizer.from_pretrained(
|
| 155 |
'NaughtyDog97/FormalEnhencedGPS-9B',
|
| 156 |
+
use_fase=False
|
| 157 |
trust_remote_code=True)
|
| 158 |
|
| 159 |
|
modeling_fegeo_llama.py
CHANGED
|
@@ -2776,7 +2776,6 @@ class FEGeoLlamaForCausalLM(LlamaForCausalLM, FEGeoMetaForCausalLM):
|
|
| 2776 |
image_aspect_ratio = getattr(model_cfg, "image_aspect_ratio", None)
|
| 2777 |
new_images = []
|
| 2778 |
if image_aspect_ratio == 'pad':
|
| 2779 |
-
print(f'using padding')
|
| 2780 |
for image in images:
|
| 2781 |
image = self.crop(image)
|
| 2782 |
image = self.expand2square(image, (255, 255, 255))
|
|
|
|
| 2776 |
image_aspect_ratio = getattr(model_cfg, "image_aspect_ratio", None)
|
| 2777 |
new_images = []
|
| 2778 |
if image_aspect_ratio == 'pad':
|
|
|
|
| 2779 |
for image in images:
|
| 2780 |
image = self.crop(image)
|
| 2781 |
image = self.expand2square(image, (255, 255, 255))
|