gasmichel commited on
Commit
9d7aa97
·
verified ·
1 Parent(s): 6f3bb4b

Upload folder using huggingface_hub

Browse files
.ipynb_checkpoints/model-checkpoint.py CHANGED
@@ -15,20 +15,16 @@ from .config import LUARConfig
15
  from huggingface_hub import PyTorchModelHubMixin
16
 
17
 
18
- class UARScene(
19
- nn.Module,
20
- PyTorchModelHubMixin,
21
- ):
22
  """Defines the SBERT model.
23
  """
24
  config_class = LUARConfig
25
 
26
  def __init__(self, config):
27
 
28
- super().__init__()
29
- self.config = config
30
  self.create_transformer()
31
- self.linear = nn.Linear(self.hidden_size, self.config.embedding_size)
32
 
33
  def attn_fn(self, k, q ,v) :
34
  d_k = q.size(-1)
 
15
  from huggingface_hub import PyTorchModelHubMixin
16
 
17
 
18
+ class UARScene(PreTrainedModel):
 
 
 
19
  """Defines the SBERT model.
20
  """
21
  config_class = LUARConfig
22
 
23
  def __init__(self, config):
24
 
25
+ super().__init__(config)
 
26
  self.create_transformer()
27
+ self.linear = nn.Linear(self.hidden_size, config.embedding_size)
28
 
29
  def attn_fn(self, k, q ,v) :
30
  d_k = q.size(-1)
__pycache__/config.cpython-39.pyc CHANGED
Binary files a/__pycache__/config.cpython-39.pyc and b/__pycache__/config.cpython-39.pyc differ
 
__pycache__/model.cpython-39.pyc CHANGED
Binary files a/__pycache__/model.cpython-39.pyc and b/__pycache__/model.cpython-39.pyc differ
 
config.json CHANGED
@@ -11,4 +11,4 @@
11
  "torch_dtype": "float32",
12
  "transformers_version": "4.45.2",
13
  "use_memory_efficient_attention": false
14
- }
 
11
  "torch_dtype": "float32",
12
  "transformers_version": "4.45.2",
13
  "use_memory_efficient_attention": false
14
+ }
model.py CHANGED
@@ -15,20 +15,16 @@ from .config import LUARConfig
15
  from huggingface_hub import PyTorchModelHubMixin
16
 
17
 
18
- class UARScene(
19
- nn.Module,
20
- PyTorchModelHubMixin,
21
- ):
22
  """Defines the SBERT model.
23
  """
24
  config_class = LUARConfig
25
 
26
  def __init__(self, config):
27
 
28
- super().__init__()
29
- self.config = config
30
  self.create_transformer()
31
- self.linear = nn.Linear(self.hidden_size, self.config.embedding_size)
32
 
33
  def attn_fn(self, k, q ,v) :
34
  d_k = q.size(-1)
 
15
  from huggingface_hub import PyTorchModelHubMixin
16
 
17
 
18
+ class UARScene(PreTrainedModel):
 
 
 
19
  """Defines the SBERT model.
20
  """
21
  config_class = LUARConfig
22
 
23
  def __init__(self, config):
24
 
25
+ super().__init__(config)
 
26
  self.create_transformer()
27
+ self.linear = nn.Linear(self.hidden_size, config.embedding_size)
28
 
29
  def attn_fn(self, k, q ,v) :
30
  d_k = q.size(-1)
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:805dd855ea1bfc8cc2eadc40a34771821fa6e10882c206a1b1061b65fecae122
3
- size 330061408
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:42876ee22d15016c006ebd597cc1626ce5093cfffeb82994797dba7bc38a8f39
3
+ size 330061440