Napron commited on
Commit
731266b
·
verified ·
1 Parent(s): 0f3780e

Update jina_fewshot.py

Browse files
Files changed (1) hide show
  1. 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