--- license: cc-by-nc-sa-4.0 language: - en library_name: transformers pipeline_tag: text-generation tags: - finance - legal --- # Model Card for Model ID RegLLM is LLM model for regulatory compliance. It has been domain adapted by unsupervised pretraining and instruction finetuned for regulatory compliance. This release focuses on Indian Banking rules and regulations. ## Model Details ### Model Description - **Developed by:** [dataeaze systems pvt ltd](https://www.dataeaze.io/) - **Funded by:** [dataeaze systems pvt ltd](https://www.dataeaze.io/) - **Shared by:** [dataeaze systems pvt ltd](https://www.dataeaze.io/) - **Model type:** PhiForCausalLM - **Language(s) (NLP):** English - **License:** [cc-by-nc-sa-4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en) Model is made available under non-commercial use for research purposes only. For commercial usage please connect at contactus@dataeaze.io - **Finetuned from model:** [miscrosoft-phi-2](https://huggingface.co/microsoft/phi-2) ## Uses ### Direct Use The model has been crafted crafted to provide precise and insightful answers to a wide array of queries related to Indian Banking regulations. ### Downstream Use This model can be used as core component in RegTech application ### Out-of-Scope Use Model has been fine tuned on a specific task of answering questions related to Indian regulatory compliance. Any use beyond this is not guaranteed to be accurate. ## Bias, Risks, and Limitations - **Bias:** Trained for English language only (as of now). - **Risk:** Guardrails are reliant on the base models Microsoft Phi-2. Finetuning could impact this behaviour. - **Limitations:** Intended to be a small model optimised for Indian regulations (as of now). ### Recommendations * This model is supposed to be used as an assistive AI technology. Kindly consult and verify with the source documents for decision making. * This model should be used with grounding on a set of regulatory documents. ## How to Get Started with the Model ``` from transformers import pipeline import torch pipe = pipeline("text-generation", model="dataeaze/dataeaze-RegLLM-microsoft_phi_2-dzcompli", torch_dtype=torch.bfloat16, device_map="auto") pipe.tokenizer.pad_token = pipe.tokenizer.eos_token result = pipe(f"What are the skills that a CCO should have?", max_new_tokens=256, do_sample=True, temperature=0.1, top_k=50, top_p=0.95)[0]['generated_text'] print(result) ``` ## Sample Output ### Question What are the skills that a CCO should have? ### RegLLM respose ``` Instruct: What are the skills that a CCO should have? Output: The skills that a CCO should have include leadership, communication, and a strong understanding of compliance. They should also be able to work effectively with other departments and have a good track record of compliance. ``` ### GPT-4 response