sujitvasanth commited on
Commit
d98f55f
·
verified ·
1 Parent(s): f1ef781

Delete text_model.py

Browse files
Files changed (1) hide show
  1. text_model.py +0 -19
text_model.py DELETED
@@ -1,19 +0,0 @@
1
- from torch import nn
2
- import transformers
3
- from .modeling_phi import PhiForCausalLM
4
- from .configuration_moondream import PhiConfig
5
-
6
- transformers.logging.set_verbosity_error()
7
-
8
-
9
- class TextModel(nn.Module):
10
- def __init__(self, config) -> None:
11
- super().__init__()
12
-
13
- if type(config.phi_config) == dict:
14
- phi_config = PhiConfig(**config.phi_config)
15
- else:
16
- phi_config = config.phi_config
17
-
18
- self.model = PhiForCausalLM(phi_config)
19
- self.text_emb = self.model.get_input_embeddings()