lukeingawesome commited on
Commit
dd5ed8b
·
verified ·
1 Parent(s): 850592d

Remove problematic AutoModel.register() call

Browse files
Files changed (1) hide show
  1. modeling_llm2vec4cxr.py +0 -5
modeling_llm2vec4cxr.py CHANGED
@@ -124,8 +124,3 @@ class LLM2Vec4CXRModel(LlamaBiModel):
124
  embs = self.encode_with_separator(all_texts, separator=separator, max_length=max_length)
125
  # embs: [N, 2048]; compare query vs candidates
126
  return F.cosine_similarity(embs[0], embs[1:], dim=1)
127
-
128
-
129
- # Register the model for auto loading
130
- from transformers import AutoModel
131
- AutoModel.register(LLM2Vec4CXRModel.__name__, LLM2Vec4CXRModel)
 
124
  embs = self.encode_with_separator(all_texts, separator=separator, max_length=max_length)
125
  # embs: [N, 2048]; compare query vs candidates
126
  return F.cosine_similarity(embs[0], embs[1:], dim=1)