abhisheksan commited on
Commit
8702989
1 Parent(s): ba9ec5c

Update model configuration and fix tokenizer files; remove outdated model binary

Browse files
logs/poetry_generation_20241117.log CHANGED
@@ -2,3 +2,19 @@
2
  2024-11-17 00:08:50,303 - main - INFO - Model and tokenizer loaded successfully
3
  2024-11-17 00:13:06,341 - main - INFO - Initializing model on device: cpu
4
  2024-11-17 00:13:07,660 - main - INFO - Model and tokenizer loaded successfully
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  2024-11-17 00:08:50,303 - main - INFO - Model and tokenizer loaded successfully
3
  2024-11-17 00:13:06,341 - main - INFO - Initializing model on device: cpu
4
  2024-11-17 00:13:07,660 - main - INFO - Model and tokenizer loaded successfully
5
+ 2024-11-17 16:33:11,148 - main - INFO - Initializing model on device: cpu
6
+ 2024-11-17 16:33:13,017 - main - ERROR - Error initializing model: Error(s) in loading state_dict for GPT2LMHeadModel:
7
+ size mismatch for transformer.wpe.weight: copying a param with shape torch.Size([400, 384]) from checkpoint, the shape in current model is torch.Size([128, 384]).
8
+ 2024-11-17 16:33:13,017 - main - ERROR - Detailed traceback:
9
+ Traceback (most recent call last):
10
+ File "E:\Self Work\My Projects\Poetica HuggingFace Server\poetica\main.py", line 137, in initialize
11
+ await self._load_and_optimize_model()
12
+ File "E:\Self Work\My Projects\Poetica HuggingFace Server\poetica\main.py", line 185, in _load_and_optimize_model
13
+ self.model.load_state_dict(state_dict, strict=False)
14
+ File "e:\Self Work\My Projects\Poetica HuggingFace Server\.venv\Lib\site-packages\torch\nn\modules\module.py", line 2189, in load_state_dict
15
+ raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
16
+ RuntimeError: Error(s) in loading state_dict for GPT2LMHeadModel:
17
+ size mismatch for transformer.wpe.weight: copying a param with shape torch.Size([400, 384]) from checkpoint, the shape in current model is torch.Size([128, 384]).
18
+ 2024-11-17 16:33:13,020 - main - ERROR - Failed to initialize model manager
19
+ 2024-11-17 16:33:41,008 - main - INFO - Initializing model on device: cpu
20
+ 2024-11-17 16:33:43,152 - main - INFO - Model and tokenizer loaded successfully
main.py CHANGED
@@ -23,8 +23,8 @@ BATCH_SIZE = 4
23
  CACHE_SIZE = 1024
24
 
25
  MODEL_CONFIG = GPT2Config(
26
- n_positions=128,
27
- n_ctx=128,
28
  n_embd=384,
29
  n_layer=6,
30
  n_head=6,
 
23
  CACHE_SIZE = 1024
24
 
25
  MODEL_CONFIG = GPT2Config(
26
+ n_positions=400,
27
+ n_ctx=400,
28
  n_embd=384,
29
  n_layer=6,
30
  n_head=6,
models/merges.txt CHANGED
The diff for this file is too large to render. See raw diff
 
models/poeticagpt.pth CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f77da9534fcf01b36f4780cd24ebe46e4d7f8740a1b17b66d5173d8694d6a62e
3
- size 139310252
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ba4e77d7a7b5186188172eb2559210305b4e565459e84b8ddadd26a63a0ebbf
3
+ size 139728044
models/pytorch_model.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:f77da9534fcf01b36f4780cd24ebe46e4d7f8740a1b17b66d5173d8694d6a62e
3
- size 139310252
 
 
 
 
models/special_tokens_map.json CHANGED
@@ -21,4 +21,4 @@
21
  "rstrip": false,
22
  "single_word": false
23
  }
24
- }
 
21
  "rstrip": false,
22
  "single_word": false
23
  }
24
+ }
models/tokenizer_config.json CHANGED
@@ -19,4 +19,4 @@
19
  "pad_token": "<|endoftext|>",
20
  "tokenizer_class": "GPT2Tokenizer",
21
  "unk_token": "<|endoftext|>"
22
- }
 
19
  "pad_token": "<|endoftext|>",
20
  "tokenizer_class": "GPT2Tokenizer",
21
  "unk_token": "<|endoftext|>"
22
+ }
models/vocab.json CHANGED
@@ -50256,4 +50256,4 @@
50256
  "Ń": 255,
50257
  "Ń·": 48953,
50258
  "ŃĶ": 18433
50259
- }
 
50256
  "Ń": 255,
50257
  "Ń·": 48953,
50258
  "ŃĶ": 18433
50259
+ }