Instructions to use ciol-research/GPT2-UKILv1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ciol-research/GPT2-UKILv1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ciol-research/GPT2-UKILv1")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ciol-research/GPT2-UKILv1", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ciol-research/GPT2-UKILv1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ciol-research/GPT2-UKILv1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ciol-research/GPT2-UKILv1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ciol-research/GPT2-UKILv1
- SGLang
How to use ciol-research/GPT2-UKILv1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ciol-research/GPT2-UKILv1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ciol-research/GPT2-UKILv1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ciol-research/GPT2-UKILv1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ciol-research/GPT2-UKILv1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ciol-research/GPT2-UKILv1 with Docker Model Runner:
docker model run hf.co/ciol-research/GPT2-UKILv1
Exploring Possibilities of AI-Powered Legal Assistance in Bangladesh through Large Language Modeling
- Authors: Azmine Toushik Wasi, Wahid Faisal, Mst Rafia Islam, Mahathir M Bappy
- arXiv : https://arxiv.org/abs/2410.17210
- The
GPT2-UKIL-ENmodel is freely available in Hugging Face with DOI: 10.57967/hf/3233 withciol-research/GPT2-UKILv1. - The
UKIL-DB-ENdataset is freely available in Hugging Face with DOI: 10.57967/hf/3235 withciol-research/UKIL-DB-EN.
Abstract: Bangladesh's legal system struggles with major challenges like delays, complexity, high costs, and millions of unresolved cases, which deter many from pursuing legal action due to lack of knowledge or financial constraints. This research seeks to develop a specialized Large Language Model (LLM) to assist in the Bangladeshi legal system.
We created UKIL-DB-EN, an English corpus of Bangladeshi legal documents, by collecting and scraping data on various legal acts. We fine-tuned the GPT-2 model on this dataset to develop GPT2-UKIL-EN`, an LLM focused on providing legal assistance in English.
The model was rigorously evaluated using semantic assessments, including case studies supported by expert opinions. The evaluation provided promising results, demonstrating the potential for the model to assist in legal matters within Bangladesh.
Our work represents the first structured effort toward building an AI-based legal assistant for Bangladesh. While the results are encouraging, further refinements are necessary to improve the model's accuracy, credibility, and safety. This is a significant step toward creating a legal AI capable of serving the needs of a population of 180 million.
Cite as:
@misc{wasi2024exploringpossibilitiesaipoweredlegal,
title={Exploring Possibilities of AI-Powered Legal Assistance in Bangladesh through Large Language Modeling},
author={Azmine Toushik Wasi and Wahid Faisal and Mst Rafia Islam and Mahathir Mohammad Bappy},
year={2024},
eprint={2410.17210},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2410.17210},
}
Model tree for ciol-research/GPT2-UKILv1
Base model
openai-community/gpt2