Skip to content

S-Y-A-N/ar-llm-browser

Repository files navigation

Arabic LLM in the Browser

This repository contains our senior research project code, titled "Browser-based Locally Hosted Arabic LLM Optimaization".

You will find our implementation of LLM evaluation and model compression methods such as quantization here.

File Structure

├── evaluation
│   ├── bench.py      # benchmarking script
│   ├── evaluate.py   # tasks evaluation script
│   └── tasks
│       └── tasks.txt # chosen evaluation tasks
├── models            # chosen models
├── requirements.txt  # pip dependencies
└── llmini.py         # helper script to perform evaluation

Getting Started

  1. Fork or clone the repository into your local environment, then move inside it.
git clone https://github.com/S-Y-A-N/ar-llm-browser.git && cd ar-llm-browser
  1. Create and activate a python virtual environment, then install the required pip dependencies.
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt -e .
  1. If you want to run an evaluation, simply use the helper script llmini.py:
python llmini.py <path/to/model> <path/to/tasks> --options

or you can run chmod +x llmini.py to make it an executable and run:

./llmini.py <path/to/model> <path/to/tasks> --options

to find out about the available options, simply run llmini.py with -h or --help.

Contributing Notes

Before commiting your changes, make sure to run pre-commit for formatting consistency:

pre-commit install  # for the first time only
pre-commit run -a   # run formatting on all files

About

(WIP) Code for "Browser-based Locally Hosted Arabic LLM Optimization".

Resources

Stars

Watchers

Forks

Languages