File size: 4,261 Bytes
00f2fc9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
sys.path : ['/home/ec2-user/Gradio/MPT7BTest', '/usr/lib64/python37.zip', '/usr/lib64/python3.7', '/usr/lib64/python3.7/lib-dynload', '/home/ec2-user/.local/lib/python3.7/site-packages', '/usr/lib64/python3.7/site-packages', '/usr/lib/python3.7/site-packages', '/home/ec2-user/workspace/Notebooks/lib']

Cell imports done

Cell start generate
You are using config.init_device='cpu', but you can also use config.init_device="meta" with Composer + FSDP for fast initialization.
Traceback (most recent call last):
  File "app.py", line 68, in <module>
    trust_remote_code=True,
  File "/home/ec2-user/Gradio/MPT7BTest/InstructionTextGenerationPipeline.py", line 44, in __init__
    use_auth_token=use_auth_token,
  File "/home/ec2-user/.local/lib/python3.7/site-packages/transformers/models/auto/auto_factory.py", line 463, in from_pretrained
    pretrained_model_name_or_path, *model_args, config=config, **hub_kwargs, **kwargs
  File "/home/ec2-user/.local/lib/python3.7/site-packages/transformers/modeling_utils.py", line 2611, in from_pretrained
    model = cls(config, *model_args, **model_kwargs)
  File "/home/ec2-user/.cache/huggingface/modules/transformers_modules/mosaicml/mpt-7b-instruct/ff5f3989b2585668930aeba501e83dfb306fc78d/modeling_mpt.py", line 222, in __init__
    self.transformer = MPTModel(config)
  File "/home/ec2-user/.cache/huggingface/modules/transformers_modules/mosaicml/mpt-7b-instruct/ff5f3989b2585668930aeba501e83dfb306fc78d/modeling_mpt.py", line 55, in __init__
    self.apply(self.param_init_fn)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 728, in apply
    module.apply(fn)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 728, in apply
    module.apply(fn)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 728, in apply
    module.apply(fn)
  [Previous line repeated 1 more time]
  File "/home/ec2-user/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 729, in apply
    fn(self)
  File "/home/ec2-user/.cache/huggingface/modules/transformers_modules/mosaicml/mpt-7b-instruct/ff5f3989b2585668930aeba501e83dfb306fc78d/modeling_mpt.py", line 208, in param_init_fn
    MODEL_INIT_REGISTRY[init_fn_name](module=module, n_layers=self.config.n_layers, d_model=self.config.d_model, **self.config.init_config)
  File "/home/ec2-user/.cache/huggingface/modules/transformers_modules/mosaicml/mpt-7b-instruct/ff5f3989b2585668930aeba501e83dfb306fc78d/param_init_fns.py", line 167, in kaiming_normal_param_init_fn_
    generic_param_init_fn_(module=module, init_fn_=kaiming_normal_, d_model=d_model, n_layers=n_layers, init_div_is_residual=init_div_is_residual, emb_init_std=emb_init_std, emb_init_uniform_lim=emb_init_uniform_lim, verbose=verbose)
  File "/home/ec2-user/.cache/huggingface/modules/transformers_modules/mosaicml/mpt-7b-instruct/ff5f3989b2585668930aeba501e83dfb306fc78d/param_init_fns.py", line 51, in generic_param_init_fn_
    init_fn_(module.weight)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/torch/nn/init.py", line 451, in kaiming_normal_
    return tensor.normal_(0, std)
KeyboardInterrupt
sys.path : ['/home/ec2-user/Gradio/MPT7BTest', '/usr/lib64/python37.zip', '/usr/lib64/python3.7', '/usr/lib64/python3.7/lib-dynload', '/home/ec2-user/.local/lib/python3.7/site-packages', '/usr/lib64/python3.7/site-packages', '/usr/lib/python3.7/site-packages', '/home/ec2-user/workspace/Notebooks/lib']

Cell imports done

Cell start generate


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "app.py", line 68, in <module>
    trust_remote_code=True,
  File "/home/ec2-user/Gradio/MPT7BTest/InstructionTextGenerationPipeline.py", line 44, in __init__
    use_auth_token=use_auth_token,
  File "/home/ec2-user/.local/lib/python3.7/site-packages/transformers/models/auto/auto_factory.py", line 463, in from_pretrained
    pretrained_model_name_or_path, *model_args, config=config, **hub_kwargs, **kwargs
  File "/home/ec2-user/.local/lib/python3.7/site-packages/transformers/modeling_utils.py", line 2611, in from_pretrained
    model = cls(config, *model_args, **model_kwargs)
KeyboardInterrupt