sourabhd commited on
Commit
7385c85
1 Parent(s): 5808315

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -30
README.md CHANGED
@@ -72,60 +72,62 @@ Any use beyond this is not guaranteed to be accurate.
72
  ## How to Get Started with the Model
73
 
74
  ```
75
- import torch
76
  from transformers import pipeline
 
77
 
78
- pipe = pipeline("text-generation",
79
- model="dataeaze/dataeaze-RegLLM-zephyr_7b_beta-dzcompli",
80
- torch_dtype=torch.bfloat16,
81
  device_map="auto")
82
 
83
- messages = [
84
- {
85
- "role": "system",
86
- "content": "You are a compliance assistant who answers in a formal manner",
87
- },
88
- {"role": "user", "content": "How often should IRRBB policies be reviewed?"},
89
- ]
90
- prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
91
- outputs = pipe(prompt, max_new_tokens=120, do_sample=True, temperature=0.1, top_k=50, top_p=0.95)
92
- print(outputs[0]["generated_text"])
 
93
  ```
94
 
95
  ## Sample Output
96
 
97
  ### Question
98
- How often should IRRBB policies be reviewed?
99
 
100
  ### RegLLM respose
101
 
102
  ```
103
- <|system|>
104
- You are a compliance assistant who answers in a formal manner</s>
105
- <|user|>
106
- How often should IRRBB policies be reviewed?</s>
107
- <|assistant|>
108
- At least annually.
109
- The review should be conducted by a committee consisting of the Chief Risk Officer, the Head of Market Risk, and the Head of Credit Risk.
110
- The review should include an assessment of the effectiveness of the IRRBB policy and the adequacy of the capital and liquidity management framework.
111
- The committee should also review the risk appetite and the risk tolerance of the organization.
112
- The review should be documented and presented to the Board of Directors for approval.
113
- The policy should be updated as necessary to reflect changes in the organization's business, products, or processes.
114
  ```
115
 
116
  ### GPT-4 response
117
- ![gpt4 response](./gpt4_reponse.png)
 
 
 
 
 
 
 
 
 
118
 
119
 
120
  ### Reference
121
 
122
  For evalating truthfulness / hallucination of this response, refer to RBI notification
123
- [RBI/2022-23/180
124
- DOR.MRG.REC.102/00-00-009/2022-23](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/NOTI180CF30A8446A704C11BD8267A8D0BB2AC2.PDF) (page 8)
125
 
126
  Screenshot below
127
 
128
- <img src="rbi_reference.png" alt="drawing" width="500"/>
129
 
130
 
131
  As you can see, RegLLM has identified the frequency of IRRBB policies, while GPT-4 provides a more general response.
 
72
  ## How to Get Started with the Model
73
 
74
  ```
 
75
  from transformers import pipeline
76
+ import torch
77
 
78
+ pipe = pipeline("text-generation", model="dataeaze/dataeaze-RegLLM-microsoft_phi_2-dzcompli",
79
+ torch_dtype=torch.bfloat16,
 
80
  device_map="auto")
81
 
82
+ pipe.tokenizer.pad_token = pipe.tokenizer.eos_token
83
+
84
+ result = pipe(f"Instruct: Are there specific categories of ECBs with different MAMP requirements?",
85
+ max_new_tokens=256,
86
+ do_sample=True,
87
+ temperature=0.1,
88
+ top_k=50,
89
+ top_p=0.95)[0]['generated_text']
90
+
91
+ print(result)
92
+
93
  ```
94
 
95
  ## Sample Output
96
 
97
  ### Question
98
+ Are there specific categories of ECBs with different MAMP requirements?
99
 
100
  ### RegLLM respose
101
 
102
  ```
103
+ Instruct: Are there specific categories of ECBs with different MAMP requirements?
104
+ Output: Yes, there are various categories of ECBs, each with its own set of MAMP requirements.
105
+ These categories may include infrastructure, commercial real estate, and other specific categories as defined by relevant regulations.
106
+ The specific MAMP requirements for each category may vary, and banks must adhere to these requirements when extending ECBs.
 
 
 
 
 
 
 
107
  ```
108
 
109
  ### GPT-4 response
110
+ <table>
111
+ <tr style="border-spacing: 5px;">
112
+ <td>
113
+ <img src="chatgpt_ecb_1.png" alt="gpt-4-respnse" width="500" />
114
+ </td>
115
+ <td>
116
+ <img src="chatgpt_ecb_2.png" alt="gpt-4-respnse" width="500" />
117
+ </td>
118
+ </tr>
119
+ </table>
120
 
121
 
122
  ### Reference
123
 
124
  For evalating truthfulness / hallucination of this response, refer to RBI notification
125
+ [RBI/FED/2018-19/67
126
+ FED Master Direction No.5/2018-19](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/5MD2603201979CA1390E9E546869B2A9A92614DEDBF.PDF) (page 9)
127
 
128
  Screenshot below
129
 
130
+ <img src="rbi_gold_answer_ecb.png" alt="rbi-gold-answer" width="500"/>
131
 
132
 
133
  As you can see, RegLLM has identified the frequency of IRRBB policies, while GPT-4 provides a more general response.