Spaces:
Sleeping
Sleeping
Update jina_fewshot.py
Browse files- jina_fewshot.py +2 -0
jina_fewshot.py
CHANGED
|
@@ -155,6 +155,8 @@ class JinaCLIPv2Encoder:
|
|
| 155 |
trust_remote_code=True,
|
| 156 |
low_cpu_mem_usage=False,
|
| 157 |
revision="main",
|
|
|
|
|
|
|
| 158 |
)
|
| 159 |
finally:
|
| 160 |
torch.linspace = _orig_linspace
|
|
|
|
| 155 |
trust_remote_code=True,
|
| 156 |
low_cpu_mem_usage=False,
|
| 157 |
revision="main",
|
| 158 |
+
torch_dtype=torch.float32, # ← force fp32, prevents NaN from bad dtype
|
| 159 |
+
device_map=None, # ← prevent accelerate meta device init
|
| 160 |
)
|
| 161 |
finally:
|
| 162 |
torch.linspace = _orig_linspace
|